28 , forceInstallAllHacks ? true
29 , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
32 , wrapperPrefix ? "/run/wrappers/bin"
35 stdenv.mkDerivation (finalAttrs: {
36 pname = "xscreensaver";
40 url = "https://www.jwz.org/xscreensaver/xscreensaver-${finalAttrs.version}.tar.gz";
41 hash = "sha256-9GZ3Ba24zEP9LzlzqIobVLFvIBkK/pOyHiIfL1cyCwU=";
44 outputs = [ "out" "man" ];
70 perlPackages.LWPProtocolHttps
71 perlPackages.MozillaCA
74 ++ lib.optionals withSystemd [ systemd ];
78 patchShebangs check-configs.pl munge-ad.pl xml2man.pl
84 src = ./xscreensaver-wrapper-prefix.patch;
85 inherit wrapperPrefix;
90 # Fix installation paths for GTK resources.
91 sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' \
92 -i driver/Makefile.in po/Makefile.in.in
96 "--with-app-defaults=${placeholder "out"}/share/xscreensaver/app-defaults"
99 # "marbling" has NEON code that mixes signed and unsigned vector types
100 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch "-flax-vector-conversions";
103 for bin in $out/bin/*; do
105 --prefix PATH : "$out/libexec/xscreensaver" \
106 --prefix PATH : "${lib.makeBinPath [ coreutils perlPackages.perl xorg.appres ]}" \
107 --prefix PERL5LIB ':' $PERL5LIB
110 + lib.optionalString forceInstallAllHacks ''
111 make -j$NIX_BUILD_CORES -C hacks/glx dnalogo
112 cat hacks/Makefile.in \
113 | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -C hacks
114 cat hacks/glx/Makefile.in \
115 | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -C hacks/glx
116 cp -f $(find hacks -type f -perm -111 "!" -name "*.*" ) "$out/libexec/xscreensaver"
120 xscreensaver = nixosTests.xscreensaver;
124 homepage = "https://www.jwz.org/xscreensaver/";
125 description = "Set of screensavers";
126 downloadPage = "https://www.jwz.org/xscreensaver/download.html";
127 license = lib.licenses.mit;
128 maintainers = with lib.maintainers; [ raskin AndersonTorres ];
129 platforms = lib.platforms.unix;