Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 86 lines 1.7 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchFromGitHub, 5 makeWrapper, 6 xorg, 7 getopt, 8 xauth, 9 util-linux, 10 which, 11 fontsConf, 12 gawk, 13 coreutils, 14 installShellFiles, 15 xterm, 16 bashNonInteractive, 17}: 18stdenvNoCC.mkDerivation { 19 pname = "xvfb-run"; 20 version = "1+g87f6705"; 21 22 src = fetchFromGitHub { 23 owner = "archlinux"; 24 repo = "svntogit-packages"; 25 rev = "87f67054c49b32511893acd22be94c47ecd44b4a"; 26 sha256 = "sha256-KEg92RYgJd7naHFDKbdXEy075bt6NLcmX8VhQROHVPs="; 27 }; 28 29 nativeBuildInputs = [ 30 makeWrapper 31 installShellFiles 32 ]; 33 34 buildInputs = [ 35 bashNonInteractive 36 ]; 37 38 strictDeps = true; 39 40 dontUnpack = true; 41 dontBuild = true; 42 dontConfigure = true; 43 44 installPhase = '' 45 mkdir -p $out/bin 46 cp $src/trunk/xvfb-run $out/bin/xvfb-run 47 installManPage $src/trunk/xvfb-run.1 48 49 chmod a+x $out/bin/xvfb-run 50 patchShebangs $out/bin/xvfb-run 51 wrapProgram $out/bin/xvfb-run \ 52 --set-default FONTCONFIG_FILE "${fontsConf}" \ 53 --prefix PATH : ${ 54 lib.makeBinPath [ 55 getopt 56 xorg.xvfb 57 xauth 58 which 59 util-linux 60 gawk 61 coreutils 62 ] 63 } 64 ''; 65 66 doInstallCheck = true; 67 installCheckPhase = '' 68 ( 69 unset PATH 70 echo "running xterm with xvfb-run" 71 $out/bin/xvfb-run ${lib.getBin xterm}/bin/xterm -e true 72 ) 73 ''; 74 75 passthru = { 76 updateScript = ./update.sh; 77 }; 78 79 meta = with lib; { 80 description = "Convenience script to run a virtualized X-Server"; 81 platforms = platforms.linux; 82 license = licenses.gpl2Only; 83 maintainers = [ maintainers.artturin ]; 84 mainProgram = "xvfb-run"; 85 }; 86}