Skip to content

Commit

Permalink
Added gdmap, changed builder-defs to use derivation attribute on prop…
Browse files Browse the repository at this point in the history
…agatedBuildInputs, manually fixed Xorg expression problem for Compiz, various fixes.

svn path=/nixpkgs/trunk/; revision=9812
  • Loading branch information
7c6f434c committed Dec 1, 2007
1 parent c19cfa4 commit 1bbc6fe
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 19 deletions.
Expand Up @@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
builder = writeScript (name + "-builder")
(textClosure [doAutotools doConfigure doMakeInstall fixPkgconfig fixInterpreter doForceShare
doPropagate]);
inherit propagatedBuildInputs;
meta = {
description = "
Compiz BCOP.
Expand Down
Expand Up @@ -3,7 +3,7 @@ build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamag
*/
args: with args;
[
libXcomposite libpng libSM libXrandr libXdamage libXinerama startupnotification
libpng
GConf mesa metacity librsvg dbus dbus_glib gnomedesktop git autoconf automake
libtool libxslt libwnck intltool perl perlXMLParser compiz
]
9 changes: 6 additions & 3 deletions pkgs/applications/window-managers/compiz/0.6.2.nix
Expand Up @@ -6,15 +6,16 @@ args : with args;
sha256 = "0k58bkbyqx94ch7scvn3d26296ai9nddfb6lg8v3bhbi2zj4i2n5";
};
buildInputs = [
pkgconfig libXrender xextproto gtk libwnck GConf libgnome
pkgconfig gtk libwnck GConf libgnome
libgnomeui metacity gnomegtk glib pango libglade libgtkhtml
gtkhtml libgnomecanvas libgnomeprint libgnomeprintui gnomepanel
librsvg fuse
];
propagatedBuildInputs = [
libpng libXcomposite libXfixes libXdamage libXrandr libXinerama
libICE libSM startupnotification mesa GConf perl perlXMLParser libxslt
dbus dbus_glib
dbus dbus_glib compositeproto fixesproto damageproto randrproto
xineramaproto renderproto kbproto xextproto libXrender
];
configureFlags = ["--enable-gtk" "--enable-fuse"
"--enable-annotate" "--enable-librsvg"] ++
Expand All @@ -35,7 +36,9 @@ stdenv.mkDerivation
rec {
name = "compiz-0.6.2";
builder = writeScript (name + "-builder")
(textClosure [doPatch doConfigure doMakeInstall doForceShare postAll]);
(textClosure [doPatch doConfigure doMakeInstall doPropagate
doForceShare postAll]);
inherit propagatedBuildInputs;
meta = {
description = "
Compiz window manager
Expand Down
39 changes: 39 additions & 0 deletions pkgs/development/libraries/libdbi-drivers/0.8.2-1.nix
@@ -0,0 +1,39 @@
args : with args;
with builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = mirror://sourceforge/libdbi-drivers/libdbi-drivers-0.8.2-1.tar.gz;
sha256 = "1bflwl1k3rf1h8clx3zv5pxnm5hbhq6izikv0phkss3qxkjm61ap";
};

buildInputs = [libdbi]
++(if args ? mysql then [args.mysql] else [])
++(if args ? sqlite then [args.sqlite] else [])
;
configureFlags = [
" --enable-libdbi "
" --with-dbi-incdir=${libdbi}/include "
" --with-dbi-libdir=${libdbi}/lib "
]
++ (if args ? mysql then [
" --with-mysql "
" --with-mysql-incdir=${mysql}/include/mysql "
" --with-mysql-libdir=${mysql}/lib/mysql "
] else [])
++ (if args ? sqlite then [
" --with-sqlite "
" --with-sqlite-incdir=${sqlite}/include/sqlite "
" --with-sqlite-libdir=${sqlite}/lib/sqlite "
] else [])
;
} null; /* null is a terminator for sumArgs */
stdenv.mkDerivation rec {
name = "libdbi"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
DB independent interface to DB; DB drivers (mysql only for now).
";
};
}
21 changes: 21 additions & 0 deletions pkgs/development/libraries/libdbi/0.8.2.nix
@@ -0,0 +1,21 @@
args : with args;
with builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = mirror://sourceforge/libdbi/libdbi-0.8.2.tar.gz;
sha256 = "01zlfv9hd4iv9v1xlh64ajdgx95jb0sjpazavapqc0zwiagwcg4d";
};

