2019-08-20 12:30:43 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchzip
|
|
|
|
, alsaLib
|
|
|
|
, glib
|
|
|
|
, gst_all_1
|
2019-11-10 17:44:34 +01:00
|
|
|
, libGLU, libGL
|
2019-08-20 12:30:43 +02:00
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kodelife";
|
2020-04-06 04:17:44 +02:00
|
|
|
version = "0.9.0.129";
|
2019-11-28 17:30:40 +01:00
|
|
|
|
|
|
|
suffix = {
|
|
|
|
aarch64-linux = "linux-arm64";
|
|
|
|
armv7l-linux = "linux-armhf";
|
|
|
|
x86_64-darwin = "macos";
|
|
|
|
x86_64-linux = "linux-x86_64";
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2019-08-20 12:30:43 +02:00
|
|
|
|
|
|
|
src = fetchzip {
|
2019-11-28 17:30:40 +01:00
|
|
|
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.zip";
|
|
|
|
sha256 = {
|
2020-04-13 19:06:27 +02:00
|
|
|
aarch64-linux = "0z2fqlf156348ha3zhv16kvqdx68fbwbzch2gzjm9x1na9n5k1ra";
|
|
|
|
armv7l-linux = "1ppwgrmgl1j2ws9mhrscvvkamd69a6xw7x35df6d30cyj97r0mzy";
|
|
|
|
x86_64-darwin = "0f8vn6m3xzsiyxm2ka5wkbp63wvzrix6g1xrbpvcm3v2llmychkl";
|
2020-04-06 04:17:44 +02:00
|
|
|
x86_64-linux = "035c1nlw0nim057sz3axpkcgkafqbm6gpr8hwr097vlrqll6w3dv";
|
2019-11-28 17:30:40 +01:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2019-08-20 12:30:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
2020-04-13 19:12:26 +02:00
|
|
|
preferLocalBuild = true;
|
2019-08-20 12:30:43 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv KodeLife $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = let
|
|
|
|
libPath = stdenv.lib.makeLibraryPath [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
alsaLib
|
|
|
|
glib
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
2019-11-10 17:44:34 +01:00
|
|
|
libGLU libGL
|
2019-08-20 12:30:43 +02:00
|
|
|
xorg.libX11
|
|
|
|
];
|
2019-11-28 17:30:40 +01:00
|
|
|
in stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
2019-08-20 12:30:43 +02:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}" \
|
|
|
|
$out/bin/KodeLife
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://hexler.net/products/kodelife";
|
|
|
|
description = "Real-time GPU shader editor";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
2019-11-28 17:30:40 +01:00
|
|
|
platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-darwin" "x86_64-linux" ];
|
2019-08-20 12:30:43 +02:00
|
|
|
};
|
|
|
|
}
|