2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchzip
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, gst_all_1
|
|
|
|
, libGLU, libGL
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kodelife";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "0.9.8.143";
|
2020-04-24 23:36:52 +00: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}");
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.zip";
|
|
|
|
sha256 = {
|
2021-05-03 20:48:10 +00:00
|
|
|
aarch64-linux = "0ryjmpzpfqdqrvqpq851vvrjd8ld5g91gcigpv9rxp3z1b7qdand";
|
|
|
|
armv7l-linux = "08nlwn8ixndqil4m7j6c8gjxmwx8zi3in86arnwf13shk6cds5nb";
|
|
|
|
x86_64-linux = "0kbz7pvh4i4a3pj1vzbzzslha825i888isvsigcqsqvipjr4798q";
|
2020-04-24 23:36:52 +00:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-03 20:48:10 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mv KodeLife $out/bin
|
2021-05-03 20:48:10 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = let
|
2021-01-17 00:15:33 +00:00
|
|
|
libPath = lib.makeLibraryPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.cc.cc.lib
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
glib
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
libGLU libGL
|
|
|
|
xorg.libX11
|
|
|
|
];
|
2021-05-03 20:48:10 +00:00
|
|
|
in ''
|
2020-04-24 23:36:52 +00:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}" \
|
|
|
|
$out/bin/KodeLife
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://hexler.net/products/kodelife";
|
|
|
|
description = "Real-time GPU shader editor";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
2021-05-03 20:48:10 +00:00
|
|
|
platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|