Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 buildEnv, 6 makeWrapper, 7 glib, 8 alsa-lib, 9 dbus, 10 gtk2, 11 atk, 12 pango, 13 freetype, 14 fontconfig, 15 gdk-pixbuf, 16 cairo, 17 cups, 18 expat, 19 nspr, 20 gconf, 21 nss, 22 xorg, 23 libcap, 24 unzip, 25}: 26 27let 28 thrustEnv = buildEnv { 29 name = "env-thrust"; 30 paths = [ 31 stdenv.cc.cc 32 glib 33 dbus 34 gtk2 35 atk 36 pango 37 freetype 38 fontconfig 39 gdk-pixbuf 40 cairo 41 cups 42 expat 43 alsa-lib 44 nspr 45 gconf 46 nss 47 xorg.libXrender 48 xorg.libX11 49 xorg.libXext 50 xorg.libXdamage 51 xorg.libXtst 52 xorg.libXcomposite 53 xorg.libXi 54 xorg.libXfixes 55 xorg.libXrandr 56 xorg.libXcursor 57 libcap 58 ]; 59 }; 60in 61stdenv.mkDerivation rec { 62 pname = "thrust"; 63 version = "0.7.6"; 64 65 src = fetchurl { 66 url = "https://github.com/breach/thrust/releases/download/v${version}/thrust-v${version}-linux-x64.zip"; 67 sha256 = "07rrnlj0gk500pvar4b1wdqm05p4n9yjwn911x93bd2qwc8r5ymc"; 68 }; 69 70 nativeBuildInputs = [ 71 makeWrapper 72 unzip 73 ]; 74 buildInputs = [ thrustEnv ]; 75 76 installPhase = '' 77 mkdir -p $out/bin 78 mkdir -p $out/libexec/thrust 79 unzip -d $out/libexec/thrust/ $src 80 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 81 $out/libexec/thrust/thrust_shell 82 wrapProgram $out/libexec/thrust/thrust_shell \ 83 --prefix "LD_LIBRARY_PATH" : "${thrustEnv}/lib:${thrustEnv}/lib64" 84 ln -s $out/libexec/thrust/thrust_shell $out/bin 85 ''; 86 87 meta = with lib; { 88 description = "Chromium-based cross-platform / cross-language application framework"; 89 mainProgram = "thrust_shell"; 90 homepage = "https://github.com/breach/thrust"; 91 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 92 license = licenses.mit; 93 maintainers = [ maintainers.osener ]; 94 platforms = [ "x86_64-linux" ]; 95 }; 96}