2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2019-08-20 12:30:43 +02:00
|
|
|
, 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";
|
2021-04-27 19:35:10 +02:00
|
|
|
version = "0.9.8.143";
|
2019-11-28 17:30:40 +01:00
|
|
|
|
|
|
|
suffix = {
|
|
|
|
aarch64-linux = "linux-arm64";
|
|
|
|
armv7l-linux = "linux-armhf";
|
|
|
|
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 = {
|
2021-04-27 19:35:10 +02:00
|
|
|
aarch64-linux = "0ryjmpzpfqdqrvqpq851vvrjd8ld5g91gcigpv9rxp3z1b7qdand";
|
|
|
|
armv7l-linux = "08nlwn8ixndqil4m7j6c8gjxmwx8zi3in86arnwf13shk6cds5nb";
|
|
|
|
x86_64-linux = "0kbz7pvh4i4a3pj1vzbzzslha825i888isvsigcqsqvipjr4798q";
|
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 = ''
|
2021-04-27 19:35:10 +02:00
|
|
|
runHook preInstall
|
2019-08-20 12:30:43 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mv KodeLife $out/bin
|
2021-04-27 19:35:10 +02:00
|
|
|
runHook postInstall
|
2019-08-20 12:30:43 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = let
|
2021-01-15 14:21:58 +01:00
|
|
|
libPath = lib.makeLibraryPath [
|
2019-08-20 12:30:43 +02:00
|
|
|
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
|
|
|
|
];
|
2021-04-27 19:35:10 +02:00
|
|
|
in ''
|
2019-08-20 12:30:43 +02:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}" \
|
|
|
|
$out/bin/KodeLife
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-08-20 12:30:43 +02:00
|
|
|
homepage = "https://hexler.net/products/kodelife";
|
|
|
|
description = "Real-time GPU shader editor";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
2021-04-27 19:35:10 +02:00
|
|
|
platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-linux" ];
|
2019-08-20 12:30:43 +02:00
|
|
|
};
|
|
|
|
}
|