Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 116 lines 2.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 makeWrapper, 6 autoPatchelfHook, 7 dpkg, 8 alsa-lib, 9 curl, 10 avahi, 11 gstreamer, 12 gst-plugins-base, 13 libxcb, 14 libX11, 15 libXcursor, 16 libXext, 17 libXi, 18 libXinerama, 19 libXrandr, 20 libXrender, 21 libXxf86vm, 22 libglvnd, 23 zenity, 24}: 25 26let 27 runLibDeps = [ 28 curl 29 avahi 30 libxcb 31 libX11 32 libXcursor 33 libXext 34 libXi 35 libXinerama 36 libXrandr 37 libXrender 38 libXxf86vm 39 libglvnd 40 ]; 41 42 runBinDeps = [ 43 zenity 44 ]; 45in 46 47stdenv.mkDerivation rec { 48 pname = "kodelife"; 49 version = "1.1.0.173"; 50 51 suffix = 52 { 53 aarch64-linux = "linux-arm64"; 54 armv7l-linux = "linux-armhf"; 55 x86_64-linux = "linux-x64"; 56 } 57 .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 58 59 src = fetchurl { 60 url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb"; 61 hash = 62 { 63 aarch64-linux = "sha256-WPUWvgVZR+2Dg4zpk+iUemMBGlGBDtaGkUGrWuF5LBs="; 64 armv7l-linux = "sha256-tOPqP40e0JrXg92OluMZrurWHXZavGwTkJiNN1IFVEE="; 65 x86_64-linux = "sha256-ZA8BlUtKaiSnXGncYwb2BbhBlULuGz7SWuXL0RAgQLI="; 66 } 67 .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 68 }; 69 70 strictDeps = true; 71 72 nativeBuildInputs = [ 73 makeWrapper 74 autoPatchelfHook 75 dpkg 76 ]; 77 78 buildInputs = [ 79 (lib.getLib stdenv.cc.cc) 80 alsa-lib 81 gstreamer 82 gst-plugins-base 83 ]; 84 85 installPhase = '' 86 runHook preInstall 87 88 mkdir -p $out 89 cp -r usr/share $out/share 90 91 mkdir -p $out/bin 92 cp opt/kodelife/KodeLife $out/bin/KodeLife 93 94 wrapProgram $out/bin/KodeLife \ 95 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runLibDeps} \ 96 --prefix PATH : ${lib.makeBinPath runBinDeps} 97 98 runHook postInstall 99 ''; 100 101 passthru.updateScript = ./update.sh; 102 103 meta = with lib; { 104 homepage = "https://hexler.net/kodelife"; 105 description = "Real-time GPU shader editor"; 106 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 107 license = licenses.unfree; 108 maintainers = with maintainers; [ prusnak ]; 109 platforms = [ 110 "aarch64-linux" 111 "armv7l-linux" 112 "x86_64-linux" 113 ]; 114 mainProgram = "KodeLife"; 115 }; 116}