Added XScreensaver; also changed version-stub.nix (now it does sumArgs itself, and requires builderDefs to be used) and added a merge of composing-builder and declarative flag processing.

svn path=/nixpkgs/branches/stdenv-updates/; revision=9880
This commit is contained in:
Yury G. Kudryashov
2007-12-08 01:07:13 +00:00
parent f0405cf74f
commit 356c077ecf
7 changed files with 119 additions and 3 deletions

View File

@@ -0,0 +1,38 @@
args : with args; with builderDefs (args // {
src = /* put a fetchurl here */
fetchurl {
url = http://www.jwz.org/xscreensaver/xscreensaver-5.04.tar.gz;
sha256 = "1mx6zc6rvb6pr9wb6mv4ljiii9ybw0dshd74aclf7rlmfx4hn86i";
};
useConfig = true;
reqsList = [
["true" "libX11" "gtk" "pkgconfig" "bc" "perl" "intltool" "libXmu"]
["GL" "mesa"]
["GUI" "gtk" "libxml2" "libglade"]
["jpeg" "libjpeg"]
["false"]
];
configFlags = [
"GL" " --with-gl "
"gdkpixbuf" " --with-pixbuf "
"DPMS" " --with-dpms "
"true" (" --with-x-app-defaults=\$out/share/xscreensaver/app-defaults "+
" --with-hackdir=\$out/share/xscreensaver-hacks ")
];
}) null; /* null is a terminator for sumArgs */
let
preConfigure = FullDepEntry ("
sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' "+
"-i driver/Makefile.in po/Makefile.in.in;
") [minInit doUnpack];
in
stdenv.mkDerivation rec {
name = "xscreensaver-"+version;
builder = writeScript (name + "-builder")
(textClosure [preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
The X screensaver daemon. Run xscreensaver-demo to configure.
";
};
}

View File

@@ -0,0 +1,9 @@
let
realPath=y: (__toPath ((toString ./JustNothing/.. )+"/"+y.version+".nix"));
dispatch=(x: ((import (realPath x)) x));
in
args :
with args;
with builderDefs {src="";} null;
let eater=(lib.sumArgs dispatch args); in
eater