2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, coreutils
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gdk-pixbuf-xlib
|
|
|
|
, gettext
|
|
|
|
, gle
|
|
|
|
, gtk3
|
|
|
|
, intltool
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
|
|
|
, libX11
|
|
|
|
, libXext
|
|
|
|
, libXft
|
|
|
|
, libXi
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, libXt
|
|
|
|
, libXxf86vm
|
|
|
|
, libxml2
|
|
|
|
, makeWrapper
|
|
|
|
, pam
|
|
|
|
, perlPackages
|
|
|
|
, pkg-config
|
|
|
|
, systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
, forceInstallAllHacks ? false
|
2023-02-02 18:25:31 +00:00
|
|
|
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xscreensaver";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "6.06";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-04-29 16:46:19 +00:00
|
|
|
url = "https://www.jwz.org/xscreensaver/xscreensaver-${finalAttrs.version}.tar.gz";
|
|
|
|
hash = "sha256-9TT6uFqDbeW4vo6R/CG4DKfWpO2ThuviB9S+ek50mac=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
nativeBuildInputs = [
|
2023-04-29 16:46:19 +00:00
|
|
|
intltool
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
2021-04-13 19:44:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-04-29 16:46:19 +00:00
|
|
|
gdk-pixbuf
|
|
|
|
gdk-pixbuf-xlib
|
|
|
|
gettext
|
|
|
|
gle
|
|
|
|
gtk3
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libXft
|
|
|
|
libXi
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
libXt
|
|
|
|
libXxf86vm
|
|
|
|
libxml2
|
|
|
|
pam
|
|
|
|
perlPackages.LWPProtocolHttps
|
|
|
|
perlPackages.MozillaCA
|
|
|
|
perlPackages.perl
|
|
|
|
]
|
|
|
|
++ lib.optional withSystemd systemd;
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
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-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
# "marbling" has NEON code that mixes signed and unsigned vector types
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch "-flax-vector-conversions";
|
2021-04-13 19:44:15 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
for bin in $out/bin/*; do
|
|
|
|
wrapProgram "$bin" \
|
|
|
|
--prefix PATH : "$out/libexec/xscreensaver" \
|
2023-04-29 16:46:19 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ coreutils perlPackages.perl ]}" \
|
2022-06-16 17:23:12 +00:00
|
|
|
--prefix PERL5LIB ':' $PERL5LIB
|
2021-10-28 06:52:43 +00:00
|
|
|
done
|
2023-04-29 16:46:19 +00:00
|
|
|
''
|
|
|
|
+ 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";
|
|
|
|
downloadPage = "https://www.jwz.org/xscreensaver/download.html";
|
2023-04-29 16:46:19 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ raskin AndersonTorres ];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-04-29 16:46:19 +00:00
|
|
|
})
|