2021-10-15 15:18:23 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper
|
2021-04-11 20:05:23 +00:00
|
|
|
, pkg-config, intltool
|
2022-06-06 03:02:46 +00:00
|
|
|
, perl, perlPackages, gettext, libX11, libXext, libXi, libXt
|
2021-04-11 20:05:23 +00:00
|
|
|
, libXft, libXinerama, libXrandr, libXxf86vm, libGL, libGLU, gle
|
|
|
|
, gtk2, gdk-pixbuf, gdk-pixbuf-xlib, libxml2, pam
|
2021-10-15 15:18:23 +00:00
|
|
|
, systemd, coreutils
|
2016-06-10 15:51:18 +00:00
|
|
|
, forceInstallAllHacks ? false
|
2021-04-11 20:05:23 +00:00
|
|
|
, withSystemd ? stdenv.isLinux
|
2011-02-14 13:44:01 +00:00
|
|
|
}:
|
2010-01-26 21:40:32 +00:00
|
|
|
|
2010-08-13 14:06:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-03-03 08:08:20 +00:00
|
|
|
version = "6.03";
|
2019-07-06 00:20:54 +00:00
|
|
|
pname = "xscreensaver";
|
2010-01-26 21:40:32 +00:00
|
|
|
|
2010-08-13 14:06:23 +00:00
|
|
|
src = fetchurl {
|
2019-07-06 00:20:54 +00:00
|
|
|
url = "https://www.jwz.org/${pname}/${pname}-${version}.tar.gz";
|
2022-03-03 08:08:20 +00:00
|
|
|
sha256 = "sha256-Mo1ReXNSrPWMpbq0nnb78mA058rXhfZR6hHOe0P7olo=";
|
2010-01-26 21:40:32 +00:00
|
|
|
};
|
|
|
|
|
2021-04-11 20:05:23 +00:00
|
|
|
nativeBuildInputs = [
|
2021-10-15 15:18:23 +00:00
|
|
|
pkg-config intltool makeWrapper
|
2021-04-11 20:05:23 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
perl gettext libX11 libXext libXi libXt
|
|
|
|
libXft libXinerama libXrandr libXxf86vm libGL libGLU gle
|
|
|
|
gtk2 gdk-pixbuf gdk-pixbuf-xlib libxml2 pam
|
2022-06-06 03:02:46 +00:00
|
|
|
perlPackages.LWPProtocolHttps perlPackages.MozillaCA
|
2021-04-11 20:05:23 +00:00
|
|
|
] ++ 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-11-12 00:02:36 +00:00
|
|
|
|
|
|
|
# "marbling" has NEON code that mixes signed and unsigned vector types
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optional (with stdenv.hostPlatform; isAarch64 || isAarch32) "-flax-vector-conversions";
|
2021-04-11 20:05:23 +00:00
|
|
|
|
2021-10-15 15:18:23 +00:00
|
|
|
postInstall = ''
|
|
|
|
for bin in $out/bin/*; do
|
|
|
|
wrapProgram "$bin" \
|
|
|
|
--prefix PATH : "$out/libexec/xscreensaver" \
|
2022-06-06 03:02:46 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ coreutils perl ]}" \
|
|
|
|
--prefix PERL5LIB ':' $PERL5LIB
|
2021-10-15 15:18:23 +00:00
|
|
|
done
|
|
|
|
'' + lib.optionalString forceInstallAllHacks ''
|
2021-04-11 20:05:23 +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"
|
|
|
|
'';
|
2016-05-09 05:12:46 +00:00
|
|
|
|
2010-01-26 21:40:32 +00:00
|
|
|
meta = {
|
2020-03-26 06:13:34 +00:00
|
|
|
homepage = "https://www.jwz.org/xscreensaver/";
|
2010-01-26 21:40:32 +00:00
|
|
|
description = "A set of screensavers";
|
2021-04-11 20:05:23 +00:00
|
|
|
license = lib.licenses.mit;
|
2021-01-15 13:21:58 +00:00
|
|
|
maintainers = with lib.maintainers; [ raskin ];
|
|
|
|
platforms = lib.platforms.unix; # Once had cygwin problems
|
2018-01-05 19:42:46 +00:00
|
|
|
downloadPage = "https://www.jwz.org/xscreensaver/download.html";
|
2010-01-26 21:40:32 +00:00
|
|
|
};
|
2010-08-13 14:06:23 +00:00
|
|
|
}
|