nixpkgs/pkgs/tools/misc/xvfb-run/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, stdenvNoCC
, fetchFromGitHub
, makeWrapper
, xorgserver
, getopt
, xauth
, util-linux
, which
, fontsConf
, gawk
, coreutils
, installShellFiles
, xterm
}:
stdenvNoCC.mkDerivation rec {
2023-01-28 04:20:00 +00:00
pname = "xvfb-run";
version = "1+g87f6705";
src = fetchFromGitHub {
owner = "archlinux";
repo = "svntogit-packages";
rev = "87f67054c49b32511893acd22be94c47ecd44b4a";
sha256 = "sha256-KEg92RYgJd7naHFDKbdXEy075bt6NLcmX8VhQROHVPs=";
};
nativeBuildInputs = [ makeWrapper installShellFiles ];
dontUnpack = true;
dontBuild = true;
dontConfigure = true;
installPhase = ''
mkdir -p $out/bin
cp $src/trunk/xvfb-run $out/bin/xvfb-run
installManPage $src/trunk/xvfb-run.1
chmod a+x $out/bin/xvfb-run
2018-03-16 13:28:32 +00:00
patchShebangs $out/bin/xvfb-run
wrapProgram $out/bin/xvfb-run \
--set FONTCONFIG_FILE "${fontsConf}" \
2021-01-15 09:19:50 +00:00
--prefix PATH : ${lib.makeBinPath [ getopt xorgserver xauth which util-linux gawk coreutils ]}
'';
doInstallCheck = true;
installCheckPhase = ''
(
unset PATH
echo "running xterm with xvfb-run"
$out/bin/xvfb-run ${lib.getBin xterm}/bin/xterm -e true
)
'';
passthru = {
updateScript = ./update.sh;
};
meta = with lib; {
description = "Convenience script to run a virtualized X-Server";
2021-05-15 11:54:10 +00:00
platforms = platforms.linux;
2018-09-11 21:51:16 +00:00
license = licenses.gpl2;
maintainers = [ maintainers.artturin ];
mainProgram = "xvfb-run";
};
}