From 9b2659eec785c655192b7f1b23f27634a763aef3 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Fri, 25 Jan 2008 14:16:25 +0000 Subject: [PATCH] Merged with trunk again svn path=/nixpkgs/branches/stdenv-updates/; revision=10295 --- .../version-management/monotone/default.nix | 10 ++++ pkgs/data/documentation/man-pages/default.nix | 11 ++-- pkgs/development/compilers/jdk/default-5.nix | 2 +- .../compilers/jdk/jdk5-sun-linux.nix | 8 +-- .../libraries/haskell/HDBC/HDBC-1.1.4.nix | 10 ++++ .../haskell/HDBC/HDBC-postgresql-1.1.4.0.nix | 12 +++++ .../haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix | 12 +++++ .../libraries/haskell/cabal/cabal.nix | 2 +- .../libraries/haskell/gtk2hs/default.nix | 14 ++--- pkgs/os-specific/linux/nvidia/default.nix | 4 +- pkgs/servers/samba/default.nix | 1 + pkgs/tools/misc/mc/default.nix | 1 - pkgs/tools/misc/rlwrap/0.28.nix | 23 +++++++++ pkgs/tools/networking/smbfs-fuse/0.8.7.nix | 29 +++++++++++ pkgs/top-level/all-packages.nix | 51 +++++++++++++++++-- pkgs/top-level/template.nix | 45 ---------------- 16 files changed, 169 insertions(+), 66 deletions(-) create mode 100644 pkgs/applications/version-management/monotone/default.nix create mode 100644 pkgs/development/libraries/haskell/HDBC/HDBC-1.1.4.nix create mode 100644 pkgs/development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix create mode 100644 pkgs/development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix create mode 100644 pkgs/tools/misc/rlwrap/0.28.nix create mode 100644 pkgs/tools/networking/smbfs-fuse/0.8.7.nix delete mode 100644 pkgs/top-level/template.nix diff --git a/pkgs/applications/version-management/monotone/default.nix b/pkgs/applications/version-management/monotone/default.nix new file mode 100644 index 000000000000..fc2339af6a55 --- /dev/null +++ b/pkgs/applications/version-management/monotone/default.nix @@ -0,0 +1,10 @@ +{stdenv, fetchurl, boost, zlib}: + +stdenv.mkDerivation { + name = "monotone-0.38"; + src = fetchurl { + url = http://monotone.ca/downloads/0.38/monotone-0.38.tar.gz; + md5 = "c1a0d2619f451a664289b042c104860d"; + }; + buildInputs = [boost zlib]; +} diff --git a/pkgs/data/documentation/man-pages/default.nix b/pkgs/data/documentation/man-pages/default.nix index 6a553b86e299..6adf90344742 100644 --- a/pkgs/data/documentation/man-pages/default.nix +++ b/pkgs/data/documentation/man-pages/default.nix @@ -1,14 +1,19 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "man-pages-2.43"; + name = "man-pages-2.74"; src = fetchurl { - url = ftp://ftp.win.tue.nl/pub/linux-local/manpages/man-pages-2.43.tar.gz; - sha256 = "01dibzkssaq0ssq61adhmri29ws9jbhbn2yxmjvb3gg8q7gjah9w"; + url = ftp://ftp.win.tue.nl/pub/linux-local/manpages/man-pages-2.74.tar.gz; + sha256 = "1k6hf6va29gnf2c9kpwd6w555gp1vimf73ac2ij2j7dqx64hy7s7"; }; preBuild = " makeFlagsArray=(MANDIR=$out/share/man) "; + + meta = { + description = "Linux development manual pages"; + homepage = ftp://ftp.win.tue.nl/pub/linux-local/manpages/; + }; } diff --git a/pkgs/development/compilers/jdk/default-5.nix b/pkgs/development/compilers/jdk/default-5.nix index 1cb83ca5ddc7..9fb52378b3f7 100644 --- a/pkgs/development/compilers/jdk/default-5.nix +++ b/pkgs/development/compilers/jdk/default-5.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl, unzip}: -if stdenv.system == "i686-linux" +if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then (import ./jdk5-sun-linux.nix) { inherit stdenv fetchurl unzip; diff --git a/pkgs/development/compilers/jdk/jdk5-sun-linux.nix b/pkgs/development/compilers/jdk/jdk5-sun-linux.nix index 479a5a456af4..6521bb779f20 100644 --- a/pkgs/development/compilers/jdk/jdk5-sun-linux.nix +++ b/pkgs/development/compilers/jdk/jdk5-sun-linux.nix @@ -8,16 +8,16 @@ */ {stdenv, fetchurl, unzip}: -assert stdenv.system == "i686-linux"; +assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; stdenv.mkDerivation { name = "jdk-1.5.0_14"; filename = "jdk-1_5_0_14"; dirname = "jdk1.5.0_14"; builder = ./builder.sh; - pathname = "/tmp/jdk-1_5_0_14-linux-i586.bin"; - md5 = "32df8f2be09c3a0f39da1b3869164b55"; - stdenv = stdenv; + pathname = if stdenv.system == "x86_64-linux" then "/tmp/jdk-1_5_0_14-linux-amd64.bin" else "/tmp/jdk-1_5_0_14-linux-i586.bin"; + md5 = if stdenv.system == "x86_64-linux" then "9dc74d939dd42988280f2c22ab9521bf" else "32df8f2be09c3a0f39da1b3869164b55"; + stdenv = stdenv; inherit unzip; } diff --git a/pkgs/development/libraries/haskell/HDBC/HDBC-1.1.4.nix b/pkgs/development/libraries/haskell/HDBC/HDBC-1.1.4.nix new file mode 100644 index 000000000000..429407d25d2a --- /dev/null +++ b/pkgs/development/libraries/haskell/HDBC/HDBC-1.1.4.nix @@ -0,0 +1,10 @@ +{cabal}: + +cabal.mkDerivation (self : { + pname = "HDBC"; + version = "1.1.4"; + sha256 = "de03020874b532f7aa734f093caf0709e7d33d0d64c59ce0a003b2269fc85597"; + meta = { + description = "HDBC provides an abstraction layer between Haskell programs and SQL relational databases"; + }; +}) diff --git a/pkgs/development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix b/pkgs/development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix new file mode 100644 index 000000000000..d9a1985839c5 --- /dev/null +++ b/pkgs/development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix @@ -0,0 +1,12 @@ +{cabal, HDBC, postgresql}: + +cabal.mkDerivation (self : { + pname = "HDBC-postgresql"; + version = "1.1.4.0"; + sha256 = "039eae03693330fee0e4083e22d502f94865969b243744a939786f598aec34ad"; + meta = { + description = "This package provides a PostgreSQL driver for HDBC"; + }; + propagatedBuildInputs = [HDBC postgresql]; +}) + diff --git a/pkgs/development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix b/pkgs/development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix new file mode 100644 index 000000000000..b0c7eb27e6a3 --- /dev/null +++ b/pkgs/development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix @@ -0,0 +1,12 @@ +{cabal, HDBC, sqlite}: + +cabal.mkDerivation (self : { + pname = "HDBC-sqlite3"; + version = "1.1.4.0"; + sha256 = "328fed8d4cdba4311efd50d9d60591a81481317ddba10c58fbaa2ec7f418f788"; + meta = { + description = "This is the Sqlite v3 driver for HDBC, the generic database access system for Haskell"; + }; + propagatedBuildInputs = [HDBC sqlite]; +}) + diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix index 1e08a819c0ec..bafcedced635 100644 --- a/pkgs/development/libraries/haskell/cabal/cabal.nix +++ b/pkgs/development/libraries/haskell/cabal/cabal.nix @@ -49,7 +49,7 @@ attrs : for i in ${toString self.patchLibFiles}; do echo "patching $i" - test -f $i && sed -i '/extra-libraries/ { s|\( *\)extra-libraries.*|&\n\1extra-lib-dirs: ${toString self.extraLibDirs}| }' $i + test -f $i && sed -i '/[eE]xtra-[lL]ibraries/ { s|\( *\)[eE]xtra-[lL]ibraries.*|&\n\1extra-lib-dirs: ${toString self.extraLibDirs}| }' $i done for i in Setup.hs Setup.lhs; do test -f $i && ghc --make $i diff --git a/pkgs/development/libraries/haskell/gtk2hs/default.nix b/pkgs/development/libraries/haskell/gtk2hs/default.nix index f4e3a02c73f8..e49f4d7113ec 100644 --- a/pkgs/development/libraries/haskell/gtk2hs/default.nix +++ b/pkgs/development/libraries/haskell/gtk2hs/default.nix @@ -1,18 +1,20 @@ {stdenv, fetchurl, pkgconfig, ghc, gtk, cairo, GConf, libglade , glib, libgtkhtml, gtkhtml}: -stdenv.mkDerivation { - name = "gtk2hs-0.9.12.1"; +stdenv.mkDerivation (rec { + pname = "gtk2hs"; + version = "0.9.12.1"; + fname = "${pname}-${version}"; + name = "haskell-${fname}"; src = fetchurl { - url = mirror://sourceforge/gtk2hs/gtk2hs-0.9.12.1.tar.gz; + url = "mirror://sourceforge/${pname}/${fname}.tar.gz"; sha256 = "110z6v9gzhg6nzlz5gs8aafmipbva6rc50b8z1jgq0k2g25hfy22"; }; buildInputs = [pkgconfig ghc gtk glib cairo GConf libglade libgtkhtml gtkhtml]; - configureFlags = [ + configureFlags = [ "--enable-cairo" ]; - -} +}) diff --git a/pkgs/os-specific/linux/nvidia/default.nix b/pkgs/os-specific/linux/nvidia/default.nix index 11906b606583..c8eaa0a8936e 100644 --- a/pkgs/os-specific/linux/nvidia/default.nix +++ b/pkgs/os-specific/linux/nvidia/default.nix @@ -2,7 +2,7 @@ let - versionNumber = "169.07"; + versionNumber = "169.09"; in @@ -12,7 +12,7 @@ stdenv.mkDerivation { src = fetchurl { url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg1.run"; - sha256 = "1q4sbwcf24rvx72sj19pvhsmg5n8v2rfzsxf56mfxjbiy2jhjbaa"; + sha256 = "1m3k2jyxi3xxpm6890y0d97jisnxiyyay59ss2r9abyvpkv3by8i"; }; #xenPatch = ./nvidia-2.6.24-xen.patch; diff --git a/pkgs/servers/samba/default.nix b/pkgs/servers/samba/default.nix index db001c64b9d3..bde546aafd14 100644 --- a/pkgs/servers/samba/default.nix +++ b/pkgs/servers/samba/default.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [readline pam openldap kerberos popt iniparser libunwind fam]; configureFlags = ''--with-pam --with-smbmount --datadir=$out/share --with-aio-support --with-libiconv=${stdenv.gcc.libc}''; + postUnpack = "sourceRoot=\$sourceRoot/source"; postInstall = ''rm -rf $out/var ; ln -s /var/samba $out/var ''; } diff --git a/pkgs/tools/misc/mc/default.nix b/pkgs/tools/misc/mc/default.nix index 5a9e994b4dfc..e5cce46bba85 100644 --- a/pkgs/tools/misc/mc/default.nix +++ b/pkgs/tools/misc/mc/default.nix @@ -13,4 +13,3 @@ stdenv.mkDerivation rec { homepage = http://www.ibiblio.org/mc; }; } - diff --git a/pkgs/tools/misc/rlwrap/0.28.nix b/pkgs/tools/misc/rlwrap/0.28.nix new file mode 100644 index 000000000000..695c077ce675 --- /dev/null +++ b/pkgs/tools/misc/rlwrap/0.28.nix @@ -0,0 +1,23 @@ +args : with args; with builderDefs {src="";} null; + let localDefs = builderDefs { + src = /* put a fetchurl here */ + fetchurl { + url = ftp://ftp.chg.ru/mirrors/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/rlwrap-0.28.tar.gz; + sha256 = "07jzhcqzb8jsmsscc28dk4md7swnhn3vyai5fpxwdj6a1kbn4y3p"; + }; + + buildInputs = [readline ]; + configureFlags = []; + } null; /* null is a terminator for sumArgs */ + in with localDefs; +stdenv.mkDerivation rec { + name = "rlwrap-"+version; + builder = writeScript (name + "-builder") + (textClosure localDefs + [doConfigure doMakeInstall doForceShare doPropagate]); + meta = { + description = " + Readline wrapper for console programs. +"; + }; +} diff --git a/pkgs/tools/networking/smbfs-fuse/0.8.7.nix b/pkgs/tools/networking/smbfs-fuse/0.8.7.nix new file mode 100644 index 000000000000..9762358b80ef --- /dev/null +++ b/pkgs/tools/networking/smbfs-fuse/0.8.7.nix @@ -0,0 +1,29 @@ +args : with args; with builderDefs {src="";} null; + let localDefs = builderDefs { + src = /* put a fetchurl here */ + fetchurl { + url = http://www.ricardis.tudelft.nl/~vincent/fusesmb/download/fusesmb-0.8.7.tar.gz; + sha256 = "12gz2gn9iqjg27a233dn2wij7snm7q56h97k6gks0yijf6xcnpz1"; + }; + + buildInputs = [samba fuse]; + configureFlags = []; + postInstall = FullDepEntry + ('' + ensureDir $out/lib + ln -fs ${samba}/lib/libsmbclient.so $out/lib/libsmbclient.so.0 + '') + [ "minInit" "defEnsureDir" "doMakeInstall"]; + } null; /* null is a terminator for sumArgs */ + in with localDefs; +stdenv.mkDerivation rec { + name = "smbfs-fuse-"+version; + builder = writeScript (name + "-builder") + (textClosure localDefs + [doConfigure doMakeInstall postInstall doForceShare doPropagate]); + meta = { + description = " + Samba mounted via FUSE. +"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f159e6a1a559..c71f808ffb88 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -217,7 +217,7 @@ rec { else x); builderDefs = lib.sumArgs (import ./builder-defs.nix) { - inherit stringsWithDeps lib stdenv writeScript; + inherit stringsWithDeps lib stdenv writeScript fetchurl; }; stringsWithDeps = import ../lib/strings-with-deps.nix { @@ -723,6 +723,13 @@ rec { }; */ + rlwrapFun = lib.sumArgs (selectVersion ../tools/misc/rlwrap) { + version = "0.28"; + inherit builderDefs readline; + }; + + rlwrap = rlwrapFun null; + rpm = import ../tools/package-management/rpm { inherit fetchurl stdenv cpio zlib bzip2 file sqlite beecrypt neon elfutils; }; @@ -743,6 +750,13 @@ rec { inherit fetchurl stdenv; }; + smbfsFuseFun = lib.sumArgs (selectVersion ../tools/networking/smbfs-fuse) { + version = "0.8.7"; + inherit builderDefs samba fuse; + }; + + smbfsFuse = smbfsFuseFun null; + sudo = import ../tools/security/sudo { inherit fetchurl stdenv coreutils pam; }; @@ -1042,6 +1056,22 @@ rec { # using nvs to be able to use mtl-1.1.0.0 as name in lib.nvs "mtl-1.1.0.0" (deriv "mtl-1.1.0.0" "libraries/mtl" [ (__getAttr "base-3.0.1.0" ghc.core_libs) ]); + # this will change in the future + ghc68_extra_libs = + ghc : let + deriv = name : goSrcDir : deps : + let bd = builderDefs { + goSrcDir = "ghc-* /libraries"; + src = ghc.extra_src; + } null; in + stdenv.mkDerivation rec { + inherit name; + builder = bd.writeScript (name + "-builder") + (bd.textClosure [builderDefs.haskellBuilderDefs]); + }; + # using nvs to be able to use mtl-1.1.0.0 as name + in lib.nvs "mtl-1.1.0.0" (deriv "mtl-1.1.0.0" "libraries/mtl" [ (__getAttr "base-3.0.1.0" ghc.core_libs) ]); + # the wrappers basically does one thing: It defines GHC_PACKAGE_PATH before calling ghc{i,-pkg} # So you can have different wrappers with different library combinations # So installing ghc libraries isn't done by nix-env -i package but by adding the lib to the libraries list below @@ -1166,6 +1196,10 @@ rec { inherit stdenv perl; }; + monotone = import ../applications/version-management/monotone { + inherit stdenv fetchurl boost zlib; + }; + nasm = import ../development/compilers/nasm { inherit fetchurl stdenv; }; @@ -2735,9 +2769,20 @@ rec { }; gtk2hs = import ../development/libraries/haskell/gtk2hs { - inherit pkgconfig stdenv fetchurl cairo; + inherit pkgconfig stdenv fetchurl cairo ghc; inherit (gnome) gtk glib GConf libglade libgtkhtml gtkhtml; - ghc = ghc661; + }; + + HDBC = import ../development/libraries/haskell/HDBC/HDBC-1.1.4.nix { + inherit cabal; + }; + + HDBCPostgresql = import ../development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix { + inherit cabal HDBC postgresql; + }; + + HDBCSqlite = import ../development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix { + inherit cabal HDBC sqlite; }; pcreLight = import ../development/libraries/haskell/pcre-light { diff --git a/pkgs/top-level/template.nix b/pkgs/top-level/template.nix deleted file mode 100644 index fabd6de584a8..000000000000 --- a/pkgs/top-level/template.nix +++ /dev/null @@ -1,45 +0,0 @@ -args: -let - defList = [ -(assert false) - correct it; List element is of form ["name" default] - ]; - #stdenv and fetchurl are added automatically - getVal = (args.lib.getValue args defList); - check = args.lib.checkFlag args; - reqsList = [ -(assert false) - correct it; List element is of form ["name" "requirement-name" ... ] - ["true"] - ["false"] - ]; - buildInputsNames = args.lib.filter (x: (null!=getVal x)) - (args.lib.uniqList {inputList = - (args.lib.concatLists (map - (x:(if (x==[]) then [] else builtins.tail x)) - reqsList));}); - configFlags = [ - "true" "" -(assert false) - fill it; list consists of pairs "condition" "flags". "True" means always. - ]; - nameSuffixes = [ -(assert false) - fill it if needed, or blank it. - ]; -in - assert args.lib.checkReqs args defList reqsList; -with args; -args.stdenv.mkDerivation { - name = args.lib.condConcat " -#Fill the name // -" nameSuffixes check; - - src = args. -#Put fetcher here - - buildInputs = args.lib.filter (x: x!=null) (map getVal buildInputsNames); - configureFlags = args.lib.condConcat "" configFlags check; - - meta = { - description = " -#Fill description here -"; - }; -}