buildInputs = [];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
stdenv.mkDerivation rec {
name = "libdbi"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
DB independent interface to DB.
";
};
}
21 changes: 21 additions & 0 deletions pkgs/development/libraries/libextractor/0.5.18.nix
@@ -0,0 +1,21 @@
args : with args;
with builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://gnunet.org/libextractor/download/libextractor-0.5.18.tar.gz;
sha256 = "09y869zmnr6n2953ra4y7z9m9nj23prlqa4nr4rwcb50dzdmil1k";
};

buildInputs = [ zlib];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
stdenv.mkDerivation rec {
name = "libextractor"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Libextractor - extracts metadata from files.
";
};
}
5 changes: 3 additions & 2 deletions pkgs/development/tools/misc/intltool/0.36.2.nix
Expand Up @@ -6,13 +6,14 @@ args : with args;
sha256 = "0cfblqz3k5s4rsw6rx9f5v3izsrmrs96293rb7bd02vijbah9gxj";
};

buildInputs = [perl perlXMLParser];
propagatedBuildInputs = [perl perlXMLParser];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
stdenv.mkDerivation rec {
name = "intltool-0.36.2";
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare]);
(textClosure [doConfigure doMakeInstall doPropagate doForceShare]);
inherit propagatedBuildInputs;
meta = {
description = "
Internalization tool for XML.
Expand Down
8 changes: 8 additions & 0 deletions pkgs/lib/default.nix
Expand Up @@ -251,4 +251,12 @@ rec {
debugVal = if builtins ? trace then x: (builtins.trace x x) else x: x;
debugXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x;

innerClosePropagation = ready: list: if list == [] then ready else
if (head list) ? propagatedBuildInputs then
innerClosePropagation (ready ++ [(head list)])
((head list).propagatedBuildInputs ++ (tail list)) else
innerClosePropagation (ready ++ [(head list)]) (tail list);

closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});

}
21 changes: 21 additions & 0 deletions pkgs/tools/system/gdmap/0.7.5.nix
@@ -0,0 +1,21 @@
args : with args;
with builderDefs {
src = /* put a fetchurl here */
fetchurl {
url = http://dfn.dl.sourceforge.net/sourceforge/gdmap/gdmap-0.7.5.tar.gz;
sha256 = "0vxfgz1bq0jvny6dy7dkzg2kl56plrxby6c4y5d6bv4bq2xd6v26";
};

buildInputs = [gtk pkgconfig libxml2 intltool];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
stdenv.mkDerivation rec {
name = "gdmap"+version;
builder = writeScript (name + "-builder")
(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Recursive rectangle map of disk usage.
";
};
}
66 changes: 63 additions & 3 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -455,6 +455,16 @@ rec {
inherit fetchurl stdenv;
});

gdmapFun = lib.sumArgs (selectVersion ../tools/system/gdmap) {
inherit stdenv fetchurl builderDefs pkgconfig libxml2
intltool;
inherit (gtkLibs) gtk;
};

gdmap = gdmapFun {
version = "0.7.5";
} null;

getopt = import ../tools/misc/getopt {
inherit fetchurl stdenv;
};
Expand Down Expand Up @@ -537,6 +547,18 @@ rec {
inherit fetchurl stdenv ocaml;
};

/*hyppocampusFun = lib.sumArgs ( selectVersion ../tools/misc/hyppocampus ) {
inherit builderDefs stdenv fetchurl libdbi libdbiDrivers fuse
pkgconfig perl gettext dbus dbus_glib pcre libscd;
inherit (gtkLibs) glib;
bison = bison23;
flex = flex2533;
};
hyppocampus = hyppocampusFun {
version = "0.3rc1";
} null;*/

jdiskreport = import ../tools/misc/jdiskreport {
inherit fetchurl stdenv unzip jdk;
};
Expand Down Expand Up @@ -1946,6 +1968,25 @@ rec {
inherit fetchurl stdenv;
};

libdbiFun = lib.sumArgs (selectVersion ../development/libraries/libdbi) {
inherit stdenv fetchurl builderDefs;
};

libdbi = libdbiFun {
version = "0.8.2";
} null;

libdbiDriversFun = lib.sumArgs (selectVersion ../development/libraries/libdbi-drivers) {
inherit stdenv fetchurl builderDefs libdbi;
};

libdbiDrivers = libdbiDriversFun {
version = "0.8.2-1";
mysql = mysql5;
inherit sqlite;
} null;


libdrm = import ../development/libraries/libdrm {
inherit fetchurl stdenv;
};
Expand All @@ -1970,6 +2011,15 @@ rec {
inherit fetchurl stdenv gettext;
};

