nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix

64 lines
2.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, bc, perl, perlPackages, pam, libXext, libXScrnSaver, libX11
2019-11-10 16:44:34 +00:00
, libXrandr, libXmu, libXxf86vm, libXrender, libXxf86misc, libjpeg, libGLU, libGL, gtk2
2016-06-10 13:51:19 +01:00
, libxml2, libglade, intltool, xorg, makeWrapper, gle
, forceInstallAllHacks ? false
}:
stdenv.mkDerivation rec {
2020-03-26 06:13:34 +00:00
version = "5.44";
pname = "xscreensaver";
src = fetchurl {
url = "https://www.jwz.org/${pname}/${pname}-${version}.tar.gz";
2020-03-26 06:13:34 +00:00
sha256 = "15bv05vpfjwsrqbazrjmm382jd7vvw0mp6y9vasn6wvxzjf0in3k";
};
buildInputs =
2019-11-10 16:44:34 +00:00
[ pkgconfig bc perl libjpeg libGLU libGL gtk2 libxml2 libglade pam
libXext libXScrnSaver libX11 libXrandr libXmu libXxf86vm libXrender
2016-06-10 13:51:19 +01:00
libXxf86misc intltool xorg.appres makeWrapper gle
];
preConfigure =
2012-07-17 11:14:41 +01:00
''
# Fix installation paths for GTK resources.
2012-07-17 11:14:41 +01:00
sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' \
-i driver/Makefile.in po/Makefile.in.in
2012-07-17 11:14:41 +01:00
'';
configureFlags =
[ "--with-gl" "--with-pam" "--with-pixbuf" "--with-proc-interrupts"
"--with-dpms-ext" "--with-randr-ext" "--with-xinerama-ext"
"--with-xf86vmode-ext" "--with-xf86gamma-ext" "--with-randr-ext"
2016-06-10 13:51:19 +01:00
"--with-xshm-ext" "--with-xdbe-ext"
"--with-x-app-defaults=\${out}/share/xscreensaver/app-defaults"
];
postInstall = ''
wrapProgram $out/bin/xscreensaver-text \
--prefix PATH : ${stdenv.lib.makeBinPath [xorg.appres]}
wrapProgram $out/bin/xscreensaver-getimage-file \
--set PERL5LIB "$out/${perlPackages.perl.libPrefix}:${with perlPackages; makePerlPath [
EncodeLocale HTTPDate HTTPMessage IOSocketSSL LWP LWPProtocolHttps
MozillaCA NetHTTP NetSSLeay TryTiny URI
]}"
''
+ stdenv.lib.optionalString forceInstallAllHacks ''
make -C hacks/glx dnalogo
cat hacks/Makefile.in | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -C hacks
cat hacks/glx/Makefile.in | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1 | xargs make -C hacks/glx
cp -f $(find hacks -type f -perm -111 "!" -name "*.*" ) "$out/libexec/xscreensaver"
''
;
meta = {
2020-03-26 06:13:34 +00:00
homepage = "https://www.jwz.org/xscreensaver/";
description = "A set of screensavers";
maintainers = with stdenv.lib.maintainers; [ raskin ];
platforms = stdenv.lib.platforms.unix; # Once had cygwin problems
2014-09-02 11:25:04 +01:00
inherit version;
downloadPage = "https://www.jwz.org/xscreensaver/download.html";
2014-09-02 11:25:04 +01:00
updateWalker = true;
};
}