2022-04-04 19:45:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, xorgserver
|
|
|
|
, getopt
|
|
|
|
, xauth
|
|
|
|
, util-linux
|
|
|
|
, which
|
|
|
|
, fontsConf
|
|
|
|
, gawk
|
|
|
|
, coreutils
|
|
|
|
, installShellFiles
|
|
|
|
, xterm
|
|
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
2012-08-07 01:14:17 +00:00
|
|
|
name = "xvfb-run";
|
2022-04-04 19:45:19 +00:00
|
|
|
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 = ''
|
2012-08-07 01:14:17 +00:00
|
|
|
mkdir -p $out/bin
|
2022-04-04 19:45:19 +00:00
|
|
|
cp $src/trunk/xvfb-run $out/bin/xvfb-run
|
|
|
|
installManPage $src/trunk/xvfb-run.1
|
2012-08-07 01:14:17 +00:00
|
|
|
|
|
|
|
chmod a+x $out/bin/xvfb-run
|
2018-03-16 13:28:32 +00:00
|
|
|
patchShebangs $out/bin/xvfb-run
|
2012-08-07 01:14:17 +00:00
|
|
|
wrapProgram $out/bin/xvfb-run \
|
2012-08-07 01:27:00 +00:00
|
|
|
--set FONTCONFIG_FILE "${fontsConf}" \
|
2021-01-15 09:19:50 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ getopt xorgserver xauth which util-linux gawk coreutils ]}
|
2012-08-07 01:14:17 +00:00
|
|
|
'';
|
2016-08-02 16:06:29 +00:00
|
|
|
|
2022-04-04 19:45:19 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-04-04 19:45:19 +00:00
|
|
|
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;
|
2022-04-04 19:45:19 +00:00
|
|
|
maintainers = [ maintainers.artturin ];
|
2016-08-02 16:06:29 +00:00
|
|
|
};
|
2012-08-07 01:14:17 +00:00
|
|
|
}
|