27 , forceInstallAllHacks ? true
28 , withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
31 stdenv.mkDerivation (finalAttrs: {
32 pname = "xscreensaver";
36 url = "https://www.jwz.org/xscreensaver/xscreensaver-${finalAttrs.version}.tar.gz";
37 hash = "sha256-XPUrpSXO7PlLLyvWNIXr3zGOEvzA8q2tfUwQbYVedqM=";
40 outputs = [ "out" "man" ];
66 perlPackages.LWPProtocolHttps
67 perlPackages.MozillaCA
70 ++ lib.optionals withSystemd [ systemd ];
74 patchShebangs check-configs.pl munge-ad.pl xml2man.pl
79 # Fix installation paths for GTK resources.
80 sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' \
81 -i driver/Makefile.in po/Makefile.in.in
85 "--with-app-defaults=${placeholder "out"}/share/xscreensaver/app-defaults"
88 # "marbling" has NEON code that mixes signed and unsigned vector types
89 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch "-flax-vector-conversions";
92 for bin in $out/bin/*; do
94 --prefix PATH : "$out/libexec/xscreensaver" \
95 --prefix PATH : "${lib.makeBinPath [ coreutils perlPackages.perl ]}" \
96 --prefix PERL5LIB ':' $PERL5LIB
99 + lib.optionalString forceInstallAllHacks ''
100 make -j$NIX_BUILD_CORES -C hacks/glx dnalogo
101 cat hacks/Makefile.in \
102 | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -C hacks
103 cat hacks/glx/Makefile.in \
104 | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -C hacks/glx
105 cp -f $(find hacks -type f -perm -111 "!" -name "*.*" ) "$out/libexec/xscreensaver"
109 homepage = "https://www.jwz.org/xscreensaver/";
110 description = "A set of screensavers";
111 downloadPage = "https://www.jwz.org/xscreensaver/download.html";
112 license = lib.licenses.mit;
113 maintainers = with lib.maintainers; [ raskin AndersonTorres ];
114 platforms = lib.platforms.unix;