libextractorFun = lib.sumArgs (selectVersion ../development/libraries/libextractor)
{
inherit fetchurl stdenv builderDefs zlib;
};

libextractor = libextractorFun {
version = "0.5.18";
} null;

libgcrypt = import ../development/libraries/libgcrypt {
inherit fetchurl stdenv libgpgerror;
};
Expand Down Expand Up @@ -2034,6 +2084,14 @@ rec {
inherit fetchurl stdenv zlib;
};

/*libscdFun = lib.sumArgs (selectVersion ../development/libraries/libscd) {
inherit stdenv fetchurl builderDefs libextractor perl pkgconfig;
};
libscd = libscdFun {
version = "0.4.2";
} null;*/

libsigcxx = import ../development/libraries/libsigcxx {
inherit fetchurl stdenv pkgconfig;
};
Expand Down Expand Up @@ -3572,7 +3630,7 @@ rec {
libjpeg libpng zlib /* smpeg sdl */;
inherit (xlibs) inputproto libXi;
lib = lib_unstable;
python = python25;
python = python_alts.v_2_5;
freealut = freealut_soft;
openal = openalSoft;
stdenv = stdenvUsingSetupNew2;
Expand Down Expand Up @@ -3634,7 +3692,8 @@ rec {
inherit lib builderDefs stringsWithDeps;
inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt;
inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
libXinerama libICE libSM libXrender xextproto;
libXinerama libICE libSM libXrender xextproto compositeproto fixesproto
damageproto randrproto xineramaproto renderproto kbproto;
inherit (gnome) startupnotification libwnck GConf;
inherit (gtkLibs) gtk;
inherit (gnome) libgnome libgnomeui metacity
Expand Down Expand Up @@ -4505,7 +4564,7 @@ rec {
inherit
fetchurl fetchsvn zlib perl openssl pcre pkgconfig libjpeg libpng libtiff
libxml2 libxslt libtool libusb expat freetype bzip2 cmake cluceneCore libgcrypt gnupg
cppunit cyrus_sasl openldap enchant openexr exiv2 samba nss log4cxx aspell
cppunit cyrus_sasl openldap enchant exiv2 samba nss log4cxx aspell
shared_mime_info alsaLib libungif cups mesa boost gpgme gettext redland
xineLib libgphoto2 djvulibre libogg flac lame libvorbis poppler readline
saneBackends chmlib python libzip gmp sqlite libidn runCommand lib
Expand All @@ -4522,6 +4581,7 @@ rec {
qt = qt4;
dbus = dbus_alts.withX11;
bison = bison23;
openexr = openexr_1_6_1 ;
});

kdebase = import ../desktops/kde/kdebase {
Expand Down
18 changes: 8 additions & 10 deletions pkgs/top-level/builder-defs.nix
Expand Up @@ -3,6 +3,8 @@ args: with args; with stringsWithDeps; with lib;
{
inherit writeScript;



forceShare = if args ? forceShare then args.forceShare else ["man" "doc" "info"];

archiveType = s:
Expand Down Expand Up @@ -107,18 +109,10 @@ args: with args; with stringsWithDeps; with lib;
if test -f \$pkg/nix-support/setup-hook; then
source \$pkg/nix-support/setup-hook
fi
if test -f \$pkg/nix-support/propagated-build-inputs; then
for i in \$(cat \$pkg/nix-support/propagated-build-inputs); do
findInputs \$i
done
fi
}
pkgs=\"\"
for i in \$NIX_GCC ${toString buildInputs} ${toString
(if (args ? propagatedBuildInputs) then
args.propagatedBuildInputs else "")}; do
for i in \$NIX_GCC ${toString buildInputs}; do
findInputs \$i
done
Expand Down Expand Up @@ -287,7 +281,11 @@ args: with args; with stringsWithDeps; with lib;
autoConfigureFlags = condConcat "" configFlags check;
autoMakeFlags = condConcat "" buildFlags check;
useConfig = getAttr ["useConfig"] false args;
buildInputs = if useConfig then autoBuildInputs else getAttr ["buildInputs"] [] args;
buildInputs =
lib.closePropagation ((if useConfig then
autoBuildInputs else
getAttr ["buildInputs"] [] args)++
(getAttr ["propagatedBuildInputs"] [] args));
configureFlags = if useConfig then autoConfigureFlags else
getAttr ["configureFlags"] "" args;
makeFlags = if useConfig then autoMakeFlags else getAttr ["makeFlags"] "" args;
Expand Down

0 comments on commit 1bbc6fe

Please sign in to comment.