2021-10-28 06:52:43 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper
|
2021-04-13 19:44:15 +00:00
|
|
|
, pkg-config, intltool
|
|
|
|
, perl, gettext, libX11, libXext, libXi, libXt
|
|
|
|
, libXft, libXinerama, libXrandr, libXxf86vm, libGL, libGLU, gle
|
|
|
|
, gtk2, gdk-pixbuf, gdk-pixbuf-xlib, libxml2, pam
|
2021-10-28 06:52:43 +00:00
|
|
|
, systemd, coreutils
|
2020-04-24 23:36:52 +00:00
|
|
|
, forceInstallAllHacks ? false
|
2021-04-13 19:44:15 +00:00
|
|
|
, withSystemd ? stdenv.isLinux
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "6.01";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xscreensaver";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.jwz.org/${pname}/${pname}-${version}.tar.gz";
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-CFSEZl2R9gtKHe2s2UvPm3Sw+wlrztyJ/xwkUWjlRzs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
nativeBuildInputs = [
|
2021-10-28 06:52:43 +00:00
|
|
|
pkg-config intltool makeWrapper
|
2021-04-13 19:44:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
perl gettext libX11 libXext libXi libXt
|
|
|
|
libXft libXinerama libXrandr libXxf86vm libGL libGLU gle
|
|
|
|
gtk2 gdk-pixbuf gdk-pixbuf-xlib libxml2 pam
|
|
|
|
] ++ lib.optional withSystemd systemd;
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# Fix installation paths for GTK resources.
|
|
|
|
sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' \
|
|
|
|
-i driver/Makefile.in po/Makefile.in.in
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-app-defaults=${placeholder "out"}/share/xscreensaver/app-defaults"
|
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
for bin in $out/bin/*; do
|
|
|
|
wrapProgram "$bin" \
|
|
|
|
--prefix PATH : "$out/libexec/xscreensaver" \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ coreutils ]}"
|
|
|
|
done
|
|
|
|
'' + lib.optionalString forceInstallAllHacks ''
|
2021-04-13 19:44:15 +00:00
|
|
|
make -j$NIX_BUILD_CORES -C hacks/glx dnalogo
|
|
|
|
cat hacks/Makefile.in \
|
|
|
|
| grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -C hacks
|
|
|
|
cat hacks/glx/Makefile.in \
|
|
|
|
| grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -j$NIX_BUILD_CORES -C hacks/glx
|
|
|
|
cp -f $(find hacks -type f -perm -111 "!" -name "*.*" ) "$out/libexec/xscreensaver"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.jwz.org/xscreensaver/";
|
|
|
|
description = "A set of screensavers";
|
2021-04-13 19:44:15 +00:00
|
|
|
license = lib.licenses.mit;
|
2021-01-17 00:15:33 +00:00
|
|
|
maintainers = with lib.maintainers; [ raskin ];
|
|
|
|
platforms = lib.platforms.unix; # Once had cygwin problems
|
2020-04-24 23:36:52 +00:00
|
|
|
downloadPage = "https://www.jwz.org/xscreensaver/download.html";
|
|
|
|
updateWalker = true;
|
|
|
|
};
|
|
|
|
}
|