biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / graphics / kodelife / default.nix
blob9bfc5d7aec191849a7ee44f7ae8d87c3d926bbed
1 { lib
2 , stdenv
3 , fetchurl
4 , makeWrapper
5 , autoPatchelfHook
6 , dpkg
7 , alsa-lib
8 , curl
9 , avahi
10 , gstreamer
11 , gst-plugins-base
12 , libxcb
13 , libX11
14 , libXcursor
15 , libXext
16 , libXi
17 , libXinerama
18 , libXrandr
19 , libXrender
20 , libXxf86vm
21 , libglvnd
22 , gnome
25 let
26   runLibDeps = [
27     curl
28     avahi
29     libxcb
30     libX11
31     libXcursor
32     libXext
33     libXi
34     libXinerama
35     libXrandr
36     libXrender
37     libXxf86vm
38     libglvnd
39   ];
41   runBinDeps = [
42     gnome.zenity
43   ];
46 stdenv.mkDerivation rec {
47   pname = "kodelife";
48   version = "1.1.0.173";
50   suffix = {
51     aarch64-linux = "linux-arm64";
52     armv7l-linux  = "linux-armhf";
53     x86_64-linux  = "linux-x64";
54   }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
56   src = fetchurl {
57     url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
58     hash = {
59       aarch64-linux = "sha256-WPUWvgVZR+2Dg4zpk+iUemMBGlGBDtaGkUGrWuF5LBs=";
60       armv7l-linux  = "sha256-tOPqP40e0JrXg92OluMZrurWHXZavGwTkJiNN1IFVEE=";
61       x86_64-linux  = "sha256-ZA8BlUtKaiSnXGncYwb2BbhBlULuGz7SWuXL0RAgQLI=";
62     }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
63   };
65   strictDeps = true;
67   nativeBuildInputs = [
68     makeWrapper
69     autoPatchelfHook
70     dpkg
71   ];
73   buildInputs = [
74     stdenv.cc.cc.lib
75     alsa-lib
76     gstreamer
77     gst-plugins-base
78   ];
80   installPhase = ''
81     runHook preInstall
83     mkdir -p $out
84     cp -r usr/share $out/share
86     mkdir -p $out/bin
87     cp opt/kodelife/KodeLife $out/bin/KodeLife
89     wrapProgram $out/bin/KodeLife \
90       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runLibDeps} \
91       --prefix PATH : ${lib.makeBinPath runBinDeps}
93     runHook postInstall
94   '';
96   passthru.updateScript = ./update.sh;
98   meta = with lib; {
99     homepage = "https://hexler.net/kodelife";
100     description = "Real-time GPU shader editor";
101     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
102     license = licenses.unfree;
103     maintainers = with maintainers; [ prusnak lilyinstarlight ];
104     platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-linux" ];
105     mainProgram = "KodeLife";
106   };