From 47de42835afe2b401c18f6c803100af28c5e176b Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 20:14:09 +0000 Subject: [PATCH 01/48] * Add https support for mercurial. svn path=/nixpkgs/trunk/; revision=18345 --- pkgs/top-level/all-packages.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd8d1968ec5..75e017c7151 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7265,8 +7265,12 @@ let }; mercurial = import ../applications/version-management/mercurial { - inherit fetchurl stdenv python makeWrapper getConfig tk; + inherit fetchurl stdenv makeWrapper getConfig tk; guiSupport = getConfig ["mercurial" "guiSupport"] false; # for hgk (gitk gui for hg) + python = # allow cloning sources from https servers. + if getConfig ["mercurial" "httpsSupport"] true + then pythonFull + else pythonBase; }; meshlab = import ../applications/graphics/meshlab { From 7482474aefc3435d94b6932337085727517688db Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 20:14:15 +0000 Subject: [PATCH 02/48] * Improve showVal: handle integer and strings. svn path=/nixpkgs/trunk/; revision=18346 --- pkgs/lib/debug.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix index 4f757653bc0..5d411b864ec 100644 --- a/pkgs/lib/debug.nix +++ b/pkgs/lib/debug.nix @@ -1,6 +1,6 @@ let lib = import ./default.nix; -inherit (builtins) trace attrNamesToStr isAttrs isFunction isList head substring attrNames; +inherit (builtins) trace attrNamesToStr isAttrs isFunction isList isInt isString head substring attrNames; in @@ -37,7 +37,10 @@ rec { else if x == true then "x is boolean true" else if x == false then "x is boolean false" else if x == null then "x is null" - else "x is probably a string `${substring 0 50 x}...'"; + else if isInt x then "x is an integer `${toString x}'" + else if isString x then "x is a string `${substring 0 50 x}...'" + else "x is probably a path `${substring 0 50 (toString x)}'"; + # trace the arguments passed to function and its result traceCall = n : f : a : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a)); traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); From c8cb5210fb3db33cffae897f19551f6827fa173d Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 20:14:21 +0000 Subject: [PATCH 03/48] * Add a fetchhg builder to checkout mercurial repositories. svn path=/nixpkgs/trunk/; revision=18347 --- pkgs/build-support/fetchhg/builder.sh | 9 +++++++++ pkgs/build-support/fetchhg/default.nix | 3 ++- pkgs/top-level/all-packages.nix | 1 - 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 pkgs/build-support/fetchhg/builder.sh diff --git a/pkgs/build-support/fetchhg/builder.sh b/pkgs/build-support/fetchhg/builder.sh new file mode 100644 index 00000000000..fbdd12b4f05 --- /dev/null +++ b/pkgs/build-support/fetchhg/builder.sh @@ -0,0 +1,9 @@ +source $stdenv/setup + +header "getting $url${tag:+ ($tag)} into $out" + +hg clone ${tag:+-r "$tag"} "$url" "$out" + +rm -rf "$out/.hg" + +stopNest diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix index a7696458856..a80835cc71f 100644 --- a/pkgs/build-support/fetchhg/default.nix +++ b/pkgs/build-support/fetchhg/default.nix @@ -1,7 +1,8 @@ {stdenv, mercurial, nix}: {url, tag ? null, md5}: +# TODO: statically check if mercurial as the https support if the url starts woth https. stdenv.mkDerivation { - name = "fetchdarcs"; + name = "fetchhg"; builder = ./builder.sh; buildInputs = [mercurial nix]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75e017c7151..df7f82a7e06 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -290,7 +290,6 @@ let sshSupport = true; }; - # TODO do some testing fetchhg = import ../build-support/fetchhg { inherit stdenv mercurial nix; }; From da1311b8936a7d289a8c065609eecefb5939c894 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 20:14:28 +0000 Subject: [PATCH 04/48] * Add the Go Programming Language compiler. svn path=/nixpkgs/trunk/; revision=18348 --- pkgs/development/compilers/go/default.nix | 55 +++++++++++++++++++ .../go/disable-system-dependent-tests.patch | 34 ++++++++++++ ...-log-test-accept-period-in-file-path.patch | 14 +++++ pkgs/lib/maintainers.nix | 1 + pkgs/top-level/all-packages.nix | 4 ++ 5 files changed, 108 insertions(+) create mode 100644 pkgs/development/compilers/go/default.nix create mode 100644 pkgs/development/compilers/go/disable-system-dependent-tests.patch create mode 100644 pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix new file mode 100644 index 00000000000..862e69fae01 --- /dev/null +++ b/pkgs/development/compilers/go/default.nix @@ -0,0 +1,55 @@ +{stdenv, fetchhg, bison, glibc, ed, which, bash, ...}: + +let + version = "2009-11-10.1"; + md5 = "66e5803c8dc2855b339151918b6b0de5"; +in + +stdenv.mkDerivation { + name = "Go-" + version; + + # No tarball yet. + src = fetchhg { + url = https://go.googlecode.com/hg/; + tag = "release." + version; + inherit md5; + }; + + buildInputs = [ bison glibc ed which bash ]; + + patches = [ + ./disable-system-dependent-tests.patch + ./pkg-log-test-accept-period-in-file-path.patch + ]; + + prePatch = '' + patchShebangs ./ # replace /bin/bash + # only for 386 build + # !!! substituteInPlace does not seems to be effective. + sed -i 's,/lib/ld-linux.so.2,${glibc}/lib/ld-linux.so.2,' src/cmd/8l/asm.c + ''; + + GOOS = "linux"; + GOARCH = "386"; + + # The go-c interface depends on the error output of GCC. + LC_ALL = "C"; + + installPhase = '' + ensureDir "$out" + ensureDir "$out/bin" + export GOROOT="$(pwd)/" + export GOBIN="$out/bin" + export PATH="$GOBIN:$PATH" + cd ./src + ./all.bash + cd - + ''; + + meta = { + homepage = http://golang.org/; + description = "The Go Programming language"; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [ pierron ]; + }; +} diff --git a/pkgs/development/compilers/go/disable-system-dependent-tests.patch b/pkgs/development/compilers/go/disable-system-dependent-tests.patch new file mode 100644 index 00000000000..7d24b02a214 --- /dev/null +++ b/pkgs/development/compilers/go/disable-system-dependent-tests.patch @@ -0,0 +1,34 @@ +diff -r b51fd2d6c160 src/pkg/Makefile +--- a/src/pkg/Makefile Tue Nov 10 20:05:24 2009 -0800 ++++ b/src/pkg/Makefile Sat Nov 14 19:42:42 2009 +0100 +@@ -100,16 +100,19 @@ + + NOTEST=\ + debug/proc\ ++ exec\ + go/ast\ + go/doc\ + go/token\ + hash\ + image\ + malloc\ ++ os\ + rand\ + runtime\ + syscall\ + testing/iotest\ ++ time\ + + TEST=\ + $(filter-out $(NOTEST),$(DIRS)) +diff -r b51fd2d6c160 src/run.bash +--- a/src/run.bash Tue Nov 10 20:05:24 2009 -0800 ++++ b/src/run.bash Sat Nov 14 19:42:42 2009 +0100 +@@ -69,7 +69,3 @@ + ./timing.sh -test + ) || exit $? + +-(xcd ../test +-./run +-) || exit $? +- diff --git a/pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch b/pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch new file mode 100644 index 00000000000..9cfe8f68ae0 --- /dev/null +++ b/pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch @@ -0,0 +1,14 @@ +diff -r b51fd2d6c160 src/pkg/log/log_test.go +--- a/src/pkg/log/log_test.go Tue Nov 10 20:05:24 2009 -0800 ++++ b/src/pkg/log/log_test.go Sat Nov 14 20:45:04 2009 +0100 +@@ -18,8 +18,8 @@ + Rtime = `[0-9][0-9]:[0-9][0-9]:[0-9][0-9]`; + Rmicroseconds = `\.[0-9][0-9][0-9][0-9][0-9][0-9]`; + Rline = `[0-9]+:`; +- Rlongfile = `/[A-Za-z0-9_/\-]+\.go:` + Rline; +- Rshortfile = `[A-Za-z0-9_\-]+\.go:` + Rline; ++ Rlongfile = `/[A-Za-z0-9_./\-]+\.go:` + Rline; ++ Rshortfile = `[A-Za-z0-9_.\-]+\.go:` + Rline; + ) + + type tester struct { diff --git a/pkgs/lib/maintainers.nix b/pkgs/lib/maintainers.nix index 892b3e21044..9127c8c7308 100644 --- a/pkgs/lib/maintainers.nix +++ b/pkgs/lib/maintainers.nix @@ -8,6 +8,7 @@ eelco = "Eelco Dolstra "; ludo = "Ludovic Courtès "; marcweber = "Marc Weber "; + pierron = "Nicolas B. Pierron "; raskin = "Michael Raskin <7c6f434c@mail.ru>"; sander = "Sander van der Burg "; viric = "Lluís Batlle i Rossell "; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df7f82a7e06..c85804ac79d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2065,6 +2065,10 @@ let inherit cmake; }; + go = import ../development/compilers/go { + inherit stdenv fetchhg glibc bison ed which bash; + }; + gprolog = import ../development/compilers/gprolog { inherit fetchurl stdenv; }; From a61a4bc4bc2e682209e4fbb3b88d6f18d71bdfb2 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 23:39:46 +0000 Subject: [PATCH 05/48] * Fix TimeZone in The Go Programming Language. svn path=/nixpkgs/trunk/; revision=18349 --- pkgs/development/compilers/go/default.nix | 1 + .../compilers/go/disable-system-dependent-tests.patch | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix index 862e69fae01..7da02f121b3 100644 --- a/pkgs/development/compilers/go/default.nix +++ b/pkgs/development/compilers/go/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation { # only for 386 build # !!! substituteInPlace does not seems to be effective. sed -i 's,/lib/ld-linux.so.2,${glibc}/lib/ld-linux.so.2,' src/cmd/8l/asm.c + sed -i 's,/usr/share/zoneinfo/,${glibc}/share/zoneinfo/,' src/pkg/time/zoneinfo.go ''; GOOS = "linux"; diff --git a/pkgs/development/compilers/go/disable-system-dependent-tests.patch b/pkgs/development/compilers/go/disable-system-dependent-tests.patch index 7d24b02a214..550d1a4ac25 100644 --- a/pkgs/development/compilers/go/disable-system-dependent-tests.patch +++ b/pkgs/development/compilers/go/disable-system-dependent-tests.patch @@ -1,7 +1,7 @@ diff -r b51fd2d6c160 src/pkg/Makefile --- a/src/pkg/Makefile Tue Nov 10 20:05:24 2009 -0800 +++ b/src/pkg/Makefile Sat Nov 14 19:42:42 2009 +0100 -@@ -100,16 +100,19 @@ +@@ -100,16 +100,18 @@ NOTEST=\ debug/proc\ @@ -17,7 +17,6 @@ diff -r b51fd2d6c160 src/pkg/Makefile runtime\ syscall\ testing/iotest\ -+ time\ TEST=\ $(filter-out $(NOTEST),$(DIRS)) From 66ef37d2606b2ff633445ac3e852feaf6febe6ca Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 14 Nov 2009 23:39:53 +0000 Subject: [PATCH 06/48] * Fix "cgo" binary be defining LC_ALL=C inside the binary. svn path=/nixpkgs/trunk/; revision=18350 --- .../cgo-set-local-to-match-gcc-error-messages.patch | 13 +++++++++++++ pkgs/development/compilers/go/default.nix | 4 +--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch diff --git a/pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch b/pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch new file mode 100644 index 00000000000..c0da4541a67 --- /dev/null +++ b/pkgs/development/compilers/go/cgo-set-local-to-match-gcc-error-messages.patch @@ -0,0 +1,13 @@ +diff -r 21cae7efdcc6 src/cmd/cgo/main.go +--- a/src/cmd/cgo/main.go Sat Nov 14 12:23:24 2009 -0800 ++++ b/src/cmd/cgo/main.go Sun Nov 15 00:00:09 2009 +0100 +@@ -52,6 +52,9 @@ + fatal("unknown architecture %s", arch) + } + ++ // Define the language of gcc error messages. ++ os.Setenv("LC_ALL", "C"); ++ + p := openProg(input); + for _, cref := range p.Crefs { + // Convert C.ulong to C.unsigned long, etc. diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix index 7da02f121b3..ebec69535e1 100644 --- a/pkgs/development/compilers/go/default.nix +++ b/pkgs/development/compilers/go/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation { patches = [ ./disable-system-dependent-tests.patch ./pkg-log-test-accept-period-in-file-path.patch + ./cgo-set-local-to-match-gcc-error-messages.patch ]; prePatch = '' @@ -33,9 +34,6 @@ stdenv.mkDerivation { GOOS = "linux"; GOARCH = "386"; - # The go-c interface depends on the error output of GCC. - LC_ALL = "C"; - installPhase = '' ensureDir "$out" ensureDir "$out/bin" From b7ebd57d93dc3c78fc01b94455f7b29692d3f7ff Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 16 Nov 2009 08:47:31 +0000 Subject: [PATCH 07/48] mingw related stuff svn path=/nixpkgs/trunk/; revision=18369 --- pkgs/stdenv/mingw/default.nix | 11 +- pkgs/stdenv/mingw/pkgs/default.nix | 20 +- pkgs/stdenv/mingw/setup.sh | 793 ++++++++++++++++------------- 3 files changed, 479 insertions(+), 345 deletions(-) diff --git a/pkgs/stdenv/mingw/default.nix b/pkgs/stdenv/mingw/default.nix index adbae261537..bedf3986d17 100644 --- a/pkgs/stdenv/mingw/default.nix +++ b/pkgs/stdenv/mingw/default.nix @@ -38,6 +38,7 @@ let { shell = msysShell; path = [ (make + "/bin") + (tar + "/bin") (binutils + "/bin") (gccFull + "/bin") (mingwRuntimeBin + "/bin") @@ -77,7 +78,7 @@ let { * binutils is on the path because it contains dlltool, which * is invoked on the PATH by some packages. */ - initialPath = [make binutils gccFull mingwRuntimeSrc w32apiSrc msys]; + initialPath = [make tar binutils gccFull mingwRuntimeSrc w32apiSrc msys]; gcc = gccFull; shell = msysShell; inherit curl; @@ -152,7 +153,7 @@ let { src = fetchurlInit1 { url = ftp://ftp.strategoxt.org/pub/mingw/msys-1.0.11.tar.gz; - md5 = "85ce547934797019d2d642ec3b53934b"; + sha256 = "08qp4jk279i66q6ngksg58fx3cfv1r6p5n394h2kfrs56qs9zvz4"; }; }; @@ -179,6 +180,12 @@ let { inherit fetchurl; }; + tar = + (import ./pkgs).tar { + stdenv = stdenvInit2; + inherit fetchurl; + }; + binutils = (import ./pkgs).binutils { stdenv = stdenvInit2; diff --git a/pkgs/stdenv/mingw/pkgs/default.nix b/pkgs/stdenv/mingw/pkgs/default.nix index 4110e250b0e..52b68d9de24 100755 --- a/pkgs/stdenv/mingw/pkgs/default.nix +++ b/pkgs/stdenv/mingw/pkgs/default.nix @@ -28,6 +28,20 @@ rec { }; }; + /** + * Tar + */ + tar = {stdenv, fetchurl} : + stdenv.mkDerivation { + name = "mingw-tar"; + builder = ./bin-builder.sh; + src = + fetchurl { + url = ftp://ftp.strategoxt.org/pub/mingw/tar-1.22-1-msys-1.0.11-bin.tar.gz; + sha256 = "17rbv159g56q3bp8rh5vzv8hw8clxs7vk731cgqg0vy1fzls6yfq"; + }; + }; + /** * GCC. Binary */ @@ -111,13 +125,13 @@ rec { */ pkgconfigBin = {stdenv, fetchurl} : stdenv.mkDerivation { - name = "pkgconfig-0.20"; + name = "pkgconfig-0.23"; builder = ./pkgconfig-builder.sh; setupHook = ../../../development/tools/misc/pkgconfig/setup-hook.sh; src = fetchurl { - url = http://www.cs.uu.nl/people/martin/pkg-config-0.20-bin.tar.gz; - md5 = "71f9595a022619b8e8b0f7853790c4c7"; + url = ftp://ftp.strategoxt.org/pub/mingw/pkg-config-0.23-bin.tar.gz; + sha256 = "1z4zyg20g25qvx102mm2nzsxyh8fcsbz2lgi7qp32b5vrixi1037"; }; }; diff --git a/pkgs/stdenv/mingw/setup.sh b/pkgs/stdenv/mingw/setup.sh index 11705f8310f..232a3191945 100755 --- a/pkgs/stdenv/mingw/setup.sh +++ b/pkgs/stdenv/mingw/setup.sh @@ -1,11 +1,97 @@ +# Run the named hook, either by calling the function with that name or +# by evaluating the variable with that name. This allows convenient +# setting of hooks both from Nix expressions (as attributes / +# environment variables) and from shell scripts (as functions). +runHook() { + local hookName="$1" + if test "$(type -t $hookName)" = function; then + $hookName + else + eval "${!hookName}" + fi +} + + +exitHandler() { + exitCode=$? + set +e + + closeNest + + if test -n "$showBuildStats"; then + times > "$NIX_BUILD_TOP/.times" + local -a times=($(cat "$NIX_BUILD_TOP/.times")) + # Print the following statistics: + # - user time for the shell + # - system time for the shell + # - user time for all child processes + # - system time for all child processes + echo "build time elapsed: " ${times[*]} + fi + + if test $exitCode != 0; then + runHook failureHook + + # If the builder had a non-zero exit code and + # $succeedOnFailure is set, create the file + # `$out/nix-support/failed' to signal failure, and exit + # normally. Otherwise, return the original exit code. + if test -n "$succeedOnFailure"; then + echo "build failed with exit code $exitCode (ignored)" + ensureDir "$out/nix-support" + echo -n $exitCode > "$out/nix-support/failed" + exit 0 + fi + + else + runHook exitHook + fi + + exit $exitCode +} + +trap "exitHandler" EXIT + + +###################################################################### +# Helper functions that might be useful in setup hooks. + + +addToSearchPathWithCustomDelimiter() { + local delimiter=$1 + local varName=$2 + local dir=$3 + if [ -d "$dir" ]; then + eval export ${varName}=${!varName}${!varName:+$delimiter}${dir} + fi +} + +PATH_DELIMITER=':' + +addToSearchPath() { + addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@" +} + + +###################################################################### +# Initialisation. + set -e test -z $NIX_GCC && NIX_GCC=@GCC@ + +# Wildcard expansions that don't match should expand to an empty list. +# This ensures that, for instance, "for i in *; do ...; done" does the +# right thing. +shopt -s nullglob + + # Set up the initial path. PATH= for i in $NIX_GCC @INITIALPATH@; do - PATH=$PATH${PATH:+:}$i/bin + if test "$i" = /; then i=; fi + addToSearchPath PATH $i/bin done # Hack: the /tmp of Cygwin is different from the /tmp in MSYS @@ -17,12 +103,15 @@ else fi if test "$NIX_DEBUG" = "1"; then - echo "Initial path: $PATH" - echo "$buildInputs" + echo "initial path: $PATH" fi + # Execute the pre-hook. export SHELL=@SHELL@ +if test -z "$shell"; then + export shell=@SHELL@ +fi # Check that the pre-hook initialised SHELL. if test -z "$SHELL"; then echo "SHELL not set"; exit 1; fi @@ -34,40 +123,29 @@ if test -f $NIX_GCC/nix-support/setup-hook; then source $NIX_GCC/nix-support/setup-hook fi - -# Ensure that the given directory exists. + +# Ensure that the given directories exists. ensureDir() { - local dir=$1 - if ! test -x "$dir"; then mkdir -p "$dir"; fi + local dir + for dir in "$@"; do + if ! test -x "$dir"; then mkdir -p "$dir"; fi + done } - -# Called when some build action fails. If $succeedOnFailure is set, -# create the file `$out/nix-support/failed' to signal failure, and -# exit normally. Otherwise, exit with failure. -fail() { - exitCode=$? - if test "$succeedOnFailure" = 1; then - ensureDir "$out/nix-support" - touch "$out/nix-support/failed" - exit 0 - else - exit $? - fi +installBin() { + ensureDir $out/bin + cp "$@" $out/bin } # Allow the caller to augment buildInputs (it's not always possible to # do this before the call to setup.sh, since the PATH is empty at that # point; here we have a basic Unix environment). -if test -n "$addInputsHook"; then - $addInputsHook -fi +runHook addInputsHook # Recursively find all build inputs. -findInputs() -{ +findInputs() { local pkg=$1 case $pkgs in @@ -75,13 +153,13 @@ findInputs() return 0 ;; esac - + pkgs="$pkgs $pkg " 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 @@ -90,9 +168,6 @@ findInputs() } pkgs="" -if test -n "$buildinputs"; then - buildInputs="$buildinputs" # compatibility -fi for i in $buildInputs $propagatedBuildInputs; do findInputs $i done @@ -100,19 +175,14 @@ done # Set the relevant environment variables to point to the build inputs # found above. -addToEnv() -{ +addToEnv() { local pkg=$1 - if test "$ignoreFailedInputs" != "1" -a -e $1/nix-support/failed; then - echo "failed input $1" >&2 - fail - fi - if test -d $1/bin; then - export _PATH=$_PATH${_PATH:+:}$1/bin + addToSearchPath _PATH $1/bin fi + # Run the package-specific hooks set by the setup-hook scripts. for i in "${envHooks[@]}"; do $i $pkg done @@ -126,6 +196,9 @@ done # Add the output as an rpath. if test "$NIX_NO_SELF_RPATH" != "1"; then export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS" + if test -n "$NIX_LIB64_IN_SELF_RPATH"; then + export NIX_LDFLAGS="-rpath $out/lib64 $NIX_LDFLAGS" + fi fi @@ -136,33 +209,131 @@ if test -z "$NIX_STRIP_DEBUG"; then fi -# Do we know where the store is? This is required for purity checking. -if test -z "$NIX_STORE"; then - echo "Error: you have an old version of Nix that does not set the" \ - "NIX_STORE variable. Please upgrade." >&2 - exit 1 -fi - - -# We also need to know the root of the build directory for purity checking. -if test -z "$NIX_BUILD_TOP"; then - echo "Error: you have an old version of Nix that does not set the" \ - "NIX_BUILD_TOP variable. Please upgrade." >&2 - exit 1 -fi - - # Set the TZ (timezone) environment variable, otherwise commands like # `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must # be set--see zic manual page 2004'). export TZ=UTC + +# Set the prefix. This is generally $out, but it can be overriden, +# for instance if we just want to perform a test build/install to a +# temporary location and write a build report to $out. +if test -z "$prefix"; then + prefix="$out"; +fi + +if test "$useTempPrefix" = "1"; then + prefix="$NIX_BUILD_TOP/tmp_prefix"; +fi + + PATH=$_PATH${_PATH:+:}$PATH if test "$NIX_DEBUG" = "1"; then - echo "Final path: $PATH" + echo "final path: $PATH" fi +# Make GNU Make produce nested output. +export NIX_INDENT_MAKE=1 + + +###################################################################### +# Misc. helper functions. + + +stripDirs() { + local dirs="$1" + local stripFlags="$2" + local dirsNew= + + for d in ${dirs}; do + if test -d "$prefix/$d"; then + dirsNew="${dirsNew} $prefix/$d " + fi + done + dirs=${dirsNew} + + if test -n "${dirs}"; then + header "stripping (with flags $stripFlags) in $dirs" + find $dirs -type f -print0 | xargs -0 ${xargsFlags:--r} strip $stripFlags || true + stopNest + fi +} + + +###################################################################### +# Textual substitution functions. + + +substitute() { + local input="$1" + local output="$2" + + local -a params=("$@") + local -a args=() + + local n p pattern replacement varName + + for ((n = 2; n < ${#params[*]}; n += 1)); do + p=${params[$n]} + + if test "$p" = "--replace"; then + pattern="${params[$((n + 1))]}" + replacement="${params[$((n + 2))]}" + n=$((n + 2)) + fi + + if test "$p" = "--subst-var"; then + varName="${params[$((n + 1))]}" + pattern="@$varName@" + replacement="${!varName}" + n=$((n + 1)) + fi + + if test "$p" = "--subst-var-by"; then + pattern="@${params[$((n + 1))]}@" + replacement="${params[$((n + 2))]}" + n=$((n + 2)) + fi + + if test ${#args[@]} != 0; then + args[${#args[@]}]="-a" + fi + args[${#args[@]}]="$pattern" + args[${#args[@]}]="$replacement" + done + + replace-literal -e -s -- "${args[@]}" < "$input" > "$output".tmp + if test -x "$output"; then + chmod +x "$output".tmp + fi + mv -f "$output".tmp "$output" +} + + +substituteInPlace() { + local fileName="$1" + shift + substitute "$fileName" "$fileName" "$@" +} + + +substituteAll() { + local input="$1" + local output="$2" + + # Select all environment variables that start with a lowercase character. + for envVar in $(env | sed "s/^[^a-z].*//" | sed "s/^\([^=]*\)=.*/\1/"); do + if test "$NIX_DEBUG" = "1"; then + echo "$envVar -> ${!envVar}" + fi + args="$args --subst-var $envVar" + done + + substitute "$input" "$output" $args +} + + ###################################################################### # What follows is the generic builder. @@ -192,69 +363,16 @@ closeNest() { done } -trap "closeNest" EXIT - # This function is useful for debugging broken Nix builds. It dumps # all environment variables to a file `env-vars' in the build # directory. If the build fails and the `-K' option is used, you can # then go to the build directory and source in `env-vars' to reproduce # the environment used for building. -dumpVars() { +dumpVars() { + echo "Dumping env-vars to $NIX_BUILD_TOP/env-vars" if test "$noDumpEnvVars" != "1"; then - export > $NIX_BUILD_TOP/env-vars - fi -} - - -# Redirect stdout/stderr to a named pipe connected to a `tee' process -# that writes the specified file (and also to our original stdout). -# The original stdout is saved in descriptor 3. -startLog() { - local logFile=${logNr}_$1 - logNr=$((logNr + 1)) - if test "$logPhases" = 1; then - ensureDir $logDir - - exec 3>&1 - - if test "$dontLogThroughTee" != 1; then - # This required named pipes (fifos). - logFifo=$NIX_BUILD_TOP/log_fifo - test -p $logFifo || mkfifo $logFifo - startLogWrite "$logDir/$logFile" "$logFifo" - exec > $logFifo 2>&1 - else - exec > $logDir/$logFile 2>&1 - fi - fi -} - -# Factored into a separate function so that it can be overriden. -startLogWrite() { - tee "$1" < "$2" & - logWriterPid=$! -} - - -if test -z "$logDir"; then - logDir=$out/log -fi - -logNr=0 - -# Restore the original stdout/stderr. -stopLog() { - if test "$logPhases" = 1; then - exec >&3 2>&1 - - # Wait until the tee process has died. Otherwise output from - # different phases may be mixed up. - if test -n "$logWriterPid"; then - wait $logWriterPid - logWriterPid= - rm $logFifo - fi + export > "$NIX_BUILD_TOP/env-vars" fi } @@ -270,43 +388,45 @@ stripHash() { unpackFile() { - local file=$1 + curSrc="$1" local cmd - case $file in - *.tar) cmd="tar xvf $file";; - *.tar.gz | *.tgz | *.tar.Z) cmd="tar xvfz $file";; - *.tar.bz2 | *.tbz2) cmd="tar xvfj $file";; - *.zip) cmd="unzip $file";; + header "unpacking source archive $curSrc" 3 + + case "$curSrc" in + *.tar) + tar xvf $curSrc + ;; + *.tar.gz | *.tgz | *.tar.Z) + gzip -d < $curSrc | tar xvf - + ;; + *.tar.bz2 | *.tbz2) + bzip2 -d < $curSrc | tar xvf - + ;; + *.zip) + unzip $curSrc + ;; *) - if test -d "$file"; then - stripHash $file - cmd="cp -prvd $file $strippedName" + if test -d "$curSrc"; then + stripHash $curSrc + cp -prvd $curSrc $strippedName else - if test -n "$findUnpacker"; then - $findUnpacker $1; - fi if test -z "$unpackCmd"; then - echo "source archive $file has unknown type" + echo "source archive $curSrc has unknown type" exit 1 fi - cmd=$unpackCmd + runHook unpackCmd fi ;; esac - header "unpacking source archive $file (using $cmd)" 3 - $cmd || fail stopNest } -unpackW() { - if test -n "$unpackPhase"; then - $unpackPhase - return - fi - +unpackPhase() { + runHook preUnpack + if test -z "$srcs"; then if test -z "$src"; then echo 'variable $src or $srcs should point to the source' @@ -333,8 +453,8 @@ unpackW() { # Find the source directory. if test -n "$setSourceRoot"; then - $setSourceRoot - else + runHook setSourceRoot + elif test -z "$sourceRoot"; then sourceRoot= for i in *; do if test -d "$i"; then @@ -346,7 +466,7 @@ unpackW() { echo "unpacker produced multiple directories" exit 1 fi - sourceRoot=$i + sourceRoot="$i" ;; esac fi @@ -363,72 +483,40 @@ unpackW() { # By default, add write permission to the sources. This is often # necessary when sources have been copied from other store # locations. - if test "dontMakeSourcesWritable" != 1; then - chmod -R +w $sourceRoot - fi - - if test -n "$postUnpack"; then - $postUnpack - fi -} - - -unpackPhase() { - header "unpacking sources" - startLog "unpack" - unpackW - stopLog - stopNest -} - - -patchW() { - if test -n "$patchPhase"; then - $patchPhase - return + if test "$dontMakeSourcesWritable" != 1; then + chmod -R u+w "$sourceRoot" fi - for i in $patches; do - header "applying patch $i" 3 - patch -p1 < $i || fail - stopNest - done + runHook postUnpack } patchPhase() { + runHook prePatch + if test -z "$patchPhase" -a -z "$patches"; then return; fi - header "patching sources" - startLog "patch" - patchW - stopLog - stopNest + + for i in $patches; do + header "applying patch $i" 3 + local uncompress=cat + case $i in + *.gz) + uncompress="gzip -d" + ;; + *.bz2) + uncompress="bzip2 -d" + ;; + esac + $uncompress < $i | patch ${patchFlags:--p1} + stopNest + done + + runHook postPatch } -fixLibtool() { - sed 's^eval sys_lib_.*search_path=.*^^' < $1 > $1.tmp - mv $1.tmp $1 -} - - -configureW() { - if test -n "$configurePhase"; then - $configurePhase - return - fi - - if test -n "$preConfigure"; then - $preConfigure - fi - - if test -z "$prefix"; then - prefix="$out"; - fi - - if test "$useTempPrefix" = "1"; then - prefix="$NIX_BUILD_TOP/tmp_prefix"; - fi +configurePhase() { + runHook preConfigure if test -z "$configureScript"; then configureScript=./configure @@ -438,218 +526,243 @@ configureW() { fi fi - if test -z "$dontFixLibtool"; then - for i in $(find . -name "ltmain.sh"); do - echo "fixing libtool script $i" - fixLibtool $i - done - fi - if test -z "$dontAddPrefix"; then - configureFlags="--prefix=$prefix $configureFlags" + configureFlags="${prefixKey:---prefix=}$prefix $configureFlags" fi - echo "configure flags: $configureFlags" - $configureScript $configureFlags || fail - - if test -n "$postConfigure"; then - $postConfigure - fi -} - - -configurePhase() { - header "configuring" - startLog "configure" - configureW - stopLog - stopNest -} - - -buildW() { - if test -n "$buildPhase"; then - $buildPhase - return + # Add --disable-dependency-tracking to speed up some builds. + if test -z "$dontAddDisableDepTrack"; then + if grep -q dependency-tracking $configureScript; then + configureFlags="--disable-dependency-tracking $configureFlags" + fi fi - if test -n "$preBuild"; then - $preBuild + # By default, disable static builds. + if test -z "$dontDisableStatic"; then + if grep -q enable-static $configureScript; then + configureFlags="--disable-static $configureFlags" + fi fi - - echo "make flags: $makeFlags" - make $makeFlags || fail - if test -n "$postBuild"; then - $postBuild - fi + echo "configure flags: $configureFlags ${configureFlagsArray[@]}" + $configureScript $configureFlags "${configureFlagsArray[@]}" + + runHook postConfigure } buildPhase() { - if test "$dontBuild" = 1; then - return - fi - header "building" - startLog "build" - buildW - stopLog - stopNest -} + runHook preBuild - -checkW() { - if test -n "$checkPhase"; then - $checkPhase + if test -z "$makeFlags" && ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then + echo "no Makefile, doing nothing" return fi - if test -z "$checkTarget"; then - checkTarget="check" - fi + echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}" + make ${makefile:+-f $makefile} \ + $makeFlags "${makeFlagsArray[@]}" \ + $buildFlags "${buildFlagsArray[@]}" - echo "check flags: $checkFlags" - make $checkFlags $checkTarget || fail + runHook postBuild } checkPhase() { - if test "$doCheck" != 1; then - return - fi - header "checking" - startLog "check" - checkW - stopLog - stopNest + runHook preCheck + + echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}" + make ${makefile:+-f $makefile} \ + $makeFlags "${makeFlagsArray[@]}" \ + $checkFlags "${checkFlagsArray[@]}" ${checkTarget:-check} + + runHook postCheck } patchELF() { # Patch all ELF executables and shared libraries. header "patching ELF executables and libraries" - find "$prefix" \( \ - \( -type f -a -name "*.so*" \) -o \ - \( -type f -a -perm +0100 \) \ - \) -print -exec patchelf --shrink-rpath {} \; + if test -e "$prefix"; then + find "$prefix" \( \ + \( -type f -a -name "*.so*" \) -o \ + \( -type f -a -perm +0100 \) \ + \) -print -exec patchelf --shrink-rpath {} \; + fi stopNest } -installW() { - if test -n "$installPhase"; then - $installPhase - return - fi - - if test -n "$preInstall"; then - $preInstall - fi +patchShebangs() { + # Rewrite all script interpreter file names (`#! /path') under the + # specified directory tree to paths found in $PATH. E.g., + # /bin/sh will be rewritten to /nix/store/-some-bash/bin/sh. + # Interpreters that are already in the store are left untouched. + header "patching script interpreter paths" + local dir="$1" + local f + for f in $(find "$dir" -type f -perm +0100); do + local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f") + if test -n "$oldPath" -a "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE"; then + local newPath=$(type -P $(basename $oldPath) || true) + if test -n "$newPath" -a "$newPath" != "$oldPath"; then + echo "$f: interpreter changed from $oldPath to $newPath" + sed -i -e "1 s,$oldPath,$newPath," "$f" + fi + fi + done + stopNest +} + + +installPhase() { + runHook preInstall ensureDir "$prefix" - - if test -z "$dontMakeInstall"; then - echo "install flags: $installFlags" - make install $installFlags || fail + + installTargets=${installTargets:-install} + echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}" + make ${makefile:+-f $makefile} $installTargets \ + $makeFlags "${makeFlagsArray[@]}" \ + $installFlags "${installFlagsArray[@]}" + + runHook postInstall +} + + +# The fixup phase performs generic, package-independent, Nix-related +# stuff, like running patchelf and setting the +# propagated-build-inputs. It should rarely be overriden. +fixupPhase() { + runHook preFixup + + # Put man/doc/info under $out/share. + forceShare=${forceShare:=man doc info} + if test -n "$forceShare"; then + for d in $forceShare; do + if test -d "$prefix/$d"; then + if test -d "$prefix/share/$d"; then + echo "both $d/ and share/$d/ exists!" + else + echo "fixing location of $d/ subdirectory" + ensureDir $prefix/share + if test -w $prefix/share; then + mv -v $prefix/$d $prefix/share + ln -sv share/$d $prefix + fi + fi + fi + done; fi - if test -z "$dontStrip" -a "$NIX_STRIP_DEBUG" = 1; then - find "$prefix" -name "*.a" -exec echo stripping {} \; \ - -exec strip -S {} \; || fail + # TODO: strip _only_ ELF executables, and return || fail here... + if test -z "$dontStrip"; then + stripDebugList=${stripDebugList:-lib lib64 libexec bin sbin} + if test -n "$stripDebugList"; then + stripDirs "$stripDebugList" "${stripDebugFlags:--S}" + fi + + stripAllList=${stripAllList:-} + if test -n "$stripAllList"; then + stripDirs "$stripAllList" "${stripAllFlags:--s}" + fi fi if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then patchELF "$prefix" fi + if test -z "$dontPatchShebangs"; then + patchShebangs "$prefix" + fi + if test -n "$propagatedBuildInputs"; then ensureDir "$out/nix-support" echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" fi - if test -n "$postInstall"; then - $postInstall - fi -} - - -installPhase() { - if test "$dontInstall" = 1; then - return - fi - header "installing" - startLog "install" - installW - stopLog - stopNest -} - - -distW() { - if test -n "$distPhase"; then - $distPhase - return + if test -n "$setupHook"; then + ensureDir "$out/nix-support" + substituteAll "$setupHook" "$out/nix-support/setup-hook" fi - if test -n "$preDist"; then - $preDist - fi - - if test -z "$distTarget"; then - distTarget="dist" - fi - - echo "dist flags: $distFlags" - make $distFlags $distTarget || fail - - if test "$dontCopyDist" != 1; then - ensureDir "$out/tarballs" - - if test -z "$tarballs"; then - tarballs="*.tar.gz" - fi - - # Note: don't quote $tarballs, since we explicitly permit - # wildcards in there. - cp -pvd $tarballs $out/tarballs - fi - - if test -n "$postDist"; then - $postDist - fi + runHook postFixup } distPhase() { - if test "$doDist" != 1; then - return + runHook preDist + + echo "dist flags: $distFlags ${distFlagsArray[@]}" + make ${makefile:+-f $makefile} $distFlags "${distFlagsArray[@]}" ${distTarget:-dist} + + if test "$dontCopyDist" != 1; then + ensureDir "$out/tarballs" + + # Note: don't quote $tarballs, since we explicitly permit + # wildcards in there. + cp -pvd ${tarballs:-*.tar.gz} $out/tarballs fi - header "creating distribution" - startLog "dist" - distW - stopLog - stopNest + + runHook postDist +} + + +showPhaseHeader() { + local phase="$1" + case $phase in + unpackPhase) header "unpacking sources";; + patchPhase) header "patching sources";; + configurePhase) header "configuring";; + buildPhase) header "building";; + checkPhase) header "running tests";; + installPhase) header "installing";; + fixupPhase) header "post-installation fixup";; + *) header "$phase";; + esac } genericBuild() { header "building $out" - unpackPhase - cd $sourceRoot - - if test -z "$phases"; then - phases="patchPhase configurePhase buildPhase checkPhase \ - installPhase distPhase"; + if test -n "$buildCommand"; then + eval "$buildCommand" + return fi - for i in $phases; do + if test -z "$phases"; then + phases="$prePhases unpackPhase patchPhase $preConfigurePhases \ + configurePhase $preBuildPhases buildPhase checkPhase \ + $preInstallPhases installPhase fixupPhase \ + $preDistPhases distPhase $postPhases"; + fi + + for curPhase in $phases; do + if test "$curPhase" = buildPhase -a -n "$dontBuild"; then continue; fi + if test "$curPhase" = checkPhase -a -z "$doCheck"; then continue; fi + if test "$curPhase" = installPhase -a -n "$dontInstall"; then continue; fi + if test "$curPhase" = fixupPhase -a -n "$dontFixup"; then continue; fi + if test "$curPhase" = distPhase -a -z "$doDist"; then continue; fi + + showPhaseHeader "$curPhase" dumpVars - $i + + # Evaluate the variable named $curPhase if it exists, otherwise the + # function named $curPhase. + eval "${!curPhase:-$curPhase}" + + if test "$curPhase" = unpackPhase; then + cd "${sourceRoot:-.}" + fi + + stopNest done - + stopNest } + + dumpVars From e0389e41f09668997f6c308e93a094a8f0b34d26 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 16 Nov 2009 11:22:11 +0000 Subject: [PATCH 08/48] different behaviour of ln on mingw svn path=/nixpkgs/trunk/; revision=18370 --- pkgs/stdenv/mingw/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/mingw/setup.sh b/pkgs/stdenv/mingw/setup.sh index 232a3191945..f295e38b2b4 100755 --- a/pkgs/stdenv/mingw/setup.sh +++ b/pkgs/stdenv/mingw/setup.sh @@ -648,7 +648,7 @@ fixupPhase() { ensureDir $prefix/share if test -w $prefix/share; then mv -v $prefix/$d $prefix/share - ln -sv share/$d $prefix + ln -sv share/$d $prefix/$d fi fi fi From 4e50b362f7da96e825d5e74f13c42cf11cd92285 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 16 Nov 2009 11:24:49 +0000 Subject: [PATCH 09/48] svn path=/nixpkgs/trunk/; revision=18371 --- pkgs/stdenv/mingw/pkgs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/mingw/pkgs/default.nix b/pkgs/stdenv/mingw/pkgs/default.nix index 52b68d9de24..5add5b6546e 100755 --- a/pkgs/stdenv/mingw/pkgs/default.nix +++ b/pkgs/stdenv/mingw/pkgs/default.nix @@ -130,8 +130,8 @@ rec { setupHook = ../../../development/tools/misc/pkgconfig/setup-hook.sh; src = fetchurl { - url = ftp://ftp.strategoxt.org/pub/mingw/pkg-config-0.23-bin.tar.gz; - sha256 = "1z4zyg20g25qvx102mm2nzsxyh8fcsbz2lgi7qp32b5vrixi1037"; + url = ftp://ftp.strategoxt.org/pub/mingw/pkg-config-0.23.tar.gz; + sha256 = "1vab3rdnw16nhma1bln41bbrn6phbpcv9wiz79map8y5znaiv6mq"; }; }; From 94a659596be3188484fc1cdeb46ea46093afd437 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 16 Nov 2009 12:22:55 +0000 Subject: [PATCH 10/48] ln issue mingw svn path=/nixpkgs/trunk/; revision=18372 --- pkgs/stdenv/mingw/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/mingw/setup.sh b/pkgs/stdenv/mingw/setup.sh index f295e38b2b4..058d8cb1891 100755 --- a/pkgs/stdenv/mingw/setup.sh +++ b/pkgs/stdenv/mingw/setup.sh @@ -648,7 +648,7 @@ fixupPhase() { ensureDir $prefix/share if test -w $prefix/share; then mv -v $prefix/$d $prefix/share - ln -sv share/$d $prefix/$d + ln -sv $prefix/share/$d $prefix/$d fi fi fi From 88a90ec1c514bcba47f124aa0c2a4ecfb368e3a7 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Mon, 16 Nov 2009 12:50:04 +0000 Subject: [PATCH 11/48] Upgraded Axis2 to 1.5.1 svn path=/nixpkgs/trunk/; revision=18373 --- pkgs/servers/http/tomcat/axis2/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/tomcat/axis2/default.nix b/pkgs/servers/http/tomcat/axis2/default.nix index c3529524575..066dfff36a7 100644 --- a/pkgs/servers/http/tomcat/axis2/default.nix +++ b/pkgs/servers/http/tomcat/axis2/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, apacheAnt, jdk, unzip}: stdenv.mkDerivation { - name = "axis2-1.5"; + name = "axis2-1.5.1"; src = fetchurl { - url = http://apache.mirror.easycolocate.nl/ws/axis2/1_5/axis2-1.5-bin.zip; - sha256 = "0f0a471xfsjx7s3i9awhajl1kli8y8pd8aiki7cwb9n4g467rwmc"; + url = http://www.bizdirusa.com/mirrors/apache/ws/axis2/1_5_1/axis2-1.5.1-bin.zip; + sha256 = "04zcn9g4r7pxfpp5g5rpjjlddr5mibqmsz4lfbkz2vjf3jrldgy5"; }; buildInputs = [ unzip apacheAnt jdk ]; From 30e6d32b3359cdf64bb44a013f04be1615273090 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 16 Nov 2009 13:21:12 +0000 Subject: [PATCH 12/48] update baseline for stratego related packages svn path=/nixpkgs/trunk/; revision=18374 --- pkgs/development/compilers/strategoxt/0.18.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/strategoxt/0.18.nix b/pkgs/development/compilers/strategoxt/0.18.nix index fc94f30044b..ef906ccf294 100644 --- a/pkgs/development/compilers/strategoxt/0.18.nix +++ b/pkgs/development/compilers/strategoxt/0.18.nix @@ -44,8 +44,8 @@ rec { name = "strategoxt-0.18pre20033"; src = fetchurl { - url = "ftp://ftp.strategoxt.org/pub/stratego/StrategoXT/strategoxt-0.18pre20033.tar.gz"; - sha256 = "070052cff1fd27b2ca4bed8b6aa0238574a18922b21feae2506e6df5d2201c1c"; + url = "http://hydra.nixos.org/build/124117/download/1/strategoxt-0.18pre20227.tar.gz"; + sha256 = "c2c7a68f76c6dfaf470ed9f7bad71cddebb620b709f20b01231c3a6fd93d8150"; }; buildInputs = [pkgconfig aterm sdf getopt]; From ede54260709c8265a7d1ee41796702c4ba2fb7e9 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 16 Nov 2009 13:57:11 +0000 Subject: [PATCH 13/48] name typo svn path=/nixpkgs/trunk/; revision=18375 --- pkgs/development/compilers/strategoxt/0.18.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/strategoxt/0.18.nix b/pkgs/development/compilers/strategoxt/0.18.nix index ef906ccf294..44fff034ba3 100644 --- a/pkgs/development/compilers/strategoxt/0.18.nix +++ b/pkgs/development/compilers/strategoxt/0.18.nix @@ -41,7 +41,7 @@ rec { strategoxt = stdenv.mkDerivation rec { - name = "strategoxt-0.18pre20033"; + name = "strategoxt-0.18pre20227"; src = fetchurl { url = "http://hydra.nixos.org/build/124117/download/1/strategoxt-0.18pre20227.tar.gz"; From 29384d43f2d1d1ae86865405c00fdc1e196de246 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Mon, 16 Nov 2009 18:42:43 +0000 Subject: [PATCH 14/48] * Update Go's version. Make 8g & 8l commands working with no need of extra argument to locate the Go's libraries. svn path=/nixpkgs/trunk/; revision=18376 --- pkgs/development/compilers/go/default.nix | 32 ++++++++++++++++--- .../go/disable-system-dependent-tests.patch | 19 +++++------ ...-log-test-accept-period-in-file-path.patch | 14 -------- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 36 insertions(+), 31 deletions(-) delete mode 100644 pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/default.nix index ebec69535e1..d5314a976a2 100644 --- a/pkgs/development/compilers/go/default.nix +++ b/pkgs/development/compilers/go/default.nix @@ -1,7 +1,7 @@ -{stdenv, fetchhg, bison, glibc, ed, which, bash, ...}: +{stdenv, fetchhg, bison, glibc, ed, which, bash, makeWrapper, ...}: let - version = "2009-11-10.1"; + version = "2009-11-12"; md5 = "66e5803c8dc2855b339151918b6b0de5"; in @@ -15,11 +15,10 @@ stdenv.mkDerivation { inherit md5; }; - buildInputs = [ bison glibc ed which bash ]; + buildInputs = [ bison glibc ed which bash makeWrapper ]; patches = [ ./disable-system-dependent-tests.patch - ./pkg-log-test-accept-period-in-file-path.patch ./cgo-set-local-to-match-gcc-error-messages.patch ]; @@ -35,7 +34,6 @@ stdenv.mkDerivation { GOARCH = "386"; installPhase = '' - ensureDir "$out" ensureDir "$out/bin" export GOROOT="$(pwd)/" export GOBIN="$out/bin" @@ -43,6 +41,30 @@ stdenv.mkDerivation { cd ./src ./all.bash cd - + + # Handle Libraries and make them availabale under /share/go. + export GOLIB="pkg/"$GOOS"_"$GOARCH + ensureDir "$out/lib/go/$GOLIB" + cp -r ./$GOLIB $out/lib/go/pkg/ + + # this line set $AS $CC $GC $LD + source ./src/Make.$GOARCH + + # Wrap the compiler and the linker to define the location of the + # libraries. + wrapProgram "$out/bin/$GC" \ + --add-flags "-I" \ + --add-flags "$out/lib/go/$GOLIB" + + wrapProgram "$out/bin/$LD" \ + --set "GOROOT" "$out/lib/go/" \ + --set "GOOS" "$GOOS" \ + --set "GOARCH" "$GOARCH" + + # Copy the emacs configuration for Go files. + ensureDir "$out/share/emacs/site-lisp" + cp ./misc/emacs/* $out/share/emacs/site-lisp/ # */ + ''; meta = { diff --git a/pkgs/development/compilers/go/disable-system-dependent-tests.patch b/pkgs/development/compilers/go/disable-system-dependent-tests.patch index 550d1a4ac25..d9e7fa48c1f 100644 --- a/pkgs/development/compilers/go/disable-system-dependent-tests.patch +++ b/pkgs/development/compilers/go/disable-system-dependent-tests.patch @@ -1,7 +1,7 @@ -diff -r b51fd2d6c160 src/pkg/Makefile ---- a/src/pkg/Makefile Tue Nov 10 20:05:24 2009 -0800 -+++ b/src/pkg/Makefile Sat Nov 14 19:42:42 2009 +0100 -@@ -100,16 +100,18 @@ +diff -r cb140bac9ab0 src/pkg/Makefile +--- a/src/pkg/Makefile Thu Nov 12 14:55:26 2009 -0800 ++++ b/src/pkg/Makefile Mon Nov 16 11:50:34 2009 +0100 +@@ -100,12 +100,15 @@ NOTEST=\ debug/proc\ @@ -11,18 +11,15 @@ diff -r b51fd2d6c160 src/pkg/Makefile go/token\ hash\ image\ ++ log\ malloc\ + os\ rand\ runtime\ syscall\ - testing/iotest\ - - TEST=\ - $(filter-out $(NOTEST),$(DIRS)) -diff -r b51fd2d6c160 src/run.bash ---- a/src/run.bash Tue Nov 10 20:05:24 2009 -0800 -+++ b/src/run.bash Sat Nov 14 19:42:42 2009 +0100 +diff -r cb140bac9ab0 src/run.bash +--- a/src/run.bash Thu Nov 12 14:55:26 2009 -0800 ++++ b/src/run.bash Mon Nov 16 11:50:34 2009 +0100 @@ -69,7 +69,3 @@ ./timing.sh -test ) || exit $? diff --git a/pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch b/pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch deleted file mode 100644 index 9cfe8f68ae0..00000000000 --- a/pkgs/development/compilers/go/pkg-log-test-accept-period-in-file-path.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -r b51fd2d6c160 src/pkg/log/log_test.go ---- a/src/pkg/log/log_test.go Tue Nov 10 20:05:24 2009 -0800 -+++ b/src/pkg/log/log_test.go Sat Nov 14 20:45:04 2009 +0100 -@@ -18,8 +18,8 @@ - Rtime = `[0-9][0-9]:[0-9][0-9]:[0-9][0-9]`; - Rmicroseconds = `\.[0-9][0-9][0-9][0-9][0-9][0-9]`; - Rline = `[0-9]+:`; -- Rlongfile = `/[A-Za-z0-9_/\-]+\.go:` + Rline; -- Rshortfile = `[A-Za-z0-9_\-]+\.go:` + Rline; -+ Rlongfile = `/[A-Za-z0-9_./\-]+\.go:` + Rline; -+ Rshortfile = `[A-Za-z0-9_.\-]+\.go:` + Rline; - ) - - type tester struct { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c85804ac79d..272f39c9400 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2066,7 +2066,7 @@ let }; go = import ../development/compilers/go { - inherit stdenv fetchhg glibc bison ed which bash; + inherit stdenv fetchhg glibc bison ed which bash makeWrapper; }; gprolog = import ../development/compilers/gprolog { From 01e98e49b155d989d8c80066db6de910396cdcaa Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Mon, 16 Nov 2009 22:23:11 +0000 Subject: [PATCH 15/48] * Add a stdenv adapter which can remove all maintainers fields. This can be used to remove error reports from development branches. svn path=/nixpkgs/trunk/; revision=18377 --- pkgs/stdenv/adapters.nix | 16 ++++++++++++++++ pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index db380366153..5760c4459ad 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -186,4 +186,20 @@ rec { # `keepBuildTree' adapter as well. (cleanupBuildTree (keepBuildTree stdenv)); + + /* Replace the meta.maintainers field of a derivation. This is useful + when you want to fork to update some packages without disturbing other + developers. + + e.g.: in all-packages.nix: + + # remove all maintainers. + defaultStdenv = replaceMaintainersField allStdenvs.stdenv pkgs []; + */ + replaceMaintainersField = stdenv: pkgs: maintainers: stdenv // + { mkDerivation = args: + pkgs.lib.recursiveUpdate + (stdenv.mkDerivation args) + { meta.maintainers = maintainers; }; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 272f39c9400..04b52299f03 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -237,7 +237,8 @@ let inherit (import ../stdenv/adapters.nix {inherit (pkgs) dietlibc fetchurl runCommand;}) overrideGCC overrideInStdenv overrideSetup useDietLibC useKlibc makeStaticBinaries addAttrsToDerivation - keepBuildTree cleanupBuildTree addCoverageInstrumentation; + keepBuildTree cleanupBuildTree addCoverageInstrumentation + replaceMaintainersField; ### BUILD SUPPORT From b82da9824b608e24293cc5d44e92c6139cb0256f Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 17 Nov 2009 12:30:17 +0000 Subject: [PATCH 16/48] make nix overridable svn path=/nixpkgs/trunk/; revision=18380 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04b52299f03..5bbefaac474 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8492,7 +8492,7 @@ let inherit fetchurl stdenv unzip; }; - nix = import ../tools/package-management/nix { + nix = makeOverridable (import ../tools/package-management/nix) { inherit fetchurl stdenv perl curl bzip2 openssl; aterm = aterm242fixes; db4 = db45; From c3ea7a9212f0eb258cade95cec0aa019d60b74a4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Nov 2009 13:07:14 +0000 Subject: [PATCH 17/48] * Added Digest::SHA. svn path=/nixpkgs/trunk/; revision=18382 --- pkgs/top-level/perl-packages.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index f880a691b42..7dc0af1d532 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -939,6 +939,14 @@ rec { propagatedBuildInputs = [DigestSHA1]; }; + DigestSHA = buildPerlPackage rec { + name = "Digest-SHA-5.47"; + src = fetchurl { + url = "mirror://cpan/authors/id/M/MS/MSHELOR/${name}.tar.gz"; + sha256 = "1xk9hdds4dk5iklxr8fdfbgfvd8cwgcjh5jqmjxhaw57ss2dh5wx"; + }; + }; + DigestSHA1 = buildPerlPackage { name = "Digest-SHA1-2.11"; src = fetchurl { From 18a08aa0080c0bb7efbdc3b6de3ab0c152872b9f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Nov 2009 14:26:42 +0000 Subject: [PATCH 18/48] * Add an openSUSE mirror that contains discontinued releases (such as 10.3). svn path=/nixpkgs/trunk/; revision=18385 --- pkgs/build-support/fetchurl/default.nix | 3 --- pkgs/build-support/fetchurl/mirrors.nix | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 00b7f3cc079..1ba9124027d 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -1,6 +1,3 @@ -# Argh, this thing is duplicated (more-or-less) in Nix (in corepkgs). -# Need to find a way to combine them. - {stdenv, curl}: # Note that `curl' may be `null', in case of the native stdenv. let diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index 3e8675b2168..e429c130b5e 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -209,6 +209,7 @@ rec { http://ftp.funet.fi/pub/linux/mirrors/opensuse/ http://ftp5.gwdg.de/pub/opensuse/ http://ftp.opensuse.org/pub/opensuse/ + http://ftp5.gwdg.de/pub/opensuse/discontinued/ ]; # Gnome (see http://ftp.gnome.org/pub/GNOME/MIRRORS). From 802fa4ba0bf7490313249dc60c30729c78288ed2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Nov 2009 15:26:22 +0000 Subject: [PATCH 19/48] * Remove sumArgs and its few remaining uses. Idem for composedArgs. svn path=/nixpkgs/trunk/; revision=18388 --- pkgs/games/fsg/alt-builder.nix | 2 +- pkgs/games/fsg/default.nix | 2 +- pkgs/lib/misc.nix | 17 ----------------- pkgs/top-level/all-packages.nix | 32 +++----------------------------- 4 files changed, 5 insertions(+), 48 deletions(-) diff --git a/pkgs/games/fsg/alt-builder.nix b/pkgs/games/fsg/alt-builder.nix index c2b68a6c746..837685db2d9 100644 --- a/pkgs/games/fsg/alt-builder.nix +++ b/pkgs/games/fsg/alt-builder.nix @@ -1,6 +1,6 @@ args: with args; let localDefs = builderDefs.passthru.function { - buildInputs =[mesa (wxGTK null) libX11 xproto]; + buildInputs =[mesa wxGTK libX11 xproto]; src = fetchurl { url = http://www.piettes.com/fallingsandgame/fsg-src-4.4.tar.gz; diff --git a/pkgs/games/fsg/default.nix b/pkgs/games/fsg/default.nix index b67b1bcfc5f..029c93d6690 100644 --- a/pkgs/games/fsg/default.nix +++ b/pkgs/games/fsg/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c"; }; - buildInputs = [gtk glib pkgconfig mesa (wxGTK null) libX11 xproto]; + buildInputs = [gtk glib pkgconfig mesa wxGTK libX11 xproto]; /* # One day Unicode will overcome? diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index ba7488ff70e..bf37f31ebaf 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -9,23 +9,6 @@ with import ./strings.nix; rec { - - # accumulates / merges all attr sets until null is fed. - # example: sumArgs id { a = 'a'; x = 'x'; } { y = 'y'; x = 'X'; } null - # result : { a = 'a'; x = 'X'; y = 'Y'; } - innerSumArgs = f : x : y : (if y == null then (f x) - else (innerSumArgs f (x // y))); - sumArgs = f : innerSumArgs f {}; - - # Advanced sumArgs version. Hm, twice as slow, I'm afraid. - # composedArgs id (x:x//{a="b";}) (x:x//{b=x.a + "c";}) null; - # {a="b" ; b="bc";}; - innerComposedArgs = f : x : y : (if y==null then (f x) - else (if (builtins.isAttrs y) then - (innerComposedArgs f (x//y)) - else (innerComposedArgs f (y x)))); - composedArgs = f: innerComposedArgs f {}; - defaultMergeArg = x : y: if builtins.isAttrs y then y else diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5bbefaac474..128dab406ed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -938,14 +938,6 @@ let inherit fetchurl stdenv; }; - /* - hyppocampusFun = lib.sumArgs ( selectVersion ../tools/misc/hyppocampus "0.3rc1") { - inherit builderDefs stdenv fetchurl libdbi libdbiDrivers fuse - pkgconfig perl gettext dbus dbus_glib pcre libscd bison glib; - flex = flex2533; - }; - */ - iasl = import ../development/compilers/iasl { inherit fetchurl stdenv bison flex; }; @@ -4046,12 +4038,6 @@ let inherit fetchurl stdenv pkgconfig ncurses glib; }; - /*libscdFun = lib.sumArgs (selectVersion ../development/libraries/libscd "0.4.2") { - inherit stdenv fetchurl builderDefs libextractor perl pkgconfig; - }; - - libscd = libscdFun null;*/ - libsigcxx = import ../development/libraries/libsigcxx { inherit fetchurl stdenv pkgconfig; }; @@ -4608,16 +4594,12 @@ let inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto; }; - wxGTK28fun = lib.sumArgs (import ../development/libraries/wxGTK-2.8); - - wxGTK28deps = wxGTK28fun { + wxGTK28 = makeOverridable (import ../development/libraries/wxGTK-2.8) { inherit fetchurl stdenv pkgconfig mesa; inherit (gtkLibs216) gtk; inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto; }; - wxGTK28 = wxGTK28deps null; - wtk = import ../development/libraries/wtk { inherit fetchurl stdenv unzip xlibs; }; @@ -7199,14 +7181,6 @@ let qt = qt3; }; - /*kiwixBuilderFun = lib.sumArgs (import ../applications/misc/kiwixbuilder) { - inherit builderDefs; - inherit (gnome) glib; - zlib = zlibStatic; - }; - - kiwixBuilder = kiwixBuilderFun null;*/ - konversation = import ../applications/networking/irc/konversation { inherit fetchurl stdenv perl arts kdelibs zlib libpng libjpeg expat; inherit (xlibs) libX11 libXt libXext libXrender libXft; @@ -8064,12 +8038,12 @@ let inherit stdenv fetchurl pkgconfig mesa; inherit (gtkLibs) glib gtk; inherit (xlibs) libX11 xproto; - wxGTK = wxGTK28deps {unicode = false;}; + wxGTK = wxGTK28.override {unicode = false;}; }; fsgAltBuild = import ../games/fsg/alt-builder.nix { inherit stdenv fetchurl mesa; - wxGTK = wxGTK28deps {unicode = false;}; + wxGTK = wxGTK28.override {unicode = false;}; inherit (xlibs) libX11 xproto; inherit stringsWithDeps builderDefs; }; From a56509c0db1682b6de1bbc4840cde7b1d147d4d9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Nov 2009 15:31:48 +0000 Subject: [PATCH 20/48] * Remove some more unused functions. svn path=/nixpkgs/trunk/; revision=18390 --- pkgs/build-support/builder-defs/builder-defs.nix | 4 ---- pkgs/lib/misc.nix | 8 -------- 2 files changed, 12 deletions(-) diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index 814ce460794..5eaa40c6111 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -373,10 +373,6 @@ let inherit (builtins) head tail trace; in /*debug = x:(trace x x); debugX = x:(trace (toXML x) x);*/ - replaceScriptVar = file: name: value: "sed -e 's`^${name}=.*`${name}='\\''${value}'\\''`' -i ${file}"; - replaceInScript = file: l: concatStringsSep "\n" ((pairMap (replaceScriptVar file) l)); - replaceScripts = l: concatStringsSep "\n" (pairMap replaceInScript l); - doReplaceScripts = fullDepEntry (replaceScripts (attrByPath ["shellReplacements"] [] args)) ["minInit"]; makeNest = x: if x == defNest.text then x else "startNest\n" + x + "\nstopNest\n"; textClosure = a: steps: textClosureMap makeNest a (["defNest"] ++ steps); diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index bf37f31ebaf..77abd032cec 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -88,14 +88,6 @@ rec { # } composedArgsAndFun = f: foldArgs defaultMerge f {}; - # example a = pairMap (x : y : x + y) ["a" "b" "c" "d"]; - # result: ["ab" "cd"] - innerPairMap = acc: f: l: - if l == [] then acc else - innerPairMap (acc ++ [(f (head l)(head (tail l)))]) - f (tail (tail l)); - pairMap = innerPairMap []; - # shortcut for attrByPath ["name"] default attrs maybeAttr = name: default: attrs: From aed79cca1a0f2c6209e8446b499b5702561f8858 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Nov 2009 15:36:48 +0000 Subject: [PATCH 21/48] * Another unused function. svn path=/nixpkgs/trunk/; revision=18391 --- pkgs/lib/misc.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index 77abd032cec..c1fee190268 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -296,12 +296,6 @@ rec { flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set); mapIf = cond : f : fold ( x : l : if (cond x) then [(f x)] ++ l else l) []; - # pick attrs subset_attr_names and apply f - subsetmap = f : attrs : subset_attr_names : - listToAttrs (fold ( attr : r : if hasAttr attr attrs - then r ++ [ ( nameValuePair attr ( f (getAttr attr attrs) ) ) ] else r ) [] - subset_attr_names ); - # prepareDerivationArgs tries to make writing configurable derivations easier # example: # prepareDerivationArgs { From 66a537f774bfe92556d46558f1cac2670e9e9e6c Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 17 Nov 2009 15:50:20 +0000 Subject: [PATCH 22/48] redirect stdout of git calls to stderr to allow git to work in hydra as input svn path=/nixpkgs/trunk/; revision=18393 --- pkgs/build-support/fetchgit/nix-prefetch-git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index d14f13bfa11..3803522ea76 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -36,11 +36,11 @@ if test -z "$finalPath"; then trap "rm -rf $tmpPath" EXIT # Perform the checkout. - git clone --depth 1 "$url" $tmpFile + git clone --depth 1 "$url" $tmpFile 1>&2 if test -n "$rev"; then cd $tmpFile echo $tmpFile - git checkout $rev + git checkout $rev 1>&2 fi # Allow doing additional processing before .git removal eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK" From 4acd0bdb8c3887f7ffcd1e30a91ad03c32a594a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Tue, 17 Nov 2009 16:46:51 +0000 Subject: [PATCH 23/48] Making xorgserver build also Xnest. svn path=/nixpkgs/trunk/; revision=18395 --- pkgs/servers/x11/xorg/overrides.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 33bf8e4aa80..5986a937c47 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -100,7 +100,7 @@ [ args.zlib xorg.xf86bigfontproto xorg.glproto args.mesa xorg.xf86driproto xorg.compositeproto xorg.scrnsaverproto xorg.resourceproto xorg.xineramaproto xorg.dri2proto xorg.xf86dgaproto xorg.dmxproto - xorg.libdmx xorg.xf86vidmodeproto + xorg.libdmx xorg.xf86vidmodeproto xorg.libXext ]; propagatedBuildInputs = [ xorg.libpciaccess xorg.inputproto xorg.xextproto xorg.randrproto ]; From 52e9488541dc9e207d853ce2aa31d0e453c34767 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Tue, 17 Nov 2009 16:54:04 +0000 Subject: [PATCH 24/48] Upgraded ejabberd to the latest stable 2.1.0 and also claimed maintainership since I really need this for one of my experiments svn path=/nixpkgs/trunk/; revision=18396 --- pkgs/servers/xmpp/ejabberd/default.nix | 16 ++++++---------- pkgs/top-level/all-packages.nix | 3 +-- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix index 405afc189c2..7d81dd0accf 100644 --- a/pkgs/servers/xmpp/ejabberd/default.nix +++ b/pkgs/servers/xmpp/ejabberd/default.nix @@ -1,15 +1,10 @@ -{stdenv, fetchurl, fetchsvn, expat, erlang, zlib, openssl, pam}: +{stdenv, fetchurl, expat, erlang, zlib, openssl, pam, lib}: stdenv.mkDerivation rec { - name = "ejabberd-2.0.5"; - #src = fetchurl { - # url = http://www.process-one.net/downloads/ejabberd/2.0.5/ejabberd-2.0.5.tar.gz; - # sha256 = "130rjl93l54c7p4glsfn3j7xwpwdyinhj6pp1di3mdx2mzi91vrp"; - #}; - src = fetchsvn { - url = http://svn.process-one.net/ejabberd/trunk; - rev = "2666"; - sha256 = "c927ddc08c9cd748db93f48bcae96f9bd1c36e1ce107c9b4774e5423574ab7cb"; + name = "ejabberd-2.1.0"; + src = fetchurl { + url = http://www.process-one.net/downloads/ejabberd/2.1.0/ejabberd-2.1.0.tar.gz; + sha256 = "16gn5ag3zyv578bqbz134l13cy1gl1xfa5y7dnqxgpr9gkdyrp5q"; }; buildInputs = [ expat erlang zlib openssl pam ]; patchPhase = '' @@ -24,5 +19,6 @@ stdenv.mkDerivation rec { description = "Open-source XMPP application server written in Erlang"; license = "GPLv2"; homepage = http://www.ejabberd.im; + maintainers = [ lib.maintainers.sander ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 128dab406ed..52ac49dc484 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4971,8 +4971,7 @@ let }; ejabberd = import ../servers/xmpp/ejabberd { - inherit fetchurl stdenv expat erlang zlib openssl - pam fetchsvn; + inherit fetchurl stdenv expat erlang zlib openssl pam lib; }; couchdb = import ../servers/http/couchdb { From 7f5b839524cad9211699c68ea02d11c1758a800b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 09:39:59 +0000 Subject: [PATCH 25/48] * Removed selectVersion. There's no good reason to write `selectVersion ./foo "bar"' instead of `import ./foo/bar.nix'. * Replaced `with args' with formal function arguments in several packages. * Renamed several files to `default.nix'. As a general rule, version numbers should only be included in the filename when there is a reason to keep multiple versions of a package in Nixpkgs. Otherwise, it just makes it harder to update the package. svn path=/nixpkgs/trunk/; revision=18403 --- pkgs/applications/misc/qgis/1.0.1-2.nix | 4 +- .../instant-messengers/carrier/2.5.0.nix | 2 +- .../psi/{0.12.1.nix => default.nix} | 15 +- .../version-management/codeville/0.8.0.nix | 2 +- .../monotone-viz/mtn-head.nix | 2 +- .../version-management/viewmtn/0.10.nix | 2 +- .../virtualization/qemu/linux-img/0.2.nix | 4 +- pkgs/data/fonts/clearlyU/1.9.nix | 2 +- pkgs/data/fonts/junicode/0.6.15.nix | 2 +- pkgs/data/fonts/libertine/2.7.bin.nix | 2 +- pkgs/data/fonts/libertine/2.7.nix | 2 +- pkgs/data/fonts/lmodern/0.92.nix | 32 --- .../fonts/lmodern/{1.010.nix => default.nix} | 18 +- pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix | 2 +- pkgs/development/compilers/ikarus/0.0.3.nix | 21 -- pkgs/development/compilers/ikarus/default.nix | 18 ++ pkgs/development/compilers/qi/9.1.nix | 2 +- .../compilers/swi-prolog/5.6.51.nix | 4 - .../compilers/swi-prolog/default.nix | 10 +- .../enchant/{1.3.0.nix => default.nix} | 6 +- .../libraries/libdbi-drivers/0.8.2-1.nix | 2 +- pkgs/development/libraries/libdbi/0.8.2.nix | 2 +- .../libraries/libextractor/0.5.18.nix | 2 +- .../libraries/libjingle/0.3.11.nix | 14 +- .../mediastreamer/2.2.0-cvs20080207.nix | 5 +- .../msilbc/{2.0.0.nix => default.nix} | 15 +- pkgs/development/libraries/redland/1.0.9.nix | 7 +- pkgs/development/libraries/tk/8.4.16.nix | 18 -- pkgs/development/libraries/tk/8.4.18.nix | 18 -- pkgs/development/libraries/tk/8.5.7.nix | 13 +- .../libraries/xapian/bindings/1.0.14.nix | 2 +- .../xapian/{1.0.14.nix => default.nix} | 11 +- .../python-modules/flup/default.nix | 16 ++ .../development/python-modules/flup/r2311.nix | 18 -- .../development/python-modules/pyqt/4.3.3.nix | 5 +- .../python-modules/python-sip/4.7.4.nix | 2 +- pkgs/development/tools/misc/xxdiff/3.2.nix | 2 +- pkgs/games/construo/0.2.2.nix | 2 +- pkgs/games/orbit/1.01.nix | 2 +- pkgs/os-specific/linux/atheros/0.9.4.nix | 2 +- pkgs/os-specific/linux/jfsrec/default.nix | 22 ++ pkgs/os-specific/linux/jfsrec/svn-7.nix | 23 -- pkgs/os-specific/linux/kqemu/1.4.0pre1.nix | 39 ++-- pkgs/servers/dict/1.9.15.nix | 2 +- pkgs/servers/dns/bind/9.5.0.nix | 2 +- pkgs/servers/gpm/1.20.6.nix | 22 -- pkgs/servers/gpm/default.nix | 21 ++ pkgs/shells/zsh/4.3.4.nix | 13 -- pkgs/shells/zsh/4.3.5.nix | 22 -- pkgs/shells/zsh/cvs.nix | 19 -- pkgs/shells/zsh/{4.3.9.nix => default.nix} | 12 +- pkgs/tools/X11/x11vnc/0.9.3.nix | 2 +- pkgs/tools/X11/x2vnc/1.7.2.nix | 2 +- pkgs/tools/archivers/sharutils/4.6.3.nix | 7 +- .../mdbtools/{0.6-pre1.nix => default.nix} | 16 +- pkgs/tools/misc/minicom/2.3.nix | 18 -- pkgs/tools/misc/minicom/default.nix | 18 ++ pkgs/tools/misc/relfs/cvs.2008.03.05.nix | 2 +- pkgs/tools/misc/rlwrap/0.28.nix | 2 +- .../tools/misc/uucp/{1.07.nix => default.nix} | 14 +- pkgs/tools/networking/nc6/1.0.nix | 2 +- pkgs/tools/networking/smbfs-fuse/0.8.7.nix | 2 +- pkgs/tools/networking/socat/1.6.0.1.nix | 25 --- pkgs/tools/networking/socat/default.nix | 17 ++ pkgs/tools/security/metasploit/3.1.nix | 2 +- pkgs/tools/security/ssss/0.5.nix | 2 +- pkgs/tools/system/ddrescue/1.8.nix | 20 -- pkgs/tools/system/ddrescue/default.nix | 15 ++ pkgs/tools/system/gdmap/0.8.1.nix | 2 +- pkgs/tools/text/cheetah-template/2.0.1.nix | 2 +- pkgs/tools/text/highlight/2.6.10.nix | 20 -- pkgs/tools/text/highlight/default.nix | 18 ++ pkgs/top-level/all-packages.nix | 211 ++++++++---------- 73 files changed, 375 insertions(+), 551 deletions(-) rename pkgs/applications/networking/instant-messengers/psi/{0.12.1.nix => default.nix} (55%) delete mode 100644 pkgs/data/fonts/lmodern/0.92.nix rename pkgs/data/fonts/lmodern/{1.010.nix => default.nix} (61%) delete mode 100644 pkgs/development/compilers/ikarus/0.0.3.nix create mode 100644 pkgs/development/compilers/ikarus/default.nix delete mode 100644 pkgs/development/compilers/swi-prolog/5.6.51.nix rename pkgs/development/libraries/enchant/{1.3.0.nix => default.nix} (61%) rename pkgs/development/libraries/msilbc/{2.0.0.nix => default.nix} (72%) delete mode 100644 pkgs/development/libraries/tk/8.4.16.nix delete mode 100644 pkgs/development/libraries/tk/8.4.18.nix rename pkgs/development/libraries/xapian/{1.0.14.nix => default.nix} (55%) create mode 100644 pkgs/development/python-modules/flup/default.nix delete mode 100644 pkgs/development/python-modules/flup/r2311.nix create mode 100644 pkgs/os-specific/linux/jfsrec/default.nix delete mode 100644 pkgs/os-specific/linux/jfsrec/svn-7.nix delete mode 100644 pkgs/servers/gpm/1.20.6.nix create mode 100644 pkgs/servers/gpm/default.nix delete mode 100644 pkgs/shells/zsh/4.3.4.nix delete mode 100644 pkgs/shells/zsh/4.3.5.nix delete mode 100644 pkgs/shells/zsh/cvs.nix rename pkgs/shells/zsh/{4.3.9.nix => default.nix} (84%) rename pkgs/tools/misc/mdbtools/{0.6-pre1.nix => default.nix} (58%) delete mode 100644 pkgs/tools/misc/minicom/2.3.nix create mode 100644 pkgs/tools/misc/minicom/default.nix rename pkgs/tools/misc/uucp/{1.07.nix => default.nix} (57%) delete mode 100644 pkgs/tools/networking/socat/1.6.0.1.nix create mode 100644 pkgs/tools/networking/socat/default.nix delete mode 100644 pkgs/tools/system/ddrescue/1.8.nix create mode 100644 pkgs/tools/system/ddrescue/default.nix delete mode 100644 pkgs/tools/text/highlight/2.6.10.nix create mode 100644 pkgs/tools/text/highlight/default.nix diff --git a/pkgs/applications/misc/qgis/1.0.1-2.nix b/pkgs/applications/misc/qgis/1.0.1-2.nix index 142e3b65013..af28a381fba 100644 --- a/pkgs/applications/misc/qgis/1.0.1-2.nix +++ b/pkgs/applications/misc/qgis/1.0.1-2.nix @@ -12,12 +12,12 @@ composableDerivation.composableDerivation {} { "-DWITH_INTERNAL_SQLITE3=TRUE" ]; - name = "qgis-${version}"; + name = "qgis-1.0.1-2"; # src = args.fetchsvn { url=https://svn.qgis.org/repos/qgis/trunk/qgis; # md5="ac0560e0a2d4e6258c8639f1e9b56df3"; rev="7704"; }; src = fetchurl { - url = "http://download.osgeo.org/qgis/src/qgis_${version}.tar.gz"; + url = "http://download.osgeo.org/qgis/src/qgis_1.0.1-2.tar.gz"; sha256 = "07yyic9sn1pz20wjk7k560jwqz6b19rhf2gawybz38xq1f8rjwd4"; }; diff --git a/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix index 257d3d09f71..0428ccdc7f3 100644 --- a/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix +++ b/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix @@ -39,7 +39,7 @@ rec { ++ (lib.optional externalPurple2 "postInstall") ; - name = "carrier-" + version; + name = "carrier-2.5.0"; meta = { description = "Carrier - PidginIM GUI fork with user-friendly development model"; homepage = http://funpidgin.sf.net; diff --git a/pkgs/applications/networking/instant-messengers/psi/0.12.1.nix b/pkgs/applications/networking/instant-messengers/psi/default.nix similarity index 55% rename from pkgs/applications/networking/instant-messengers/psi/0.12.1.nix rename to pkgs/applications/networking/instant-messengers/psi/default.nix index 110189598f6..0db1af883cb 100644 --- a/pkgs/applications/networking/instant-messengers/psi/0.12.1.nix +++ b/pkgs/applications/networking/instant-messengers/psi/default.nix @@ -1,19 +1,24 @@ -args : with args; +{ stdenv, fetchurl, aspell, qt4, zlib, sox, libX11, xproto, libSM, libICE, qca2 }: + stdenv.mkDerivation rec { + name = "psi-0.12.1"; + src = fetchurl { - url = mirror://sourceforge/psi/psi-0.12.1.tar.bz2; + url = "mirror://sourceforge/psi/${name}.tar.bz2"; sha256 = "0zi71fcia9amcasa6zrvfyghdpqa821iv2rkj53bq5dyvfm2y0m8"; }; buildInputs = [aspell qt4 zlib sox libX11 xproto libSM libICE qca2]; NIX_CFLAGS_COMPILE="-I${qca2}/include/QtCrypto"; + NIX_LDFLAGS="-lqca"; - configureFlags = [ " --with-zlib-inc=${zlib}/include " - " --disable-bundled-qca" ]; + configureFlags = + [ " --with-zlib-inc=${zlib}/include " + " --disable-bundled-qca" + ]; - name = "psi-" + version; meta = { description = "Psi, an XMPP (Jabber) client"; }; diff --git a/pkgs/applications/version-management/codeville/0.8.0.nix b/pkgs/applications/version-management/codeville/0.8.0.nix index 57552bac2fc..d72f753a26e 100644 --- a/pkgs/applications/version-management/codeville/0.8.0.nix +++ b/pkgs/applications/version-management/codeville/0.8.0.nix @@ -16,7 +16,7 @@ rec { /* doConfigure should be specified separately */ phaseNames = ["installPythonPackage" (makeManyWrappers ''$out/bin/*'' ''--prefix PYTHONPATH : $(toPythonPath $out)'')]; - name = "codeville-" + version; + name = "codeville-0.8.0"; meta = { description = "Codeville - RCS with powerful merge."; }; diff --git a/pkgs/applications/version-management/monotone-viz/mtn-head.nix b/pkgs/applications/version-management/monotone-viz/mtn-head.nix index 6693795edd9..eb5228e09fd 100644 --- a/pkgs/applications/version-management/monotone-viz/mtn-head.nix +++ b/pkgs/applications/version-management/monotone-viz/mtn-head.nix @@ -20,7 +20,7 @@ rec { autoconf -I . '') ["minInit" "addInputs" "doUnpack"]; - name = "monotone-viz-" + version; + name = "monotone-viz-mtn-head"; meta = { description = "Monotone commit tree visualizer"; maintainers = [args.lib.maintainers.raskin]; diff --git a/pkgs/applications/version-management/viewmtn/0.10.nix b/pkgs/applications/version-management/viewmtn/0.10.nix index 08351ffa91d..169bd407b7d 100644 --- a/pkgs/applications/version-management/viewmtn/0.10.nix +++ b/pkgs/applications/version-management/viewmtn/0.10.nix @@ -38,7 +38,7 @@ rec { ln -s $fullOut/static $out/share/viewmtn/ '') ["minInit" "defEnsureDir" "addInputs" "doUnpack"]; - name = "viewmtn-" + version; + name = "viewmtn-0.10"; meta = { description = "Monotone web interface"; }; diff --git a/pkgs/applications/virtualization/qemu/linux-img/0.2.nix b/pkgs/applications/virtualization/qemu/linux-img/0.2.nix index 0d5e94ded95..748f67c7448 100644 --- a/pkgs/applications/virtualization/qemu/linux-img/0.2.nix +++ b/pkgs/applications/virtualization/qemu/linux-img/0.2.nix @@ -13,11 +13,11 @@ args : with args; let doCopy = fullDepEntry (" ensureDir \$out/share/qemu-images - cp linux-${version}.img \$out/share/qemu-images/ + cp linux-0.2.img \$out/share/qemu-images/ ") [minInit doUnpack defEnsureDir]; in stdenv.mkDerivation rec { - name = "QEmu-Linux-Image-"+version; + name = "QEmu-Linux-Image-0.2"; builder = writeScript (name + "-builder") (textClosure localDefs [doCopy doForceShare doPropagate]); meta = { diff --git a/pkgs/data/fonts/clearlyU/1.9.nix b/pkgs/data/fonts/clearlyU/1.9.nix index 6d2b9ffb812..69296a45c24 100644 --- a/pkgs/data/fonts/clearlyU/1.9.nix +++ b/pkgs/data/fonts/clearlyU/1.9.nix @@ -18,7 +18,7 @@ args : with args; with builderDefs; }); in with localDefs; stdenv.mkDerivation rec { - name = "clearlyU-12-"+version; + name = "clearlyU-12-1.9"; builder = writeScript (name + "-builder") (textClosure localDefs [doInstall doForceShare doPropagate]); diff --git a/pkgs/data/fonts/junicode/0.6.15.nix b/pkgs/data/fonts/junicode/0.6.15.nix index 1a8497bebb7..f991a387976 100644 --- a/pkgs/data/fonts/junicode/0.6.15.nix +++ b/pkgs/data/fonts/junicode/0.6.15.nix @@ -16,7 +16,7 @@ args : with args; with builderDefs; }); in with localDefs; stdenv.mkDerivation rec { - name = "junicode-"+version; + name = "junicode-0.6.15"; builder = writeScript (name + "-builder") (textClosure localDefs [doInstall doForceShare doPropagate]); diff --git a/pkgs/data/fonts/libertine/2.7.bin.nix b/pkgs/data/fonts/libertine/2.7.bin.nix index c88659e4371..b4e8bb9b6d1 100644 --- a/pkgs/data/fonts/libertine/2.7.bin.nix +++ b/pkgs/data/fonts/libertine/2.7.bin.nix @@ -8,7 +8,7 @@ rec{ buildInputs = []; phaseNames = ["doUnpack" "installFonts"]; - name = "linux-libertine-" + version; + name = "linux-libertine-2.7"; meta = { description = "Linux Libertine Fonts"; homepage = http://linuxlibertine.sf.net; diff --git a/pkgs/data/fonts/libertine/2.7.nix b/pkgs/data/fonts/libertine/2.7.nix index 546a4bdacec..a5c212aff86 100644 --- a/pkgs/data/fonts/libertine/2.7.nix +++ b/pkgs/data/fonts/libertine/2.7.nix @@ -15,7 +15,7 @@ rec { ScaleToEm(1000); ''; - name = "linux-libertine-" + version; + name = "linux-libertine-2.7"; meta = { description = "Linux Libertine Fonts"; homepage = http://linuxlibertine.sf.net; diff --git a/pkgs/data/fonts/lmodern/0.92.nix b/pkgs/data/fonts/lmodern/0.92.nix deleted file mode 100644 index 556b9f99876..00000000000 --- a/pkgs/data/fonts/lmodern/0.92.nix +++ /dev/null @@ -1,32 +0,0 @@ -args : with args; -rec { - src = fetchurl { - url = http://ftp.de.debian.org/debian/pool/main/l/lmodern/lmodern_0.92.orig.tar.gz; - sha256 = "0ak3n7fsi2va94gsn0pfmyby2b4g7wz9h5a0prpbx24ax1xwinls"; - }; - - buildInputs = []; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["doCopy"]; - - doCopy = fullDepEntry('' - ensureDir $out/share/texmf/fonts/enc - ensureDir $out/share/texmf/fonts/map - ensureDir $out/share/texmf/fonts/type1/public/lm - ensureDir $out/share/texmf/dvips/lm - ensureDir $out/share/texmf/dvipdfm/config - - cp -r ./* $out/share/texmf/ - - cp dvips/lm/*.enc $out/share/texmf/fonts/enc - cp dvips/lm/*.map $out/share/texmf/fonts/map - cp dvips/lm/*.map $out/share/texmf/dvipdfm/config - '') ["minInit" "defEnsureDir" "doUnpack"]; - - name = "lmodern-" + version; - meta = { - description = "Latin Modern font"; - }; -} diff --git a/pkgs/data/fonts/lmodern/1.010.nix b/pkgs/data/fonts/lmodern/default.nix similarity index 61% rename from pkgs/data/fonts/lmodern/1.010.nix rename to pkgs/data/fonts/lmodern/default.nix index 6948fa4cbbe..c95b409ed8e 100644 --- a/pkgs/data/fonts/lmodern/1.010.nix +++ b/pkgs/data/fonts/lmodern/default.nix @@ -1,25 +1,21 @@ -args : with args; -rec { +{ stdenv, fetchurl }: + +stdenv.mkDerivation { + name = "lmodern-1.010x"; + src = fetchurl { url = http://ftp.de.debian.org/debian/pool/main/l/lmodern/lmodern_1.010x.orig.tar.gz; sha256 = "0nwxj1ng7rvnp16jxcs25hbc5in65mdk4a3g3rlaq91i5qpq7mxj"; }; - buildInputs = []; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["doCopy"]; - - doCopy = fullDepEntry('' + installPhase = '' ensureDir $out/share/texmf/ ensureDir $out/share/fonts/ cp -r ./* $out/share/texmf/ cp -r fonts/{opentype,type1} $out/share/fonts/ - '') ["minInit" "defEnsureDir" "doUnpack"]; + ''; - name = "lmodern-" + version; meta = { description = "Latin Modern font"; }; diff --git a/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix b/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix index edf9f8c40ff..4b6120ad108 100644 --- a/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix +++ b/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix @@ -15,7 +15,7 @@ args : with args; with builderDefs; }); in with localDefs; stdenv.mkDerivation rec { - name = "wqy-zenhei-"+version; + name = "wqy-zenhei-0.4.23-1"; builder = writeScript (name + "-builder") (textClosure localDefs [doInstall doForceShare doPropagate]); diff --git a/pkgs/development/compilers/ikarus/0.0.3.nix b/pkgs/development/compilers/ikarus/0.0.3.nix deleted file mode 100644 index 1976df7b742..00000000000 --- a/pkgs/development/compilers/ikarus/0.0.3.nix +++ /dev/null @@ -1,21 +0,0 @@ - -args : with args; -rec { - src = fetchurl { - url = http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.3.tar.gz; - sha256 = "0d4vqwqfnj39l0gar2di021kcf6bfpkc6g40yapkmxm6sxpdcvjv"; - }; - - buildInputs = [gmp]; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - name = "ikarus-" + version; - meta = { - description = "Ikarus - a Scheme compiler, aiming at R6RS"; - homepage = http://www.cs.indiana.edu/~aghuloum/ikarus/; - license = "GPL3"; - }; -} diff --git a/pkgs/development/compilers/ikarus/default.nix b/pkgs/development/compilers/ikarus/default.nix new file mode 100644 index 00000000000..7e14d13b7df --- /dev/null +++ b/pkgs/development/compilers/ikarus/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, gmp }: + +stdenv.mkDerivation rec { + name = "ikarus-0.0.3"; + + src = fetchurl { + url = "http://www.cs.indiana.edu/~aghuloum/ikarus/${name}.tar.gz"; + sha256 = "0d4vqwqfnj39l0gar2di021kcf6bfpkc6g40yapkmxm6sxpdcvjv"; + }; + + buildInputs = [ gmp ]; + + meta = { + description = "Ikarus - a Scheme compiler, aiming at R6RS"; + homepage = http://www.cs.indiana.edu/~aghuloum/ikarus/; + license = "GPL3"; + }; +} diff --git a/pkgs/development/compilers/qi/9.1.nix b/pkgs/development/compilers/qi/9.1.nix index 8b218d499c5..8f094f9965a 100644 --- a/pkgs/development/compilers/qi/9.1.nix +++ b/pkgs/development/compilers/qi/9.1.nix @@ -27,7 +27,7 @@ let ") [ addInputs minInit doUnpack defEnsureDir]; in stdenv.mkDerivation rec { - name = "Qi-"+version; + name = "Qi-9.1"; builder = writeScript (name + "-builder") (textClosure localDefs [allBuild doForceShare doPropagate]); meta = { diff --git a/pkgs/development/compilers/swi-prolog/5.6.51.nix b/pkgs/development/compilers/swi-prolog/5.6.51.nix deleted file mode 100644 index cd640e5f26b..00000000000 --- a/pkgs/development/compilers/swi-prolog/5.6.51.nix +++ /dev/null @@ -1,4 +0,0 @@ -args: import ./default.nix { - args = args; - sha256 = "d43862606284e659ec3acba9cddea53b772f9afb67d12aa36391d26fe1a05ad8"; -} diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix index 23682db364f..da61adb2299 100644 --- a/pkgs/development/compilers/swi-prolog/default.nix +++ b/pkgs/development/compilers/swi-prolog/default.nix @@ -1,16 +1,16 @@ -{args, sha256}: with args; +{ stdenv, fetchurl }: stdenv.mkDerivation { - name = "swi-prolog-${version}"; + name = "swi-prolog-5.6.51"; src = fetchurl { - url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-${version}.tar.gz"; - inherit sha256; + url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-5.6.51.tar.gz"; + sha256 = "d43862606284e659ec3acba9cddea53b772f9afb67d12aa36391d26fe1a05ad8"; }; meta = { homepage = http://www.swi-prolog.org/; - description = "A Prolog compiler and interpreter."; + description = "A Prolog compiler and interpreter"; license = "LGPL"; }; } diff --git a/pkgs/development/libraries/enchant/1.3.0.nix b/pkgs/development/libraries/enchant/default.nix similarity index 61% rename from pkgs/development/libraries/enchant/1.3.0.nix rename to pkgs/development/libraries/enchant/default.nix index 0e3f92881e9..388d042d3ac 100644 --- a/pkgs/development/libraries/enchant/1.3.0.nix +++ b/pkgs/development/libraries/enchant/default.nix @@ -1,10 +1,10 @@ -args: with args; +{ stdenv, fetchurl, aspell, pkgconfig, glib }: stdenv.mkDerivation rec { - name = "enchant-" + version; + name = "enchant-1.3.0"; src = fetchurl { - url = "http://www.abisource.com/downloads/enchant/${version}/${name}.tar.gz"; + url = "http://www.abisource.com/downloads/enchant/1.3.0/${name}.tar.gz"; sha256 = "1vwqwsadnp4rf8wj7d4rglvszjzlcli0jyxh06h8inka1sm1al76"; }; diff --git a/pkgs/development/libraries/libdbi-drivers/0.8.2-1.nix b/pkgs/development/libraries/libdbi-drivers/0.8.2-1.nix index add438d07f1..bb146a5cddf 100644 --- a/pkgs/development/libraries/libdbi-drivers/0.8.2-1.nix +++ b/pkgs/development/libraries/libdbi-drivers/0.8.2-1.nix @@ -29,7 +29,7 @@ args : with args; }; in with localDefs; stdenv.mkDerivation rec { - name = "libdbi-"+version; + name = "libdbi-0.8.2-1"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); meta = { diff --git a/pkgs/development/libraries/libdbi/0.8.2.nix b/pkgs/development/libraries/libdbi/0.8.2.nix index dd0f2ec1c5f..b908c76fa78 100644 --- a/pkgs/development/libraries/libdbi/0.8.2.nix +++ b/pkgs/development/libraries/libdbi/0.8.2.nix @@ -11,7 +11,7 @@ args : with args; }; in with localDefs; stdenv.mkDerivation rec { - name = "libdbi-"+version; + name = "libdbi-0.8.2"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); meta = { diff --git a/pkgs/development/libraries/libextractor/0.5.18.nix b/pkgs/development/libraries/libextractor/0.5.18.nix index ed56e5ce4fe..557369bd76c 100644 --- a/pkgs/development/libraries/libextractor/0.5.18.nix +++ b/pkgs/development/libraries/libextractor/0.5.18.nix @@ -11,7 +11,7 @@ args : with args; }; in with localDefs; stdenv.mkDerivation rec { - name = "libextractor-"+version; + name = "libextractor-0.5.18"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); meta = { diff --git a/pkgs/development/libraries/libjingle/0.3.11.nix b/pkgs/development/libraries/libjingle/0.3.11.nix index b9d0b82df5e..3fa8c99c430 100644 --- a/pkgs/development/libraries/libjingle/0.3.11.nix +++ b/pkgs/development/libraries/libjingle/0.3.11.nix @@ -1,10 +1,12 @@ -args: with args; +{ stdenv, fetchurl, mediastreamer }: + stdenv.mkDerivation rec { - name = "libjingle-" + version; - src = fetchurl { - url = "mirror://sf/tapioca-voip/${name}.tar.gz"; - sha256 = "1x5l2jwxpkyxvnq0cagq40p6x61v23vxngnnsxr15lyh1zwzk1yj"; - }; + name = "libjingle-0.3.11"; + + src = fetchurl { + url = "mirror://sourceforge/tapioca-voip/${name}.tar.gz"; + sha256 = "1x5l2jwxpkyxvnq0cagq40p6x61v23vxngnnsxr15lyh1zwzk1yj"; + }; propagatedBuildInputs = [ mediastreamer ]; } diff --git a/pkgs/development/libraries/mediastreamer/2.2.0-cvs20080207.nix b/pkgs/development/libraries/mediastreamer/2.2.0-cvs20080207.nix index 0d2cefee200..2b4a6a35f83 100644 --- a/pkgs/development/libraries/mediastreamer/2.2.0-cvs20080207.nix +++ b/pkgs/development/libraries/mediastreamer/2.2.0-cvs20080207.nix @@ -1,7 +1,8 @@ -args: with args; +{ stdenv, fetchurl, autoconf, automake, libtool +, pkgconfig, alsaLib, ffmpeg, speex, ortp }: stdenv.mkDerivation rec { - name = "mediastreamer2-" + version; + name = "mediastreamer2-2.2.0-cvs20080207"; # This url is not related to mediastreamer. fetchcvs doesn't work on my laptop, # so I've created cvs snapshot and put it to my server. diff --git a/pkgs/development/libraries/msilbc/2.0.0.nix b/pkgs/development/libraries/msilbc/default.nix similarity index 72% rename from pkgs/development/libraries/msilbc/2.0.0.nix rename to pkgs/development/libraries/msilbc/default.nix index 8bc8f2a6c1d..2978f0808c1 100644 --- a/pkgs/development/libraries/msilbc/2.0.0.nix +++ b/pkgs/development/libraries/msilbc/default.nix @@ -1,6 +1,8 @@ -args: with args; +{ stdenv, fetchurl, ilbc, mediastreamer, pkgconfig }: + stdenv.mkDerivation rec { - name = "msilbc-" + version; + name = "msilbc-2.0.0"; + src = fetchurl { url = "http://download.savannah.gnu.org/releases/linphone/plugins/sources/${name}.tar.gz"; sha256 = "0ifydb7qmpync56l4hbrp36n5wrb7gadb76isp643s6wsg7l743j"; @@ -9,6 +11,7 @@ stdenv.mkDerivation rec { patchPhase = "sed -i /MS_FILTER_SET_FMTP/d ilbc.c"; propagatedBuildInputs = [ilbc mediastreamer]; + buildInputs = [pkgconfig]; buildPhase = '' @@ -17,8 +20,8 @@ stdenv.mkDerivation rec { cc `pkg-config --libs mediastreamer` -shared -pthread -o libilbc.so ''; - installPhase = " - ensureDir \${out}/lib/mediastreamer/plugins - cp libilbc.so \${out}/lib/mediastreamer/plugins - "; + installPhase = '' + ensureDir $out/lib/mediastreamer/plugins + cp libilbc.so $out/lib/mediastreamer/plugins + ''; } diff --git a/pkgs/development/libraries/redland/1.0.9.nix b/pkgs/development/libraries/redland/1.0.9.nix index 93606ad0eb5..dd67ae60f1d 100644 --- a/pkgs/development/libraries/redland/1.0.9.nix +++ b/pkgs/development/libraries/redland/1.0.9.nix @@ -1,10 +1,7 @@ args: with args; -let name = "redland-${version}"; -in - -stdenv.mkDerivation { - inherit name; +stdenv.mkDerivation rec { + name = "redland-1.0.9"; src = fetchurl { url = "mirror://sf/librdf/${name}.tar.gz"; diff --git a/pkgs/development/libraries/tk/8.4.16.nix b/pkgs/development/libraries/tk/8.4.16.nix deleted file mode 100644 index 38b7ec85749..00000000000 --- a/pkgs/development/libraries/tk/8.4.16.nix +++ /dev/null @@ -1,18 +0,0 @@ -args: with args; - -stdenv.mkDerivation { - name = "tk-${version}"; - src = fetchurl { - url = "mirror://sourceforge/tcl/tk${version}-src.tar.gz"; - sha256 = "0cciavzd05bpm5yfppid0s0vsf8kabwia9620vgvi26sv1gjgwhb"; - }; - postInstall = '' - echo -e '#! /bin/sh \n $( readlink -f $( type -tP wish${builtins.substring 0 3 version}) ) "$@"' >$out/bin/wish - chmod a+x $out/bin/wish - ''; - configureFlags="--with-tcl=${tcl}/lib"; - preConfigure = "cd unix"; - - buildInputs = [tcl x11]; - inherit tcl; -} diff --git a/pkgs/development/libraries/tk/8.4.18.nix b/pkgs/development/libraries/tk/8.4.18.nix deleted file mode 100644 index f09303ade45..00000000000 --- a/pkgs/development/libraries/tk/8.4.18.nix +++ /dev/null @@ -1,18 +0,0 @@ -args: with args; - -stdenv.mkDerivation { - name = "tk-${version}"; - src = fetchurl { - url = "mirror://sourceforge/tcl/tk${version}-src.tar.gz"; - sha256 = "065cbs82a8nklmj4867744skb3l3mqv14s8jwribk2wazzdb0mqp"; - }; - postInstall = '' - echo -e '#! /bin/sh \n $( readlink -f $( type -tP wish${__substring 0 3 version}) ) "$@"' >$out/bin/wish - chmod a+x $out/bin/wish - ''; - configureFlags="--with-tcl=${tcl}/lib"; - preConfigure = "cd unix"; - - buildInputs = [tcl x11]; - inherit tcl; -} diff --git a/pkgs/development/libraries/tk/8.5.7.nix b/pkgs/development/libraries/tk/8.5.7.nix index 56a757c8c7c..bf6da7b6598 100644 --- a/pkgs/development/libraries/tk/8.5.7.nix +++ b/pkgs/development/libraries/tk/8.5.7.nix @@ -1,17 +1,22 @@ -args: with args; +{ stdenv, fetchurl, tcl, x11 }: stdenv.mkDerivation { - name = "tk-${version}"; + name = "tk-8.5.7"; + src = fetchurl { - url = "mirror://sourceforge/tcl/tk${version}-src.tar.gz"; + url = "mirror://sourceforge/tcl/tk8.5.7-src.tar.gz"; sha256 = "0c5gsy3nlwl0wn9swz4k4v7phy7nzjl317gca1jykgf4jz9nwdnr"; }; + postInstall = '' ln -s $out/bin/wish* $out/bin/wish ''; - configureFlags="--with-tcl=${tcl}/lib"; + + configureFlags = "--with-tcl=${tcl}/lib"; + preConfigure = "cd unix"; buildInputs = [tcl x11]; + inherit tcl; } diff --git a/pkgs/development/libraries/xapian/bindings/1.0.14.nix b/pkgs/development/libraries/xapian/bindings/1.0.14.nix index 9761c683447..28eacd4e4e4 100644 --- a/pkgs/development/libraries/xapian/bindings/1.0.14.nix +++ b/pkgs/development/libraries/xapian/bindings/1.0.14.nix @@ -3,7 +3,7 @@ args: with args; let inherit (args.composableDerivation) composableDerivation wwf; in composableDerivation {} { - name = "xapian-bindings-${version}"; + name = "xapian-bindings-1.0.14"; src = fetchurl { url = http://oligarchy.co.uk/xapian/1.0.14/xapian-bindings-1.0.14.tar.gz; diff --git a/pkgs/development/libraries/xapian/1.0.14.nix b/pkgs/development/libraries/xapian/default.nix similarity index 55% rename from pkgs/development/libraries/xapian/1.0.14.nix rename to pkgs/development/libraries/xapian/default.nix index b4ce74640ea..6b2966ee7e2 100644 --- a/pkgs/development/libraries/xapian/1.0.14.nix +++ b/pkgs/development/libraries/xapian/default.nix @@ -1,6 +1,7 @@ -args: with args; +{ stdenv, fetchurl, zlib }: + stdenv.mkDerivation { - name = "xapian-${version}"; + name = "xapian-1.0.14"; src = fetchurl { url = http://oligarchy.co.uk/xapian/1.0.14/xapian-core-1.0.14.tar.gz; @@ -10,8 +11,8 @@ stdenv.mkDerivation { buildInputs = [zlib]; meta = { - description = "Xapian Probabilistic Information Retrieval library"; - homepage = "http://xapian.org"; - license = "GPLv2"; + description = "Xapian Probabilistic Information Retrieval library"; + homepage = "http://xapian.org"; + license = "GPLv2"; }; } diff --git a/pkgs/development/python-modules/flup/default.nix b/pkgs/development/python-modules/flup/default.nix new file mode 100644 index 00000000000..be9fd84d1fd --- /dev/null +++ b/pkgs/development/python-modules/flup/default.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchurl, python, setuptools }: + +stdenv.mkDerivation rec { + name = "flup-r2311"; + + src = fetchurl { + url = "http://www.saddi.com/software/flup/dist/${name}.tar.gz"; + sha256 = "15wyn6d6wla1ag91yxmlh9b4m0w1i0c2lm8ka4qfv4ijqcqakdx3"; + }; + + buildInputs = [ python setuptools ]; + + meta = { + description = "FastCGI Python module set"; + }; +} diff --git a/pkgs/development/python-modules/flup/r2311.nix b/pkgs/development/python-modules/flup/r2311.nix deleted file mode 100644 index 1334a7e7539..00000000000 --- a/pkgs/development/python-modules/flup/r2311.nix +++ /dev/null @@ -1,18 +0,0 @@ -args : with args; -rec { - src = fetchurl { - url = http://www.saddi.com/software/flup/dist/flup-r2311.tar.gz; - sha256 = "15wyn6d6wla1ag91yxmlh9b4m0w1i0c2lm8ka4qfv4ijqcqakdx3"; - }; - - buildInputs = [python setuptools]; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["addInputs" "createPythonInstallationTarget" (doDump "0") "installPythonPackage"]; - - name = "flup-" + version; - meta = { - description = "FastCGI Python module set"; - }; -} diff --git a/pkgs/development/python-modules/pyqt/4.3.3.nix b/pkgs/development/python-modules/pyqt/4.3.3.nix index 23bed9c9c0a..370366ba0e0 100644 --- a/pkgs/development/python-modules/pyqt/4.3.3.nix +++ b/pkgs/development/python-modules/pyqt/4.3.3.nix @@ -1,4 +1,5 @@ -args : with args; +args : with args; + rec { src = fetchurl { url = mirror://debian/pool/main/p/python-qt4/python-qt4_4.3.3.orig.tar.gz; @@ -12,7 +13,7 @@ rec { phaseNames = ["doPythonConfigure" "doMakeInstall"]; extraPythonConfigureCommand = ''echo yes | \''; - name = "python-qt-" + version; + name = "python-qt-4.3.3"; meta = { description = "Qt bindings for Python"; license = "GPL"; diff --git a/pkgs/development/python-modules/python-sip/4.7.4.nix b/pkgs/development/python-modules/python-sip/4.7.4.nix index bc4437a2795..759246ebf0d 100644 --- a/pkgs/development/python-modules/python-sip/4.7.4.nix +++ b/pkgs/development/python-modules/python-sip/4.7.4.nix @@ -11,7 +11,7 @@ rec { /* doConfigure should be specified separately */ phaseNames = ["doPythonConfigure" "doMakeInstall"]; - name = "python-sip-" + version; + name = "python-sip-4.7.4"; meta = { description = "Python/C++ bindings generator"; }; diff --git a/pkgs/development/tools/misc/xxdiff/3.2.nix b/pkgs/development/tools/misc/xxdiff/3.2.nix index 8100972d6ea..44d869c107e 100644 --- a/pkgs/development/tools/misc/xxdiff/3.2.nix +++ b/pkgs/development/tools/misc/xxdiff/3.2.nix @@ -34,7 +34,7 @@ rec { cd .. '') ["minInit" "doMake" "defEnsureDir" "addInputs"]; - name = "xxdiff-" + version; + name = "xxdiff-3.2"; meta = { description = "Interactive merge tool"; }; diff --git a/pkgs/games/construo/0.2.2.nix b/pkgs/games/construo/0.2.2.nix index 578e233cbd7..2b32020d8e9 100644 --- a/pkgs/games/construo/0.2.2.nix +++ b/pkgs/games/construo/0.2.2.nix @@ -20,7 +20,7 @@ args : with args; }; in with localDefs; stdenv.mkDerivation rec { - name = "construo-"+version; + name = "construo-0.2.2"; builder = writeScript (name + "-builder") (textClosure localDefs ["preConfigure" "doConfigure" "doMakeInstall" "doForceShare" "doPropagate"]); meta = { diff --git a/pkgs/games/orbit/1.01.nix b/pkgs/games/orbit/1.01.nix index a8cd48d99e6..84a699d1a14 100644 --- a/pkgs/games/orbit/1.01.nix +++ b/pkgs/games/orbit/1.01.nix @@ -30,7 +30,7 @@ EOF }); in with localDefs; stdenv.mkDerivation rec { - name = "space-orbit-"+version; + name = "space-orbit-1.01"; builder = writeScript (name + "-builder") (textClosure localDefs [ customBuild doForceShare doPropagate]); diff --git a/pkgs/os-specific/linux/atheros/0.9.4.nix b/pkgs/os-specific/linux/atheros/0.9.4.nix index c2d39072750..780e19757b2 100644 --- a/pkgs/os-specific/linux/atheros/0.9.4.nix +++ b/pkgs/os-specific/linux/atheros/0.9.4.nix @@ -17,7 +17,7 @@ postInstall = fullDepEntry ('' '') [minInit doMakeInstall]; in stdenv.mkDerivation rec { - name = "atheros-"+version; + name = "atheros-0.9.4"; builder = writeScript (name + "-builder") (textClosure localDefs [doMakeInstall postInstall doForceShare doPropagate]); diff --git a/pkgs/os-specific/linux/jfsrec/default.nix b/pkgs/os-specific/linux/jfsrec/default.nix new file mode 100644 index 00000000000..a805e86f0dd --- /dev/null +++ b/pkgs/os-specific/linux/jfsrec/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, boost }: + +stdenv.mkDerivation { + name = "jfsrec-pre-svn-7"; + + src = fetchurl { + url = http://downloads.sourceforge.net/jfsrec/jfsrec-svn-7.tar.gz; + sha256 = "163z6ljr05vw2k5mj4fim2nlg4khjyibrii95370pvn474mg28vg"; + }; + + buildInputs = [ boost ]; + + preConfigure = + '' + sed -e '/[#]include [<]config.h[>]/a\#include ' -i src/unicode_to_utf8.cpp + cat src/unicode_to_utf8.cpp + ''; + + meta = { + description = "JFS recovery tool"; + }; +} diff --git a/pkgs/os-specific/linux/jfsrec/svn-7.nix b/pkgs/os-specific/linux/jfsrec/svn-7.nix deleted file mode 100644 index 2516a505848..00000000000 --- a/pkgs/os-specific/linux/jfsrec/svn-7.nix +++ /dev/null @@ -1,23 +0,0 @@ -args : with args; -rec { - src = fetchurl { - url = http://downloads.sourceforge.net/jfsrec/jfsrec-svn-7.tar.gz; - sha256 = "163z6ljr05vw2k5mj4fim2nlg4khjyibrii95370pvn474mg28vg"; - }; - - buildInputs = [boost]; - configureFlags = []; - - doFixInc = fullDepEntry ('' - sed -e '/[#]include [<]config.h[>]/a\#include ' -i src/unicode_to_utf8.cpp - cat src/unicode_to_utf8.cpp - '') ["minInit" "doUnpack"]; - - /* doConfigure should be specified separately */ - phaseNames = ["doFixInc" "doConfigure" "doMakeInstall"]; - - name = "jfsrec-" + version; - meta = { - description = "JFS recovery tool"; - }; -} diff --git a/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix b/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix index 75d7483e33b..ba5cf2e1d0f 100644 --- a/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix +++ b/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix @@ -1,37 +1,28 @@ -args : with args; -rec { - name = "kqemu-"+version; +{ stdenv, fetchurl, kernel, perl }: + +stdenv.mkDerivation rec { + name = "kqemu-1.4.0pre1"; + src = fetchurl { - url = http://www.nongnu.org/qemu/kqemu-1.4.0pre1.tar.gz; + url = "http://www.nongnu.org/qemu/${name}.tar.gz"; sha256 = "14dlmawn3gia1j401ag5si5k1a1vav7jpv86rl37p1hwmr7fihxs"; }; buildInputs = [perl]; + configureFlags = [''--PREFIx=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)'']; - debugStep = fullDepEntry ('' - cat config-host.mak - '') ["minInit"]; - preConfigure = fullDepEntry ('' + + preConfigure = '' + sed -e '/#include/i#include ' -i kqemu-linux.c + + sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static void *my/g' -i common/kern sed -e 's/`uname -r`/'"$(basename ${kernel}/lib/modules/*)"'/' -i install.sh sed -e '/kernel_path=/akernel_path=$out$kernel_path' -i install.sh sed -e '/depmod/d' -i install.sh cat install.sh - '') ["minInit" "doUnpack"]; - fixInc = { - text = '' - sed -e '/#include/i#include ' -i kqemu-linux.c - ''; - deps = ["minInit" "doUnpack"]; - }; - fixMemFunc = { - text='' - sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static void *my/g' -i common/kernel.c - ''; - deps = ["minInit" "doUnpack"]; - }; - phaseNames = ["fixInc" "fixMemFunc" "preConfigure" "doConfigure" "debugStep" "doMakeInstall"]; - + ''; # */ + meta = { - description = " Kernel module for Qemu acceleration "; + description = "Kernel module for Qemu acceleration"; }; } diff --git a/pkgs/servers/dict/1.9.15.nix b/pkgs/servers/dict/1.9.15.nix index 9eb0fe3dff9..de9c4f7eeae 100644 --- a/pkgs/servers/dict/1.9.15.nix +++ b/pkgs/servers/dict/1.9.15.nix @@ -11,7 +11,7 @@ args : with args; with builderDefs; }) // args); in with localDefs; stdenv.mkDerivation rec { - name = "dict-"+version; + name = "dict-1.9.15"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); diff --git a/pkgs/servers/dns/bind/9.5.0.nix b/pkgs/servers/dns/bind/9.5.0.nix index 9e73895d8d9..b6361864d10 100644 --- a/pkgs/servers/dns/bind/9.5.0.nix +++ b/pkgs/servers/dns/bind/9.5.0.nix @@ -12,7 +12,7 @@ rec { /* doConfigure should be specified separately */ phaseNames = ["doConfigure" "doMakeInstall"]; - name = "bind-" + version; + name = "bind-9.5.0"; meta = { description = "ISC BIND: a domain name server"; }; diff --git a/pkgs/servers/gpm/1.20.6.nix b/pkgs/servers/gpm/1.20.6.nix deleted file mode 100644 index 6e9e6e64d51..00000000000 --- a/pkgs/servers/gpm/1.20.6.nix +++ /dev/null @@ -1,22 +0,0 @@ -args : with args; -rec { - src = fetchurl { - url = http://linux.schottelius.org/gpm/archives/gpm-1.20.6.tar.lzma; - sha256 = "13w61bh9nyjaa0n5a7qq1rvbqxjbxpqz5qmdmqqpqgrd2jlviar7"; - }; - - buildInputs = [lzma flex bison ncurses]; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"]; - - preConfigure = fullDepEntry ('' - sed -e 's/[$](MKDIR)/mkdir -p /' -i doc/Makefile.in - '') ["addInputs" "doUnpack" "minInit"]; - - name = "gpm-" + version; - meta = { - description = "Mouse daemon"; - }; -} diff --git a/pkgs/servers/gpm/default.nix b/pkgs/servers/gpm/default.nix new file mode 100644 index 00000000000..9b6eb2d648b --- /dev/null +++ b/pkgs/servers/gpm/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, lzma, flex, bison, ncurses }: + +stdenv.mkDerivation rec { + name = "gpm-1.20.6"; + + src = fetchurl { + url = "http://linux.schottelius.org/gpm/archives/${name}.tar.lzma"; + sha256 = "13w61bh9nyjaa0n5a7qq1rvbqxjbxpqz5qmdmqqpqgrd2jlviar7"; + }; + + buildInputs = [lzma flex bison ncurses]; + + preConfigure = + '' + sed -e 's/[$](MKDIR)/mkdir -p /' -i doc/Makefile.in + ''; + + meta = { + description = "Mouse daemon"; + }; +} diff --git a/pkgs/shells/zsh/4.3.4.nix b/pkgs/shells/zsh/4.3.4.nix deleted file mode 100644 index ea9a82cf683..00000000000 --- a/pkgs/shells/zsh/4.3.4.nix +++ /dev/null @@ -1,13 +0,0 @@ -args: with args; -stdenv.mkDerivation { - name = "zsh-4.3.4"; - - src = fetchurl { - url = mirror://sourceforge/zsh/zsh-4.3.4.tar.bz2; - sha256 = "1inypy60h7hir8hwidid85pbajrb5w09fl222p0h4fnsn0nf583g"; - }; - - configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte"; - - buildInputs = [ncurses coreutils]; -} diff --git a/pkgs/shells/zsh/4.3.5.nix b/pkgs/shells/zsh/4.3.5.nix deleted file mode 100644 index c626db49107..00000000000 --- a/pkgs/shells/zsh/4.3.5.nix +++ /dev/null @@ -1,22 +0,0 @@ -args: with args; -let documentation = fetchurl { - url = mirror://sourceforge/zsh/zsh-4.3.5-doc.tar.bz2; - sha256 = "0jf35xibp8wfka7rdk9q8spkwprlhjx1sp7vp6img8wks12cvlkx"; - }; -in -stdenv.mkDerivation { - name = "zsh-${version}"; - - src = fetchurl { - url = mirror://sourceforge/zsh/zsh-4.3.5.tar.bz2; - sha256 = "0191j3liflkjrj39i2yrs3ab9jcx4zd93rirx3j17dymfgqlvrzb"; - }; - configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte"; - - postInstall = '' - ensureDir $out/share/ - tar xf ${documentation} -C $out/share - ''; - - buildInputs = [ncurses coreutils]; -} diff --git a/pkgs/shells/zsh/cvs.nix b/pkgs/shells/zsh/cvs.nix deleted file mode 100644 index db34f0666d5..00000000000 --- a/pkgs/shells/zsh/cvs.nix +++ /dev/null @@ -1,19 +0,0 @@ -args: with args; -# cvs does include docs -# the cvs snapshot is updated occasionally. see bleedingEdgeRepos - -stdenv.mkDerivation { - name = "zsh-${version}"; - - src = sourceByName "zsh"; - configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte"; - - preConfigure = "autoconf; autoheader"; - - postInstall = '' - ensureDir $out/share/ - cp -R Doc $out/share - ''; - - buildInputs = [ncurses coreutils autoconf yodl ]; -} diff --git a/pkgs/shells/zsh/4.3.9.nix b/pkgs/shells/zsh/default.nix similarity index 84% rename from pkgs/shells/zsh/4.3.9.nix rename to pkgs/shells/zsh/default.nix index 6a1d0d14dee..eacda19a8de 100644 --- a/pkgs/shells/zsh/4.3.9.nix +++ b/pkgs/shells/zsh/default.nix @@ -1,9 +1,16 @@ -args: with args; -let documentation = fetchurl { +{ stdenv, fetchurl, ncurses, coreutils }: + +let + + version = "4.3.9"; + + documentation = fetchurl { url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.bz2"; sha256 = "0rc19q5r8x2yln7synpqzxngm7g4g6idrpgc1i0jsawc48m7dbhm"; }; + in + stdenv.mkDerivation { name = "zsh-${version}"; @@ -11,6 +18,7 @@ stdenv.mkDerivation { url = "mirror://sourceforge/zsh/zsh-${version}.tar.bz2"; sha256 = "1aw28c5w83vl2ckbvf6ljj00s36icyrnxcm1r6q63863dmn6vpcg"; }; + configureFlags = "--with-tcsetpgrp --enable-maildir-support --enable-multibyte"; postInstall = '' diff --git a/pkgs/tools/X11/x11vnc/0.9.3.nix b/pkgs/tools/X11/x11vnc/0.9.3.nix index f37a98a43d4..b8587ed223f 100644 --- a/pkgs/tools/X11/x11vnc/0.9.3.nix +++ b/pkgs/tools/X11/x11vnc/0.9.3.nix @@ -14,7 +14,7 @@ args : with args; with builderDefs; }); in with localDefs; stdenv.mkDerivation rec { - name = "x11vnc-"+version; + name = "x11vnc-0.9.3"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); diff --git a/pkgs/tools/X11/x2vnc/1.7.2.nix b/pkgs/tools/X11/x2vnc/1.7.2.nix index 9c7e024551d..c65105e4796 100644 --- a/pkgs/tools/X11/x2vnc/1.7.2.nix +++ b/pkgs/tools/X11/x2vnc/1.7.2.nix @@ -15,7 +15,7 @@ args : with args; with builderDefs.passthru.function {src="";}; }) // args); /* null is a terminator for sumArgs */ in with localDefs; stdenv.mkDerivation rec { - name = "x2vnc-"+version; + name = "x2vnc-1.7.2"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doCreatePrefix doMakeInstall doForceShare doPropagate]); diff --git a/pkgs/tools/archivers/sharutils/4.6.3.nix b/pkgs/tools/archivers/sharutils/4.6.3.nix index 830c2a072b6..cd70550117a 100644 --- a/pkgs/tools/archivers/sharutils/4.6.3.nix +++ b/pkgs/tools/archivers/sharutils/4.6.3.nix @@ -1,9 +1,10 @@ -args: with args; +{ stdenv, fetchurl }: + stdenv.mkDerivation rec { - name = "sharutils-" + version; + name = "sharutils-4.6.3"; src = fetchurl { - url = "mirror://gnu/sharutils/REL-${version}/${name}.tar.bz2"; + url = "mirror://gnu/sharutils/REL-4.6.3/${name}.tar.bz2"; sha256 = "1sirrzas8llcsd8gnh56pns39wa1f803vff1kmy5islfi1p9vqk8"; }; diff --git a/pkgs/tools/misc/mdbtools/0.6-pre1.nix b/pkgs/tools/misc/mdbtools/default.nix similarity index 58% rename from pkgs/tools/misc/mdbtools/0.6-pre1.nix rename to pkgs/tools/misc/mdbtools/default.nix index 9478ef1286b..9b1968c6fd1 100644 --- a/pkgs/tools/misc/mdbtools/0.6-pre1.nix +++ b/pkgs/tools/misc/mdbtools/default.nix @@ -1,21 +1,19 @@ -args : with args; -rec { +{ stdenv, fetchurl, glib, readline, bison, flex, pkgconfig }: + +stdenv.mkDerivation { + name = "mdbtools-0.6pre1"; + src = fetchurl { url = http://prdownloads.sourceforge.net/mdbtools/mdbtools-0.6pre1.tar.gz; sha256 = "1lz33lmqifjszad7rl1r7rpxbziprrm5rkb27wmswyl5v98dqsbi"; }; buildInputs = [glib readline bison flex pkgconfig]; - configureFlags = []; - preConfigure = fullDepEntry ('' + preConfigure = '' sed -e 's@static \(GHashTable [*]mdb_backends;\)@\1@' -i src/libmdb/backend.c - '') ["doUnpack" "minInit"]; + ''; - /* doConfigure should be specified separately */ - phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"]; - - name = "mdbtools-" + version; meta = { description = ".mdb (MS Access) format tools"; }; diff --git a/pkgs/tools/misc/minicom/2.3.nix b/pkgs/tools/misc/minicom/2.3.nix deleted file mode 100644 index 9be249231c3..00000000000 --- a/pkgs/tools/misc/minicom/2.3.nix +++ /dev/null @@ -1,18 +0,0 @@ -args : with args; -rec { - src = fetchurl { - url = http://alioth.debian.org/frs/download.php/2332/minicom-2.3.tar.gz; - sha256 = "1ysn0crdhvwyvdlbw0ms5nq06xy2pd2glwjs53p384byl3ac7jra"; - }; - - buildInputs = [ncurses]; - configureFlags = [ "--sysconfdir=/etc" ]; - - /* doConfigure should be specified separately */ - phaseNames = [ "doConfigure" "doMakeInstall"]; - - name = "minicom-" + version; - meta = { - description = "Serial console"; - }; -} diff --git a/pkgs/tools/misc/minicom/default.nix b/pkgs/tools/misc/minicom/default.nix new file mode 100644 index 00000000000..2cd383bd698 --- /dev/null +++ b/pkgs/tools/misc/minicom/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, ncurses }: + +stdenv.mkDerivation rec { + name = "minicom-2.3"; + + src = fetchurl { + url = "http://alioth.debian.org/frs/download.php/2332/${name}.tar.gz"; + sha256 = "1ysn0crdhvwyvdlbw0ms5nq06xy2pd2glwjs53p384byl3ac7jra"; + }; + + buildInputs = [ncurses]; + + configureFlags = [ "--sysconfdir=/etc" ]; + + meta = { + description = "Serial console"; + }; +} diff --git a/pkgs/tools/misc/relfs/cvs.2008.03.05.nix b/pkgs/tools/misc/relfs/cvs.2008.03.05.nix index 640e46d54f1..178aa700fa5 100644 --- a/pkgs/tools/misc/relfs/cvs.2008.03.05.nix +++ b/pkgs/tools/misc/relfs/cvs.2008.03.05.nix @@ -43,7 +43,7 @@ args : with args; assert args.libuuid != null; stdenv.mkDerivation rec { - name = "relfs-"+version; + name = "relfs-2008.03.05"; builder = writeScript (name + "-builder") (textClosure localDefs ["build" "doMakeInstall" "doForceShare" "doPropagate"]); meta = { diff --git a/pkgs/tools/misc/rlwrap/0.28.nix b/pkgs/tools/misc/rlwrap/0.28.nix index 1bd45375510..1b9bbb995ac 100644 --- a/pkgs/tools/misc/rlwrap/0.28.nix +++ b/pkgs/tools/misc/rlwrap/0.28.nix @@ -11,7 +11,7 @@ args : with args; with builderDefs; }; in with localDefs; stdenv.mkDerivation rec { - name = "rlwrap-"+version; + name = "rlwrap-0.28"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); diff --git a/pkgs/tools/misc/uucp/1.07.nix b/pkgs/tools/misc/uucp/default.nix similarity index 57% rename from pkgs/tools/misc/uucp/1.07.nix rename to pkgs/tools/misc/uucp/default.nix index 7ac48f39664..b0741311dff 100644 --- a/pkgs/tools/misc/uucp/1.07.nix +++ b/pkgs/tools/misc/uucp/default.nix @@ -1,17 +1,13 @@ -args : with args; -rec { +{ stdenv, fetchurl }: + +stdenv.mkDerivation { + name = "uucp-1.07"; + src = fetchurl { url = http://ftp.de.debian.org/debian/pool/main/u/uucp/uucp_1.07.orig.tar.gz; sha256 = "0b5nhl9vvif1w3wdipjsk8ckw49jj1w85xw1mmqi3zbcpazia306"; }; - buildInputs = []; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - name = "uucp-" + version; meta = { description = "Unix-unix cp over serial line, also includes cu program"; }; diff --git a/pkgs/tools/networking/nc6/1.0.nix b/pkgs/tools/networking/nc6/1.0.nix index b6155c7a053..5cba3ae017c 100644 --- a/pkgs/tools/networking/nc6/1.0.nix +++ b/pkgs/tools/networking/nc6/1.0.nix @@ -11,7 +11,7 @@ let localDefs = builderDefs.passthru.function (rec { }); in with localDefs; stdenv.mkDerivation rec { - name = "nc6-"+version; + name = "nc6-1.0"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); diff --git a/pkgs/tools/networking/smbfs-fuse/0.8.7.nix b/pkgs/tools/networking/smbfs-fuse/0.8.7.nix index dbd6bfc2c8c..4b656b70388 100644 --- a/pkgs/tools/networking/smbfs-fuse/0.8.7.nix +++ b/pkgs/tools/networking/smbfs-fuse/0.8.7.nix @@ -17,7 +17,7 @@ args : with args; with builderDefs; }; in with localDefs; stdenv.mkDerivation rec { - name = "smbfs-fuse-"+version; + name = "smbfs-fuse-0.8.7"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall postInstall doForceShare doPropagate]); diff --git a/pkgs/tools/networking/socat/1.6.0.1.nix b/pkgs/tools/networking/socat/1.6.0.1.nix deleted file mode 100644 index 8840d134773..00000000000 --- a/pkgs/tools/networking/socat/1.6.0.1.nix +++ /dev/null @@ -1,25 +0,0 @@ -args : with args; -rec { - src = /* Here a fetchurl expression goes */ - fetchurl { - url = http://www.dest-unreach.org/socat/download/socat-1.6.0.1.tar.bz2; - sha256 = "1cl7kf0rnbvjxz8vdkmdh1crd069qmz1jjw40r8bydgpn0nsh6qd"; - }; - - buildInputs = [openssl]; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["doPatch" "doConfigure" "doMakeInstall"]; - - name = "socat-" + version; - meta = { - description = "Socat - a different replacement for netcat"; - longDesc = " - Socat, one more analogue of netcat, but not mimicking it. - 'netcat++' (extended design, new implementation) -"; - homepage = "http://www.dest-unreach.org/socat/"; - srcs = patches; - }; -} diff --git a/pkgs/tools/networking/socat/default.nix b/pkgs/tools/networking/socat/default.nix new file mode 100644 index 00000000000..7669a9b2d32 --- /dev/null +++ b/pkgs/tools/networking/socat/default.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchurl, openssl }: + +stdenv.mkDerivation rec { + name = "socat-1.6.0.1"; + + src = fetchurl { + url = "http://www.dest-unreach.org/socat/download/${name}.tar.bz2"; + sha256 = "1cl7kf0rnbvjxz8vdkmdh1crd069qmz1jjw40r8bydgpn0nsh6qd"; + }; + + buildInputs = [openssl]; + + meta = { + description = "Socat - a different replacement for netcat"; + homepage = "http://www.dest-unreach.org/socat/"; + }; +} diff --git a/pkgs/tools/security/metasploit/3.1.nix b/pkgs/tools/security/metasploit/3.1.nix index db4dcf3a835..94bc009080d 100644 --- a/pkgs/tools/security/metasploit/3.1.nix +++ b/pkgs/tools/security/metasploit/3.1.nix @@ -22,7 +22,7 @@ rec { /* doConfigure should be specified separately */ phaseNames = ["doInstall" (doPatchShebangs "$out/share/msf")]; - name = "metasploit-framework" + version; + name = "metasploit-framework-3.1"; meta = { description = "Metasploit Framework - a collection of exploits"; homepage = "http://framework.metasploit.org/"; diff --git a/pkgs/tools/security/ssss/0.5.nix b/pkgs/tools/security/ssss/0.5.nix index 9b460d0226c..15288361baf 100644 --- a/pkgs/tools/security/ssss/0.5.nix +++ b/pkgs/tools/security/ssss/0.5.nix @@ -18,7 +18,7 @@ args : with args; with builderDefs; }); in with localDefs; stdenv.mkDerivation rec { - name = "ssss-"+version; + name = "ssss-0.5"; builder = writeScript (name + "-builder") (textClosure localDefs ["doPatch" doMakeInstall doForceShare doPropagate]); diff --git a/pkgs/tools/system/ddrescue/1.8.nix b/pkgs/tools/system/ddrescue/1.8.nix deleted file mode 100644 index 01d1927573b..00000000000 --- a/pkgs/tools/system/ddrescue/1.8.nix +++ /dev/null @@ -1,20 +0,0 @@ - -args : with args; -rec { - src = fetchurl { - url = http://ftp.gnu.org/gnu/ddrescue/ddrescue-1.8.tar.bz2; - sha256 = "080k1s4knh9baw3dxr5vqjjph6dqzkfpk0kpld0a3qc07vsxmhbz"; - }; - - buildInputs = []; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - name = "ddrescue-" + version; - meta = { - description = "GNU ddrescue - advanced dd for corrupted media"; - }; -} - diff --git a/pkgs/tools/system/ddrescue/default.nix b/pkgs/tools/system/ddrescue/default.nix new file mode 100644 index 00000000000..4ab848ad6e9 --- /dev/null +++ b/pkgs/tools/system/ddrescue/default.nix @@ -0,0 +1,15 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "ddrescue-1.8"; + + src = fetchurl { + url = "http://ftp.gnu.org/gnu/ddrescue/${name}.tar.bz2"; + sha256 = "080k1s4knh9baw3dxr5vqjjph6dqzkfpk0kpld0a3qc07vsxmhbz"; + }; + + meta = { + description = "GNU ddrescue - advanced dd for corrupted media"; + }; +} + diff --git a/pkgs/tools/system/gdmap/0.8.1.nix b/pkgs/tools/system/gdmap/0.8.1.nix index 982d5651f65..73d3ff92323 100644 --- a/pkgs/tools/system/gdmap/0.8.1.nix +++ b/pkgs/tools/system/gdmap/0.8.1.nix @@ -11,7 +11,7 @@ args : with args; }; in with localDefs; stdenv.mkDerivation rec { - name = "gdmap-"+version; + name = "gdmap-0.8.1"; builder = writeScript (name + "-builder") (textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]); meta = { diff --git a/pkgs/tools/text/cheetah-template/2.0.1.nix b/pkgs/tools/text/cheetah-template/2.0.1.nix index 117e0f88a8b..c20f5db9798 100644 --- a/pkgs/tools/text/cheetah-template/2.0.1.nix +++ b/pkgs/tools/text/cheetah-template/2.0.1.nix @@ -11,7 +11,7 @@ rec { /* doConfigure should be specified separately */ phaseNames = ["installPythonPackage" (makeManyWrappers ''$out/bin/*'' ''--prefix PYTHONPATH : $(toPythonPath $out)'')]; - name = "cheetah-template-" + version; + name = "cheetah-template-2.0.1"; meta = { description = "Templating engine"; }; diff --git a/pkgs/tools/text/highlight/2.6.10.nix b/pkgs/tools/text/highlight/2.6.10.nix deleted file mode 100644 index 675a996445f..00000000000 --- a/pkgs/tools/text/highlight/2.6.10.nix +++ /dev/null @@ -1,20 +0,0 @@ - -args : with args; -rec { - src = fetchurl { - url = http://www.andre-simon.de/zip/highlight-2.6.10.tar.bz2; - sha256 = "18f2ki9pajxlp0aq4ingxj7m0cp7wlbc40xm25pnxc1yis9vlira"; - }; - - buildInputs = [getopt]; - configureFlags = []; - makeFlags = ["PREFIX=$out"]; - - /* doConfigure should be specified separately */ - phaseNames = ["doMakeInstall"]; - - name = "highlight-" + version; - meta = { - description = "Source code highlighting tool"; - }; -} diff --git a/pkgs/tools/text/highlight/default.nix b/pkgs/tools/text/highlight/default.nix new file mode 100644 index 00000000000..dc4c0647f41 --- /dev/null +++ b/pkgs/tools/text/highlight/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, getopt }: + +stdenv.mkDerivation rec { + name = "highlight-2.6.10"; + + src = fetchurl { + url = "http://www.andre-simon.de/zip/${name}.tar.bz2"; + sha256 = "18f2ki9pajxlp0aq4ingxj7m0cp7wlbc40xm25pnxc1yis9vlira"; + }; + + buildInputs = [getopt]; + + makeFlags = ["PREFIX=$out"]; + + meta = { + description = "Source code highlighting tool"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 52ac49dc484..0fcf8ee8b4a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -174,19 +174,6 @@ let stringsWithDeps = lib.stringsWithDeps; - # Call a specific version of a Nix expression, that is, - # `selectVersion ./foo {version = "0.1.2"; args...}' evaluates to - # `import ./foo/0.1.2.nix args'. - selectVersion = dir: defVersion: args: - let - pVersion = - if (args ? version && args.version != "") then - args.version - else - getConfig [ (baseNameOf (toString dir)) "version" ] defVersion; - in - import (dir + "/${pVersion}.nix") (args // { version = pVersion; }); - deepOverride = newArgs: name: x: if builtins.isAttrs x then ( if x ? deepOverride then (x.deepOverride newArgs) else if x ? override then (x.override newArgs) else @@ -523,7 +510,7 @@ let inherit fetchurl stdenv python wxPython26; }; - bmrsa = builderDefsPackage (selectVersion ../tools/security/bmrsa "11") { + bmrsa = builderDefsPackage (import ../tools/security/bmrsa/11.nix) { inherit unzip; }; @@ -565,7 +552,7 @@ let inherit fetchurl stdenv gettext; }; - cheetahTemplate = builderDefsPackage (selectVersion ../tools/text/cheetah-template "2.0.1") { + cheetahTemplate = builderDefsPackage (import ../tools/text/cheetah-template/2.0.1.nix) { inherit makeWrapper python; }; @@ -640,7 +627,9 @@ let inherit fetchurl buildPerlPackage perl; }; - ddrescue = builderDefsPackage (selectVersion ../tools/system/ddrescue "1.8") {}; + ddrescue = import ../tools/system/ddrescue { + inherit fetchurl stdenv; + }; desktop_file_utils = import ../tools/misc/desktop-file-utils { inherit stdenv fetchurl pkgconfig glib; @@ -778,7 +767,7 @@ let inherit fetchurl stdenv; }); - gdmap = composedArgsAndFun (selectVersion ../tools/system/gdmap "0.8.1") { + gdmap = composedArgsAndFun (import ../tools/system/gdmap/0.8.1.nix) { inherit stdenv fetchurl builderDefs pkgconfig libxml2 intltool gettext; inherit (gtkLibs) gtk; @@ -930,8 +919,8 @@ let inherit fetchurl stdenv ocaml; }; - highlight = builderDefsPackage (selectVersion ../tools/text/highlight "2.6.10") { - inherit getopt; + highlight = import ../tools/text/highlight { + inherit fetchurl stdenv getopt; }; host = import ../tools/networking/host { @@ -1073,8 +1062,8 @@ let inherit fetchurl stdenv guile which ed; }; - mdbtools = builderDefsPackage (selectVersion ../tools/misc/mdbtools "0.6-pre1") { - inherit readline pkgconfig bison glib; + mdbtools = import ../tools/misc/mdbtools { + inherit fetchurl stdenv readline pkgconfig bison glib; flex = flex2535; }; @@ -1101,7 +1090,7 @@ let inherit fetchurl stdenv; }; - msf = builderDefsPackage (selectVersion ../tools/security/metasploit "3.1") { + msf = builderDefsPackage (import ../tools/security/metasploit/3.1.nix) { inherit ruby makeWrapper; }; @@ -1149,7 +1138,7 @@ let inherit fetchurl stdenv pkgconfig glib; }; - nc6 = composedArgsAndFun (selectVersion ../tools/networking/nc6 "1.0") { + nc6 = composedArgsAndFun (import ../tools/networking/nc6/1.0.nix) { inherit builderDefs; }; @@ -1372,7 +1361,7 @@ let inherit stdenv fetchurl; }; - relfs = composedArgsAndFun (selectVersion ../tools/misc/relfs "cvs.2008.03.05") { + relfs = composedArgsAndFun (import ../tools/misc/relfs/cvs.2008.03.05.nix) { inherit fetchcvs stdenv ocaml postgresql fuse pcre builderDefs pkgconfig libuuid; inherit (gnome) gnomevfs GConf; @@ -1401,7 +1390,7 @@ let logger = inetutils; }; - rlwrap = composedArgsAndFun (selectVersion ../tools/misc/rlwrap "0.28") { + rlwrap = composedArgsAndFun (import ../tools/misc/rlwrap/0.28.nix) { inherit builderDefs readline; }; @@ -1454,7 +1443,7 @@ let inherit groff; }; - sharutils = selectVersion ../tools/archivers/sharutils "4.6.3" { + sharutils = import ../tools/archivers/sharutils/4.6.3.nix { inherit fetchurl stdenv; }; @@ -1470,12 +1459,12 @@ let inherit fetchurl stdenv; }; - smbfsFuse = composedArgsAndFun (selectVersion ../tools/networking/smbfs-fuse "0.8.7") { + smbfsFuse = composedArgsAndFun (import ../tools/networking/smbfs-fuse/0.8.7.nix) { inherit builderDefs samba fuse; }; - socat = builderDefsPackage (selectVersion ../tools/networking/socat "1.6.0.1") { - inherit openssl; + socat = import ../tools/networking/socat { + inherit fetchurl stdenv openssl; }; sudo = import ../tools/security/sudo { @@ -1500,7 +1489,7 @@ let tlsSupport = true; }; - ssss = composedArgsAndFun (selectVersion ../tools/security/ssss "0.5") { + ssss = composedArgsAndFun (import ../tools/security/ssss/0.5.nix) { inherit builderDefs gmp; }; @@ -1761,11 +1750,8 @@ let inherit fetchurl stdenv ncurses; }; - zsh = composedArgsAndFun (selectVersion ../shells/zsh "4.3.9") { + zsh = import ../shells/zsh { inherit fetchurl stdenv ncurses coreutils; - # for CVS: - inherit (bleedingEdgeRepos) sourceByName; - inherit autoconf yodl; }; @@ -2073,8 +2059,8 @@ let libstdcpp5 = gcc33.gcc; }; - ikarus = builderDefsPackage (selectVersion ../development/compilers/ikarus "0.0.3") { - inherit gmp; + ikarus = import ../development/compilers/ikarus { + inherit stdenv fetchurl gmp; }; #TODO add packages http://cvs.haskell.org/Hugs/downloads/2006-09/packages/ and test @@ -2149,12 +2135,12 @@ let lua = lua5; }; - monotoneViz = builderDefsPackage (selectVersion ../applications/version-management/monotone-viz "mtn-head") { + monotoneViz = builderDefsPackage (import ../applications/version-management/monotone-viz/mtn-head.nix) { inherit ocaml lablgtk graphviz pkgconfig autoconf automake libtool; inherit (gnome) gtk libgnomecanvas glib; }; - viewMtn = builderDefsPackage (selectVersion ../applications/version-management/viewmtn "0.10") + viewMtn = builderDefsPackage (import ../applications/version-management/viewmtn/0.10.nix) { inherit monotone flup cheetahTemplate highlight ctags makeWrapper graphviz which python; @@ -2231,10 +2217,10 @@ let }; metaBuildEnv = import ../development/compilers/meta-environment/meta-build-env { - inherit fetchurl stdenv ; + inherit fetchurl stdenv; }; - swiProlog = composedArgsAndFun (selectVersion ../development/compilers/swi-prolog "5.6.51") { + swiProlog = import ../development/compilers/swi-prolog { inherit fetchurl stdenv; }; @@ -2457,7 +2443,7 @@ let inherit fetchurl stdenv stringsWithDeps lib builderDefs python; }; - Qi = composedArgsAndFun (selectVersion ../development/compilers/qi "9.1") { + Qi = composedArgsAndFun (import ../development/compilers/qi/9.1.nix) { inherit clisp stdenv fetchurl builderDefs unzip; }; @@ -2864,7 +2850,7 @@ let inherit fetchurl stdenv; }; - ltrace = composedArgsAndFun (selectVersion ../development/tools/misc/ltrace "0.5-3deb") { + ltrace = composedArgsAndFun (import ../development/tools/misc/ltrace/0.5-3deb.nix) { inherit fetchurl stdenv builderDefs stringsWithDeps lib elfutils; }; @@ -2997,7 +2983,7 @@ let inherit fetchurl stdenv perl gdb; }; - xxdiff = builderDefsPackage (selectVersion ../development/tools/misc/xxdiff "3.2") { + xxdiff = builderDefsPackage (import ../development/tools/misc/xxdiff/3.2.nix) { flex = flex2535; qt = qt3; inherit pkgconfig makeWrapper bison python; @@ -3027,7 +3013,7 @@ let inherit stdenv fetchurl gettext attr libtool; }); - adns = selectVersion ../development/libraries/adns "1.4" { + adns = import ../development/libraries/adns/1.4.nix { inherit stdenv fetchurl; static = getPkgConfig "adns" "static" (stdenv ? isStatic || stdenv ? isDietLibC); }; @@ -3257,9 +3243,7 @@ let libXrender; }; - enchant = makeOverridable - (selectVersion ../development/libraries/enchant "1.3.0") - { + enchant = makeOverridable (import ../development/libraries/enchant) { inherit fetchurl stdenv aspell pkgconfig; inherit (gnome) glib; }; @@ -3521,7 +3505,7 @@ let }; gst_all = recurseIntoAttrs (import ../development/libraries/gstreamer { - inherit lib selectVersion stdenv fetchurl perl bison pkgconfig libxml2 + inherit lib stdenv fetchurl perl bison pkgconfig libxml2 python alsaLib cdparanoia libogg libvorbis libtheora freetype liboil libjpeg zlib speex libpng libdv aalib cairo libcaca flac hal libiec61883 dbus libavc1394 ladspaH taglib pulseaudio gdbm bzip2 which makeOverridable; @@ -3819,15 +3803,13 @@ let inherit fetchurl stdenv; }; - libdbi = composedArgsAndFun (selectVersion ../development/libraries/libdbi "0.8.2") { + libdbi = composedArgsAndFun (import ../development/libraries/libdbi/0.8.2.nix) { inherit stdenv fetchurl builderDefs; }; - libdbiDriversBase = composedArgsAndFun - (selectVersion ../development/libraries/libdbi-drivers "0.8.2-1") - { - inherit stdenv fetchurl builderDefs libdbi; - }; + libdbiDriversBase = composedArgsAndFun (import ../development/libraries/libdbi-drivers/0.8.2-1.nix) { + inherit stdenv fetchurl builderDefs libdbi; + }; libdbiDrivers = libdbiDriversBase.passthru.function { inherit sqlite mysql; @@ -3877,7 +3859,7 @@ let inherit fetchurl stdenv gettext; }; - libextractor = composedArgsAndFun (selectVersion ../development/libraries/libextractor "0.5.18") { + libextractor = composedArgsAndFun (import ../development/libraries/libextractor/0.5.18.nix) { inherit fetchurl stdenv builderDefs zlib; }; @@ -3953,7 +3935,7 @@ let inherit fetchurl stdenv pkgconfig libraw1394; }; - libjingle = selectVersion ../development/libraries/libjingle "0.3.11" { + libjingle = import ../development/libraries/libjingle/0.3.11.nix { inherit fetchurl stdenv mediastreamer; }; @@ -4182,8 +4164,7 @@ let }; # failed to build - mediastreamer = composedArgsAndFun (selectVersion - ../development/libraries/mediastreamer "2.2.0-cvs20080207") { + mediastreamer = composedArgsAndFun (import ../development/libraries/mediastreamer/2.2.0-cvs20080207.nix) { inherit fetchurl stdenv automake libtool autoconf alsaLib pkgconfig speex ortp ffmpeg; }; @@ -4210,7 +4191,7 @@ let inherit fetchurl stdenv; }; - msilbc = selectVersion ../development/libraries/msilbc "2.0.0" { + msilbc = import ../development/libraries/msilbc { inherit fetchurl stdenv ilbc mediastreamer pkgconfig; }; @@ -4434,7 +4415,7 @@ let }; # Also known as librdf, includes raptor and rasqal - redland = composedArgsAndFun (selectVersion ../development/libraries/redland "1.0.9") { + redland = composedArgsAndFun (import ../development/libraries/redland/1.0.9.nix) { inherit fetchurl stdenv openssl libxml2 pkgconfig perl postgresql sqlite mysql libxslt curl pcre librdf_rasqal librdf_raptor; bdb = db4; @@ -4547,7 +4528,7 @@ let inherit stdenv fetchurl cmake qt4; }; - tk = composedArgsAndFun (selectVersion ../development/libraries/tk "8.5.7") { + tk = import ../development/libraries/tk/8.5.7.nix { inherit fetchurl stdenv tcl x11; }; @@ -4608,12 +4589,11 @@ let inherit fetchurl stdenv; }; - - xapian = makeOverridable (selectVersion ../development/libraries/xapian "1.0.14") { + xapian = makeOverridable (import ../development/libraries/xapian) { inherit fetchurl stdenv zlib; }; - xapianBindings = (selectVersion ../development/libraries/xapian/bindings "1.0.14") { + xapianBindings = (import ../development/libraries/xapian/bindings/1.0.14.nix) { inherit fetchurl stdenv xapian composableDerivation pkgconfig; inherit ruby perl php tcl python; # TODO perl php Java, tcl, C#, python }; @@ -4813,12 +4793,11 @@ let inherit fetchurl stdenv python db4; }; - flup = builderDefsPackage (selectVersion ../development/python-modules/flup "r2311") - (let python=python25; in - { - inherit python; - setuptools = setuptools.passthru.function {inherit python;}; - }); + flup = import ../development/python-modules/flup { + inherit fetchurl stdenv; + python = python25; + setuptools = setuptools.passthru.function {python = python25;}; + }; numeric = import ../development/python-modules/numeric { inherit fetchurl stdenv python; @@ -4872,7 +4851,7 @@ let inherit python openssl; }; - pythonSip = builderDefsPackage (selectVersion ../development/python-modules/python-sip "4.7.4") { + pythonSip = builderDefsPackage (import ../development/python-modules/python-sip/4.7.4.nix) { inherit python; }; @@ -4884,7 +4863,7 @@ let inherit stdenv fetchurl lib python; }; - pyqt = builderDefsPackage (selectVersion ../development/python-modules/pyqt "4.3.3") { + pyqt = builderDefsPackage (import ../development/python-modules/pyqt/4.3.3.nix) { inherit pkgconfig python pythonSip glib; inherit (xlibs) libX11 libXext; qt = qt4; @@ -4942,7 +4921,7 @@ let inherit fetchurl stdenv python cheetahTemplate makeWrapper par2cmdline unzip unrar; }; - bind = builderDefsPackage (selectVersion ../servers/dns/bind "9.5.0") { + bind = builderDefsPackage (import ../servers/dns/bind/9.5.0.nix) { inherit openssl libtool; }; @@ -4950,7 +4929,7 @@ let inherit fetchurl stdenv libtool gettext zlib readline guile python; }; - dict = composedArgsAndFun (selectVersion ../servers/dict "1.9.15") { + dict = composedArgsAndFun (import ../servers/dict/1.9.15.nix) { inherit builderDefs which bison; flex=flex2534; }; @@ -5210,18 +5189,6 @@ let inherit stdenv fetchurl alsaLib gettext ncurses; }; - /* - # Will maybe move to kernelPackages properly later. - - blcr = builderDefsPackage (selectVersion ../os-specific/linux/blcr "0.6.5"){ - inherit perl; - }; - - blcrCurrent = kernel : (blcr.passthru.function { - inherit kernel; - }); - */ - bluez = import ../os-specific/linux/bluez { inherit fetchurl stdenv pkgconfig dbus libusb alsaLib glib; }; @@ -5311,8 +5278,8 @@ let inherit fetchurl stdenv; }; - gpm = builderDefsPackage (selectVersion ../servers/gpm "1.20.6") { - inherit lzma ncurses bison; + gpm = import ../servers/gpm { + inherit fetchurl stdenv lzma ncurses bison; flex = flex2535; }; @@ -5390,8 +5357,8 @@ let inherit fetchurl stdenv; }; - jfsrec = builderDefsPackage (selectVersion ../os-specific/linux/jfsrec "svn-7"){ - inherit boost; + jfsrec = import ../os-specific/linux/jfsrec { + inherit fetchurl stdenv boost; }; jfsutils = import ../os-specific/linux/jfsutils/default.nix { @@ -5618,7 +5585,7 @@ let then iwlwifi4965ucodeV2 else iwlwifi4965ucodeV1); - atheros = composedArgsAndFun (selectVersion ../os-specific/linux/atheros "0.9.4") { + atheros = composedArgsAndFun (import ../os-specific/linux/atheros/0.9.4.nix) { inherit fetchurl stdenv builderDefs kernel lib; }; @@ -5634,8 +5601,8 @@ let inherit fetchurl stdenv kernel ncurses fxload; }; - kqemu = builderDefsPackage (selectVersion ../os-specific/linux/kqemu "1.4.0pre1") { - inherit kernel perl; + kqemu = import ../os-specific/linux/kqemu/1.4.0pre1.nix { + inherit fetchurl stdenv kernel perl; }; splashutils = @@ -6083,7 +6050,7 @@ let inherit (xorg) mkfontdir mkfontscale; }); - clearlyU = composedArgsAndFun (selectVersion ../data/fonts/clearlyU "1.9") { + clearlyU = composedArgsAndFun (import ../data/fonts/clearlyU/1.9.nix) { inherit builderDefs; inherit (xorg) mkfontdir mkfontscale; }; @@ -6129,7 +6096,7 @@ let inherit fetchurl stdenv; }; - junicode = composedArgsAndFun (selectVersion ../data/fonts/junicode "0.6.15") { + junicode = composedArgsAndFun (import ../data/fonts/junicode/0.6.15.nix) { inherit builderDefs fontforge unzip; inherit (xorg) mkfontdir mkfontscale; }; @@ -6142,13 +6109,14 @@ let inherit fetchurl stdenv; }; - libertine = builderDefsPackage (selectVersion ../data/fonts/libertine "2.7") { + libertine = builderDefsPackage (import ../data/fonts/libertine/2.7.nix) { inherit fontforge; }; - libertineBin = builderDefsPackage (selectVersion ../data/fonts/libertine "2.7.bin") { + libertineBin = builderDefsPackage (import ../data/fonts/libertine/2.7.bin.nix) { }; - lmodern = builderDefsPackage (selectVersion ../data/fonts/lmodern "1.010") { + lmodern = import ../data/fonts/lmodern { + inherit fetchurl stdenv; }; manpages = import ../data/documentation/man-pages { @@ -6217,7 +6185,7 @@ let inherit fetchurl stdenv cabextract; }; - wqy_zenhei = composedArgsAndFun (selectVersion ../data/fonts/wqy_zenhei "0.4.23-1") { + wqy_zenhei = composedArgsAndFun (import ../data/fonts/wqy_zenhei/0.4.23-1.nix) { inherit builderDefs; }; @@ -6387,7 +6355,7 @@ let inherit fetchurl stdenv ncurses; }; - carrier = builderDefsPackage (selectVersion ../applications/networking/instant-messengers/carrier "2.5.0") { + carrier = builderDefsPackage (import ../applications/networking/instant-messengers/carrier/2.5.0.nix) { inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 openssl nss gtkspell aspell gettext ncurses avahi dbus dbus_glib python libtool automake autoconf; @@ -6504,7 +6472,7 @@ let fltk = fltk11; }; - codeville = builderDefsPackage (selectVersion ../applications/version-management/codeville "0.8.0") { + codeville = builderDefsPackage (import ../applications/version-management/codeville/0.8.0.nix) { inherit makeWrapper; python = pythonFull; }; @@ -6608,13 +6576,13 @@ let # p.viPlugin # vim keybindings (see license) # ]; #}; - eclipseNew = (selectVersion ../applications/editors/eclipse-new "3.3.1.1" { + eclipseNew = import ../applications/editors/eclipse-new/3.3.1.1.nix { # outdated, but 3.3.1.1 does already compile on nix, feel free to work 3.4 - inherit fetchurl stdenv makeWrapper jdk unzip ant selectVersion buildEnv + inherit fetchurl stdenv makeWrapper jdk unzip ant buildEnv getConfig lib zip writeTextFile runCommand; inherit (gtkLibs) gtk glib; inherit (xlibs) libXtst; - }); + }; eclipse = plugins: @@ -6783,7 +6751,7 @@ let openexr = openexr_1_6_1; }; - fbpanel = composedArgsAndFun (selectVersion ../applications/window-managers/fbpanel "4.12") { + fbpanel = composedArgsAndFun (import ../applications/window-managers/fbpanel/4.12.nix) { inherit fetchurl stdenv builderDefs pkgconfig libpng libjpeg libtiff librsvg; inherit (gtkLibs) gtk; inherit (xlibs) libX11 libXmu libXpm; @@ -6966,7 +6934,7 @@ let gtkSupport = getConfig [ "gnunet" "gtkSupport" ] true; }; - gocr = composedArgsAndFun (selectVersion ../applications/graphics/gocr "0.44") { + gocr = composedArgsAndFun (import ../applications/graphics/gocr/0.44.nix) { inherit builderDefs fetchurl stdenv; }; @@ -7262,8 +7230,8 @@ let inherit (gnome28) gtksourceview libsoup; }; - minicom = builderDefsPackage (selectVersion ../tools/misc/minicom "2.3") { - inherit ncurses; + minicom = import ../tools/misc/minicom { + inherit fetchurl stdenv ncurses; }; monodevelop = import ../applications/editors/monodevelop { @@ -7475,8 +7443,7 @@ let inherit fetchsvn SDL zlib which stdenv; }; - qemuImage = composedArgsAndFun - (selectVersion ../applications/virtualization/qemu/linux-img "0.2") { + qemuImage = composedArgsAndFun (import ../applications/virtualization/qemu/linux-img/0.2.nix) { inherit builderDefs fetchurl stdenv; }; @@ -7699,7 +7666,8 @@ let inherit (xorg) xset fontschumachermisc; }; - uucp = builderDefsPackage (selectVersion ../tools/misc/uucp "1.07") { + uucp = import ../tools/misc/uucp { + inherit fetchurl stdenv; }; uzbl = builderDefsPackage (import ../applications/networking/browsers/uzbl) { @@ -7810,7 +7778,7 @@ let ); }; - x11vnc = composedArgsAndFun (selectVersion ../tools/X11/x11vnc "0.9.3") { + x11vnc = composedArgsAndFun (import ../tools/X11/x11vnc/0.9.3.nix) { inherit builderDefs openssl zlib libjpeg ; inherit (xlibs) libXfixes fixesproto libXdamage damageproto libX11 xproto libXtst libXinerama xineramaproto libXrandr randrproto @@ -7818,7 +7786,7 @@ let libXrender; }; - x2vnc = composedArgsAndFun (selectVersion ../tools/X11/x2vnc "1.7.2") { + x2vnc = composedArgsAndFun (import ../tools/X11/x2vnc/1.7.2.nix) { inherit builderDefs; inherit (xlibs) libX11 xproto xextproto libXext libXrandr randrproto; }; @@ -7966,7 +7934,7 @@ let }; # doesn't compile yet - in case someone else want's to continue .. - qgis = (selectVersion ../applications/misc/qgis "1.0.1-2") { + qgis = (import ../applications/misc/qgis/1.0.1-2.nix) { inherit composableDerivation fetchsvn stdenv flex lib ncurses fetchurl perl cmake gdal geos proj x11 gsl libpng zlib bison @@ -8006,7 +7974,7 @@ let inherit fetchurl stdenv python pygame twisted lib numeric makeWrapper; }; - construoBase = composedArgsAndFun (selectVersion ../games/construo "0.2.2") { + construoBase = composedArgsAndFun (import ../games/construo/0.2.2.nix) { inherit stdenv fetchurl builderDefs zlib; inherit (xlibs) libX11 xproto; @@ -8122,7 +8090,7 @@ let }; # You still can override by passing more arguments. - spaceOrbit = composedArgsAndFun (selectVersion ../games/orbit "1.01") { + spaceOrbit = composedArgsAndFun (import ../games/orbit/1.01.nix) { inherit fetchurl stdenv builderDefs mesa freeglut; inherit (gnome) esound; inherit (xlibs) libXt libX11 libXmu libXi libXext; @@ -8538,12 +8506,11 @@ let inherit fetchurl stdenv tetex lazylist; }; - psi = (selectVersion ../applications/networking/instant-messengers/psi "0.12.1") - { - inherit stdenv fetchurl zlib aspell sox openssl qt4; - inherit (xlibs) xproto libX11 libSM libICE; - qca2 = kde4.qca2; - }; + psi = (import ../applications/networking/instant-messengers/psi) { + inherit stdenv fetchurl zlib aspell sox qt4; + inherit (xlibs) xproto libX11 libSM libICE; + qca2 = kde4.qca2; + }; putty = import ../applications/networking/remote/putty { inherit stdenv fetchurl ncurses; From e4d5933e0a81373b7870cf6a9b5b4c28ab9a57df Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 10:52:37 +0000 Subject: [PATCH 26/48] * "with args" considered harmful. svn path=/nixpkgs/trunk/; revision=18404 --- doc/coding-conventions.xml | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml index 3e4afdc1d4f..586fcd98f23 100644 --- a/doc/coding-conventions.xml +++ b/doc/coding-conventions.xml @@ -152,6 +152,52 @@ stdenv.mkDerivation { ... , # Some comment... argN }: + + + + + Functions should list their expected arguments as + precisely as possible. That is, write + + +{ stdenv, fetchurl, perl }: ... + + + instead of + + +args: with args; ... + + + or + + +{ stdenv, fetchurl, perl, ... }: ... + + + + + For functions that are truly generic in the number of + arguments (such as wrappers around mkDerivation) + that have some required arguments, you should write them using an + @-pattern: + + +{ stdenv, doCoverageAnalysis ? false, ... } @ args: + +stdenv.mkDerivation (args // { + ... if doCoverageAnalysis then "bla" else "" ... +}) + + + instead of + + +args: + +args.stdenv.mkDerivation (args // { + ... if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" ... +}) From 4437778e33ea5d2098e495a194c6b0a82b44783a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 11:38:20 +0000 Subject: [PATCH 27/48] svn path=/nixpkgs/trunk/; revision=18405 --- pkgs/top-level/all-packages.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0fcf8ee8b4a..a1ed4a5e4fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4420,7 +4420,12 @@ let mysql libxslt curl pcre librdf_rasqal librdf_raptor; bdb = db4; }; - redland_1_0_8 = redland.passthru.function { version = "1.0.8"; }; + + redland_1_0_8 = composedArgsAndFun (import ../development/libraries/redland/1.0.8.nix) { + inherit fetchurl stdenv openssl libxml2 pkgconfig perl postgresql sqlite + mysql libxslt curl pcre librdf_rasqal librdf_raptor; + bdb = db4; + }; rhino = import ../development/libraries/java/rhino { inherit fetchurl stdenv unzip; From b4636d333c5602684b457c618479d5efb60dd709 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 11:46:35 +0000 Subject: [PATCH 28/48] svn path=/nixpkgs/trunk/; revision=18406 --- pkgs/development/libraries/redland/1.0.8.nix | 7 ++----- pkgs/development/libraries/redland/1.0.9.nix | 16 ++++++++-------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/redland/1.0.8.nix b/pkgs/development/libraries/redland/1.0.8.nix index 9b065043178..f0c2300b169 100644 --- a/pkgs/development/libraries/redland/1.0.8.nix +++ b/pkgs/development/libraries/redland/1.0.8.nix @@ -1,10 +1,7 @@ args: with args; -let name = "redland-${version}"; -in - -stdenv.mkDerivation { - inherit name; +stdenv.mkDerivation rec { + name = "redland-1.0.8"; src = fetchurl { url = "mirror://sf/librdf/${name}.tar.gz"; diff --git a/pkgs/development/libraries/redland/1.0.9.nix b/pkgs/development/libraries/redland/1.0.9.nix index dd67ae60f1d..231e64a00ae 100644 --- a/pkgs/development/libraries/redland/1.0.9.nix +++ b/pkgs/development/libraries/redland/1.0.9.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { configureFlags = "--with-threads --with-bdb=${bdb}"; patchPhase = - '' - sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl + '' + sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl - # Redland 1.0.9 uses an internal pre-processor symbol SQLITE_API - # that collides with a symbol of the same name in sqlite 3.6.19. - # This is a quick fix for the problem. A real solution needs to be - # implemented upstream, though. - find . -type f -exec sed -i -e 's/SQLITE_API/REDLAND_SQLITE_API/g' {} \; - ''; + # Redland 1.0.9 uses an internal pre-processor symbol SQLITE_API + # that collides with a symbol of the same name in sqlite 3.6.19. + # This is a quick fix for the problem. A real solution needs to be + # implemented upstream, though. + find . -type f -exec sed -i -e 's/SQLITE_API/REDLAND_SQLITE_API/g' {} \; + ''; } From fcddb50e66440a38551e44ab97197cd174001e92 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 11:47:02 +0000 Subject: [PATCH 29/48] * Remove some more unused functions. svn path=/nixpkgs/trunk/; revision=18407 --- pkgs/top-level/all-packages.nix | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a1ed4a5e4fc..8b78d39c21e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -131,29 +131,6 @@ let # Return the first available value in the order: pkg.val, val, or default. getPkgConfig = pkg : val : default : (getConfig [ pkg val ] (getConfig [ val ] default)); - # Return user-choosen version of given package. If you define package as - # - # pkgname_alts = - # { - # v_0_1 = (); - # v_0_2 = (); - # default = v_0_1; - # recurseForDerivations = true; - # }; - # pkgname = getVersion "name" pkgname_alts; - # - # user will be able to write in his configuration.nix something like - # name = { version = "0.2"; }; and pkgname will be equal - # to getAttr pkgname_alts "0.2". Using alts.default by default. - getVersion = name: alts: builtins.getAttr - (getConfig [ name "version" ] "default") alts; - - # The same, another syntax. - # Warning: syntax for configuration.nix changed too - useVersion = name: f: f { - version = getConfig [ "environment" "versions" name ]; - }; - # Check absence of non-used options checker = x: flag: opts: config: (if flag then let result=( From 221ad8362fd3cc0e969a2615223e5c557f4c675c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 12:22:24 +0000 Subject: [PATCH 30/48] * Use the stable Nix to test the Nixpkgs expressions, since we always want to be compatible with the last stable Nix release. svn path=/nixpkgs/trunk/; revision=18411 --- pkgs/top-level/make-tarball.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index e4257ed243b..1b04e68c2b6 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -18,7 +18,7 @@ releaseTools.makeSourceTarball { libxml2 # Needed for the release notes. libxslt w3m - nixUnstable # Needed to check whether the expressions are valid. + nix # Needed to check whether the expressions are valid. tetex dblatex ]; From b19ada9e05e847ee6c3651587d2cfa852d5bac1b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 12:47:58 +0000 Subject: [PATCH 31/48] * Fix the GPM URL. svn path=/nixpkgs/trunk/; revision=18413 --- pkgs/servers/gpm/default.nix | 11 ++++++----- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/gpm/default.nix b/pkgs/servers/gpm/default.nix index 9b6eb2d648b..5ab57b2cb3e 100644 --- a/pkgs/servers/gpm/default.nix +++ b/pkgs/servers/gpm/default.nix @@ -1,14 +1,14 @@ -{ stdenv, fetchurl, lzma, flex, bison, ncurses }: +{ stdenv, fetchurl, flex, bison, ncurses }: stdenv.mkDerivation rec { name = "gpm-1.20.6"; src = fetchurl { - url = "http://linux.schottelius.org/gpm/archives/${name}.tar.lzma"; - sha256 = "13w61bh9nyjaa0n5a7qq1rvbqxjbxpqz5qmdmqqpqgrd2jlviar7"; + url = "http://www.nico.schottelius.org/software/gpm/archives/${name}.tar.bz2"; + sha256 = "1990i19ddzn8gg5xwm53yn7d0mya885f48sd2hyvr7dvzyaw7ch8"; }; - buildInputs = [lzma flex bison ncurses]; + buildInputs = [ flex bison ncurses ]; preConfigure = '' @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { ''; meta = { - description = "Mouse daemon"; + homepage = http://www.nico.schottelius.org/software/gpm/; + description = "A daemon that provides mouse support on the Linux console"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8b78d39c21e..2ceb0253fb2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5261,7 +5261,7 @@ let }; gpm = import ../servers/gpm { - inherit fetchurl stdenv lzma ncurses bison; + inherit fetchurl stdenv ncurses bison; flex = flex2535; }; From e615bc45747782b0c9269a75d196d8c59a238335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 13:18:24 +0000 Subject: [PATCH 32/48] GNU Guile 1.9.5. svn path=/nixpkgs/trunk/; revision=18415 --- pkgs/development/interpreters/guile/1.9.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/guile/1.9.nix b/pkgs/development/interpreters/guile/1.9.nix index 0290567c1ff..5f5ae8d9e81 100644 --- a/pkgs/development/interpreters/guile/1.9.nix +++ b/pkgs/development/interpreters/guile/1.9.nix @@ -7,12 +7,14 @@ else stdenv.mkDerivation) rec { - name = "guile-1.9.4"; # This is an alpha release! + name = "guile-1.9.5"; # This is an alpha release! src = fetchurl { url = "ftp://alpha.gnu.org/gnu/guile/${name}.tar.gz"; - sha256 = "1p136fb0s46q1cycfsnd7nny14ji43xva58cz39szvq36p9kjbbg"; + sha256 = "0plzdpm22fk2n5m1pjjlckfvksy13aj7n45lx1nw4334i87d6sll"; }; + /* 1.9.5 has funny directory names, which contain "GNU Guile"! */ + buildInputs = [ makeWrapper gawk readline libtool libunistring pkgconfig ]; propagatedBuildInputs = [ gmp boehmgc ]; From 2bbaf039da1c8cc0984374c0e1bb09b18ad7b845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 13:18:28 +0000 Subject: [PATCH 33/48] fetchurl: Improve GNU mirror list. svn path=/nixpkgs/trunk/; revision=18416 --- pkgs/build-support/fetchurl/mirrors.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index e429c130b5e..88f4e064fa1 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -22,10 +22,18 @@ rec { sf = sourceforge; - # GNU. + # GNU (http://www.gnu.org/prep/ftp.html). gnu = [ + # This one redirects to a (supposedly) nearby and (supposedly) up-to-date + # mirror. + http://ftpmirror.gnu.org/ + http://ftp.nluug.nl/pub/gnu/ http://mirrors.kernel.org/gnu/ + ftp://mirror.cict.fr/gnu/ + ftp://ftp.cs.tu-berlin.de/pub/gnu/ + ftp://ftp.chg.ru/pub/gnu/ + http://ftp.gnu.org/pub/gnu/ ]; From 1f9e87871ea9f9db2c05ce1e9a59a101d5beb2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 13:41:17 +0000 Subject: [PATCH 34/48] GNU Guile 1.9: Remove unnecessary patch. svn path=/nixpkgs/trunk/; revision=18418 --- pkgs/development/interpreters/guile/1.9.nix | 4 +- .../interpreters/guile/gcov-file-name.patch | 42 ------------------- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 pkgs/development/interpreters/guile/gcov-file-name.patch diff --git a/pkgs/development/interpreters/guile/1.9.nix b/pkgs/development/interpreters/guile/1.9.nix index 5f5ae8d9e81..253b299af39 100644 --- a/pkgs/development/interpreters/guile/1.9.nix +++ b/pkgs/development/interpreters/guile/1.9.nix @@ -19,8 +19,8 @@ rec { propagatedBuildInputs = [ gmp boehmgc ]; patches = - stdenv.lib.optionals (coverageAnalysis != null) - [ ./gcov-file-name.patch ./disable-gc-sensitive-tests.patch ]; + stdenv.lib.optional (coverageAnalysis != null) + ./disable-gc-sensitive-tests.patch; postInstall = '' wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" diff --git a/pkgs/development/interpreters/guile/gcov-file-name.patch b/pkgs/development/interpreters/guile/gcov-file-name.patch deleted file mode 100644 index f144296170e..00000000000 --- a/pkgs/development/interpreters/guile/gcov-file-name.patch +++ /dev/null @@ -1,42 +0,0 @@ -This patch arranges so that we don't end up, with profiling builds, with a -file named `.gcov' since that confuses lcov: - - :cannot open source file - geninfo: ERROR: cannot read .gcov! - ---- guile/libguile/c-tokenize.c 2009-09-13 13:05:15.000000000 +0200 -+++ guile/libguile/c-tokenize.c 2009-10-28 16:24:15.000000000 +0100 -@@ -1,5 +1,5 @@ - --#line 3 "" -+#line 3 "c-tokenize.c" - - #define YY_INT_ALIGNED short int - -@@ -616,7 +616,7 @@ int cookie_was_last = 0; - #define IS_COOKIE cookie_was_last = 1 - #define IS_NOT_COOKIE cookie_was_last = 0 - --#line 620 "" -+#line 620 "c-tokenize.c" - - #define INITIAL 0 - -@@ -799,7 +799,7 @@ YY_DECL - #line 65 "./c-tokenize.lex" - - --#line 803 "" -+#line 803 "c-tokenize.c" - - if ( !(yy_init) ) - { -@@ -1235,7 +1235,7 @@ YY_RULE_SETUP - #line 181 "./c-tokenize.lex" - ECHO; - YY_BREAK --#line 1239 "" -+#line 1239 "c-tokenize.c" - case YY_STATE_EOF(INITIAL): - yyterminate(); - From 063f44d23cfe25fd88ed5d05dfc25828a88dd39d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 13:54:20 +0000 Subject: [PATCH 35/48] * Move classification.txt to the manual. svn path=/nixpkgs/trunk/; revision=18419 --- doc/coding-conventions.xml | 278 +++++++++++++++++++++++++++- doc/language-support.xml | 2 +- maintainers/docs/classification.txt | 116 ------------ 3 files changed, 277 insertions(+), 119 deletions(-) delete mode 100644 maintainers/docs/classification.txt diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml index 586fcd98f23..b941e3ca2a6 100644 --- a/doc/coding-conventions.xml +++ b/doc/coding-conventions.xml @@ -215,7 +215,281 @@ dashes between words — not in camel case. For instance, it should be allPackages.nix or AllPackages.nix. +Each package should be stored in its own directory somewhere in +the pkgs/ tree, i.e. in +pkgs/category/subcategory/.../pkgname. +Below are some rules for picking the right category for a package. +Many packages fall under several categories; what matters is the +primary purpose of a package. For example, the +libxml2 package builds both a library and some +tools; but it’s a library foremost, so it goes under +pkgs/development/libraries. + +When in doubt, consider refactoring the +pkgs/ tree, e.g. creating new categories or +splitting up an existing category. + + + + If it’s used to support software development: + + + + If it’s a library used by other packages: + + development/libraries (e.g. libxml2) + + + + If it’s a compiler: + + development/compilers (e.g. gcc) + + + + If it’s an interpreter: + + development/interpreters (e.g. guile) + + + + If it’s a (set of) development tool(s): + + + + If it’s a parser generator (including lexers): + + development/tools/parsing (e.g. bison, flex) + + + + If it’s a build manager: + + development/tools/build-managers (e.g. gnumake) + + + + Else: + + development/tools/misc (e.g. binutils) + + + + + + + Else: + + development/misc + + + + + + + If it’s a (set of) tool(s): + + (A tool is a relatively small program, especially one intented + to be used non-interactively.) + + + If it’s for networking: + + tools/networking (e.g. wget) + + + + If it’s for text processing: + + tools/text (e.g. diffutils) + + + + If it’s a system utility, i.e., + something related or essential to the operation of a + system: + + tools/system (e.g. cron) + + + + If it’s an archiver (which may + include a compression function): + + tools/archivers (e.g. zip, tar) + + + + If it’s a compression program: + + tools/compression (e.g. gzip, bzip2) + + + + If it’s a security-related program: + + tools/security (e.g. nmap, gnupg) + + + + Else: + + tools/misc + + + + + + + If it’s a shell: + + shells (e.g. bash) + + + + If it’s a server: + + + + If it’s a web server: + + servers/http (e.g. apache-httpd) + + + + If it’s an implementation of the X Windowing System: + + servers/x11 (e.g. xorg — this includes the client libraries and programs) + + + + Else: + + servers/misc + + + + + + + If it’s a desktop environment + (including window managers): + + desktops (e.g. kde, gnome, enlightenment) + + + + If it’s an application: + + A (typically large) program with a distinct user + interface, primarily used interactively. + + + If it’s a version management system: + + applications/version-management (e.g. subversion) + + + + If it’s for video playback / editing: + + applications/video (e.g. vlc) + + + + If it’s for graphics viewing / editing: + + applications/graphics (e.g. gimp) + + + + If it’s for networking: + + + + If it’s a mailreader: + + applications/networking/mailreaders (e.g. thunderbird) + + + + If it’s a newsreader: + + applications/networking/newsreaders (e.g. pan) + + + + If it’s a web browser: + + applications/networking/browsers (e.g. firefox) + + + + Else: + + applications/networking/misc + + + + + + + Else: + + applications/misc + + + + + + + If it’s data (i.e., does not have a + straight-forward executable semantics): + + + + If it’s a font: + + data/fonts + + + + If it’s related to SGML/XML processing: + + + + If it’s an XML DTD: + + data/sgml+xml/schemas/xml-dtd (e.g. docbook) + + + + If it’s an XSLT stylesheet: + + (Okay, these are executable...) + data/sgml+xml/stylesheets/xslt (e.g. docbook-xsl) + + + + + + + + + + If it’s a game: + + games + + + + Else: + + misc + + + + - - \ No newline at end of file + diff --git a/doc/language-support.xml b/doc/language-support.xml index 364b002ea16..806eab62ebe 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -1,6 +1,6 @@ + xml:id="chap-language-support"> Support for specific programming languages diff --git a/maintainers/docs/classification.txt b/maintainers/docs/classification.txt deleted file mode 100644 index a4de2ecdb50..00000000000 --- a/maintainers/docs/classification.txt +++ /dev/null @@ -1,116 +0,0 @@ -* Classification scheme for packages - -- many packages fall under several categories; what matters is the - *primary* purpose of a package. For example, the libxml2 package - builds both a library and some tools; but it's a library foremost, - so it goes under ./development/libraries. - -- when in doubt, refactor. - -IF it's used to support SOFTWARE DEVELOPMENT: - - IF it's a LIBRARY used by other packages: - IF it's directly related to GTK: - ./development/libraries/gtk+ - ELSE - ./development/libraries - (e.g., libxml2) - ELSE IF it's a COMPILER: - ./development/compilers - (e.g., gcc) - ELSE IF it's an INTERPRETER: - ./development/interpreters - ELSE IF it's a development TOOL (or set of): - IF it's a PARSER GENERATOR (incl. lexers): - ./development/tools/parsing - (e.g., bison, flex) - ELSE IF it's a BUILD MANAGER: - ./development/tools/build-managers - (e.g., gnumake - ELSE - ./development/tools/misc - (e.g., binutils) - ELSE - ./development/misc - -ELSE IF it's a TOOL (or set of): - # a tool is a relatively *small* program, esp. one intented to be - # used non-interactively - - IF it's for NETWORKING: - ./tools/networking - (e.g., wget) - ELSE IF it's for TEXT PROCESSING: - ./tools/text - (e.g., diffutils) - ELSE IF it's a SYSTEM utility, i.e., something related or essential - to the operation of a system: - ./tools/system - (e.g., init) - ELSE IF it's an ARCHIVER (which may include a compression function): - ./tools/archivers - (e.g., zip, tar) - ELSE IF it's a COMPRESSION program: - ./tools/compression - (e.g., gzip, bzip2) - ELSE IF it's a SECURITY program: - ./tools/security - (e.g., nmap, gnupg) - ELSE - ./tools/misc - -ELSE IF it's a SHELL: - - ./shells - -ELSE IF it's a SERVER: - - IF it's a HTTP server: - ./servers/http - (e.g., apache) - IF it's a X11 server: - ./servers/x11 - (e.g., xfree86) - ELSE - ./servers/misc - -ELSE IF it's a DESKTOP ENVIRONMENT (incl. WINDOW MANAGERS): - - ./desktops - (e.g., kde, gnome, fvwm) - -ELSE IF it's an APPLICATION: - # a (typically large) program with a distinct user interface, - # primarily used interactively - - IF it's a VERSION MANAGEMENT system: - ./applications/version-management - ELSE IF it's for VIDEO playback/etc: - ./applications/video - ELSE IF it's for GRAPHICS viewing/editing/etc: - ./applications/graphics - ELSE IF it's for NETWORKING: - IF it's a MAILREADER: - ./applications/networking/mailreaders - IF it's a NEWSREADER: - ./applications/networking/newsreaders - ELSE - ./applications/networking/misc - ELSE - ./applications/misc - -ELSE IF it's DATA (i.e., does not have a straight-forward executable semantics): - - IF it's related to SGML/XML processing: - IF it's a XML DTD: - ./data/sgml+xml/schemas/xml-dtd - ELSE IF it's an XSLT stylesheet (okay, these are executable...): - ./data/sgml+xml/stylesheets/xslt - -ELSE IF it's a GAME: - - ./games - -ELSE: - - ./misc From bab04acc3a32b4b69b8b02d9bca634e1953e3307 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 13:58:59 +0000 Subject: [PATCH 36/48] svn path=/nixpkgs/trunk/; revision=18420 --- doc/coding-conventions.xml | 2 +- doc/quick-start.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml index b941e3ca2a6..282fad66280 100644 --- a/doc/coding-conventions.xml +++ b/doc/coding-conventions.xml @@ -207,7 +207,7 @@ args.stdenv.mkDerivation (args // { -
File naming and organisation +
File naming and organisation Names of files and directories should be in lowercase, with dashes between words — not in camel case. For instance, it should be diff --git a/doc/quick-start.xml b/doc/quick-start.xml index 6f49bee4b64..9cacb1fcccf 100644 --- a/doc/quick-start.xml +++ b/doc/quick-start.xml @@ -25,8 +25,8 @@ $ cd nixpkgs pkgs/development/libraries/pkgname, while a web browser goes into pkgs/applications/networking/browsers/pkgname. - See Section XXX for some hints on the tree organisation. Create a - directory for your package, e.g. + See for some hints on the tree + organisation. Create a directory for your package, e.g. $ svn mkdir pkgs/development/libraries/libfoo From 15da008651e9a63a8b220be531a8012d413fe026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 14:12:39 +0000 Subject: [PATCH 37/48] Slightly generalize `sourceTarball'. svn path=/nixpkgs/trunk/; revision=18426 --- pkgs/build-support/release/source-tarball.nix | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/build-support/release/source-tarball.nix b/pkgs/build-support/release/source-tarball.nix index 579127f3a4d..a3ddc62deeb 100644 --- a/pkgs/build-support/release/source-tarball.nix +++ b/pkgs/build-support/release/source-tarball.nix @@ -73,33 +73,35 @@ stdenv.mkDerivation ( # Nix buildfarm. (Stratego/XT's autoxt uses it. We should # update it eventually.) echo ${versionSuffix} | sed -e s/pre// > svn-revision - + eval "$preAutoconf" - - if test -f ./bootstrap; then ./bootstrap - elif test -f ./bootstrap.sh; then ./bootstrap.sh - elif test -f ./reconf; then ./reconf + + if test -x ./bootstrap; then ./bootstrap + elif test -x ./bootstrap.sh; then ./bootstrap.sh + elif test -x ./autogen.sh; then ./autogen.sh + elif test -x ./autogen ; then ./autogen + elif test -x ./reconf; then ./reconf elif test -f ./configure.in || test -f ./configure.ac; then autoreconf --install --force --verbose else echo "No bootstrap, bootstrap.sh, configure.in or configure.ac. Assuming this is not an GNU Autotools package." fi - + eval "$postAutoconf" ''; # Cause distPhase to copy tar.bz2 in addition to tar.gz. - tarballs = "*.tar.gz *.tar.bz2"; + tarballs = "*.tar.gz *.tar.bz2 *.tar.xz"; finalPhase = '' - for i in $out/tarballs/*; do + for i in "$out/tarballs/"*; do echo "file source-dist $i" >> $out/nix-support/hydra-build-products done # Try to figure out the release name. releaseName=$( (cd $out/tarballs && ls) | head -n 1 | sed -e 's^\.[a-z].*^^') test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name) - ''; # */ + ''; passthru = { inherit src; From eb9ff07031d8b1845d6d84579d1b19481977e319 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 15:05:09 +0000 Subject: [PATCH 38/48] * Package naming / versioning guidelines. svn path=/nixpkgs/trunk/; revision=18433 --- doc/coding-conventions.xml | 110 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 111 insertions(+), 1 deletion(-) diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml index 282fad66280..e55f86ae3d3 100644 --- a/doc/coding-conventions.xml +++ b/doc/coding-conventions.xml @@ -207,6 +207,79 @@ args.stdenv.mkDerivation (args // {
+
Package naming + +In Nixpkgs, there are generally three different names associated with a package: + + + + The name attribute of the + derivation (excluding the version part). This is what most users + see, in particular when using + nix-env. + + The variable name used for the instantiated package + in all-packages.nix, and when passing it as a + dependency to other functions. This is what Nix expression authors + see. It can also be used when installing using nix-env + -iA. + + The filename for (the directory containing) the Nix + expression. + + + +Most of the time, these are the same. For instance, the package +e2fsprogs has a name attribute +"e2fsprogs-version", is +bound to the variable name e2fsprogs in +all-packages.nix, and the Nix expression is in +pkgs/os-specific/linux/e2fsprogs/default.nix. +However, identifiers in the Nix language don’t allow certain +characters (e.g. dashes), so sometimes a different variable name +should be used. For instance, the +module-init-tools package is bound to the +module_init_tools variable in +all-packages.nix. + +There are a few naming guidelines: + + + + Generally, try to stick to the upstream package + name. + + Don’t use uppercase letters in the + name attribute — e.g., + "mplayer-1.0rc2" instead of + "MPlayer-1.0rc2". + + The version part of the name + attribute must start with a digit (following a + dash) — e.g., "hello-0.3-pre-r3910" instead of + "hello-svn-r3910", as the latter would be seen as + a package named hello-svn by + nix-env. + + Dashes in the package name should be changed to + underscores in variable names, rather than to camel case — e.g., + module_init_tools instead of + moduleInitTools. + + If there are multiple versions of a package, this + should be reflected in the variable names in + all-packages.nix, + e.g. hello_0_3 and hello_0_4. + If there is an obvious “default” version, make an attribute like + hello = hello_0_4;. + + + + + +
+ +
File naming and organisation Names of files and directories should be in lowercase, with @@ -215,6 +288,8 @@ dashes between words — not in camel case. For instance, it should be allPackages.nix or AllPackages.nix. +
Hierachy + Each package should be stored in its own directory somewhere in the pkgs/ tree, i.e. in pkgs/category/subcategory/.../pkgname. @@ -492,4 +567,39 @@ splitting up an existing category.
+
Versioning + +Because every version of a package in Nixpkgs creates a +potential maintenance burden, old versions of a package should not be +kept unless there is a good reason to do so. For instance, Nixpkgs +contains several versions of GCC because other packages don’t build +with the latest version of GCC. Other examples are having both the +latest stable and latest pre-release version of a package, or to keep +several major releases of an application that differ significantly in +functionality. + +If there is only one version of a package, its Nix expression +should be named e2fsprogs/default.nix. If there +are multiple versions, this should be reflected in the filename, +e.g. e2fsprogs/1.41.8.nix and +e2fsprogs/1.41.9.nix. The version in the +filename should leave out unnecessary detail. For instance, if we +keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they +should be named firefox/2.0.nix and +firefox/3.5.nix, respectively (which, at a given +point, might contain versions 2.0.0.20 and +3.5.4). If a version requires many auxiliary +files, you can use a subdirectory for each version, +e.g. firefox/2.0/default.nix and +firefox/3.5/default.nix. + +All versions of a package must be included +in all-packages.nix to make sure that they +evaluate correctly. + +
+ +
+ + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ceb0253fb2..cc089e0e1f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5232,7 +5232,7 @@ let libuuid = if stdenv.system != "i686-darwin" then utillinuxng else null; - e2fsprogs = import ../os-specific/linux/e2fsprogs/default.nix { + e2fsprogs = import ../os-specific/linux/e2fsprogs { inherit fetchurl stdenv pkgconfig libuuid; }; From 3124661215a4971993bcb5c98297b55c62eeb3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 16:24:31 +0000 Subject: [PATCH 39/48] nix-prefetch-git: Remove `--depth' argument since it's risky. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `--depth' argument asks Git to fetch the last revisions of the given repo on *any* branch, which is often useless. Thanks to Lluís Battle for clarifying this. svn path=/nixpkgs/trunk/; revision=18438 --- pkgs/build-support/fetchgit/nix-prefetch-git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 3803522ea76..88d2421003b 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -36,7 +36,7 @@ if test -z "$finalPath"; then trap "rm -rf $tmpPath" EXIT # Perform the checkout. - git clone --depth 1 "$url" $tmpFile 1>&2 + git clone "$url" $tmpFile 1>&2 if test -n "$rev"; then cd $tmpFile echo $tmpFile From 39476057a2a6566103029d37929c6bcb32d96605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 16:39:06 +0000 Subject: [PATCH 40/48] nix-prefetch-git: Support $NIX_PREFETCH_GIT_LEAVE_DOT_GIT. svn path=/nixpkgs/trunk/; revision=18442 --- pkgs/build-support/fetchgit/nix-prefetch-git | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 88d2421003b..3983ab28a2c 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -44,7 +44,11 @@ if test -z "$finalPath"; then fi # Allow doing additional processing before .git removal eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK" - find $tmpFile -name .git\* | xargs rm -rf + if test "$NIX_PREFETCH_GIT_LEAVE_DOT_GIT" != 1 + then + echo "removing \`.git'..." + rm -rf .git + fi # Compute the hash. hash=$(nix-hash --type $hashType $hashFormat $tmpFile) From 4f20056bca90038c2f76b1d4ac09aff93c13daeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 18 Nov 2009 16:39:09 +0000 Subject: [PATCH 41/48] nix-prefetch-git: Default to SHA256. svn path=/nixpkgs/trunk/; revision=18443 --- pkgs/build-support/fetchgit/nix-prefetch-git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 3983ab28a2c..3f24a44601f 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -6,7 +6,7 @@ expHash=$3 hashType=$NIX_HASH_ALGO if test -z "$hashType"; then - hashType=md5 + hashType=sha256 fi if test -z "$url"; then From 4dca2c8b123b02fffe07640bfc27aa632b2612dc Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Wed, 18 Nov 2009 19:10:24 +0000 Subject: [PATCH 42/48] echo to stderr in stead of stdout. else hydra cannot read hash/path svn path=/nixpkgs/trunk/; revision=18448 --- pkgs/build-support/fetchgit/nix-prefetch-git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 3f24a44601f..9f2eb4b3a4c 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -39,14 +39,14 @@ if test -z "$finalPath"; then git clone "$url" $tmpFile 1>&2 if test -n "$rev"; then cd $tmpFile - echo $tmpFile + echo $tmpFile >&2 git checkout $rev 1>&2 fi # Allow doing additional processing before .git removal eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK" if test "$NIX_PREFETCH_GIT_LEAVE_DOT_GIT" != 1 then - echo "removing \`.git'..." + echo "removing \`.git'..." >&2 rm -rf .git fi From d9aae7cb65850e477615e51bf156c2df8f29ce28 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Thu, 19 Nov 2009 12:10:23 +0000 Subject: [PATCH 43/48] Adding JAMP game.. svn path=/nixpkgs/trunk/; revision=18454 --- pkgs/games/jamp/default.nix | 33 ++++++++++++++++++++++++ pkgs/games/jamp/src-for-default.nix | 9 +++++++ pkgs/games/jamp/src-info-for-default.nix | 4 +++ pkgs/top-level/all-packages.nix | 4 +++ 4 files changed, 50 insertions(+) create mode 100644 pkgs/games/jamp/default.nix create mode 100644 pkgs/games/jamp/src-for-default.nix create mode 100644 pkgs/games/jamp/src-info-for-default.nix diff --git a/pkgs/games/jamp/default.nix b/pkgs/games/jamp/default.nix new file mode 100644 index 00000000000..b551b9b6dfc --- /dev/null +++ b/pkgs/games/jamp/default.nix @@ -0,0 +1,33 @@ +a : +let + s = import ./src-for-default.nix; + buildInputs = with a; [ + mesa SDL SDL_mixer SDL_image + + ]; +in +rec { + src = a.fetchUrlFromSrcInfo s; + + inherit (s) name; + inherit buildInputs; + configureFlags = []; + + preBuild = a.fullDepEntry ('' + sed -e "s@/usr/games@$out/bin@g" -i Makefile + sed -e "s@/usr/@$out/@g" -i Makefile + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.SDL}/include/SDL" + '') ["minInit" "addInputs" "doUnpack"]; + + /* doConfigure should be removed if not needed */ + phaseNames = ["preBuild" "doMakeInstall"]; + + meta = { + description = "A physics-based game"; + maintainers = [ + a.lib.maintainers.raskin + ]; + platforms = with a.lib.platforms; + linux ++ darwin; + }; +} diff --git a/pkgs/games/jamp/src-for-default.nix b/pkgs/games/jamp/src-for-default.nix new file mode 100644 index 00000000000..c5980b251c0 --- /dev/null +++ b/pkgs/games/jamp/src-for-default.nix @@ -0,0 +1,9 @@ +rec { + version="1.0.2"; + name="jamp-1.0.2"; + hash="13cjggyx63wmlcvpyllmd7aknfd4vzhxnwm030mas7z3h6wcsmk7"; + url="http://perre.noud.ch/jamp/download.php?file=jamp-${version}.tar.gz"; + advertisedUrl="http://perre.noud.ch/jamp/download.php?file=jamp-1.0.2.tar.gz"; + + +} diff --git a/pkgs/games/jamp/src-info-for-default.nix b/pkgs/games/jamp/src-info-for-default.nix new file mode 100644 index 00000000000..9fb4ab9dbcc --- /dev/null +++ b/pkgs/games/jamp/src-info-for-default.nix @@ -0,0 +1,4 @@ +{ + downloadPage = "http://perre.noud.ch/jamp/"; + baseName = "jamp"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc089e0e1f5..240685a7a8c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3685,6 +3685,10 @@ let inherit stdenv fetchurl gettext python; }; + jamp = builderDefsPackage ../games/jamp { + inherit mesa SDL SDL_image SDL_mixer; + }; + jasper = import ../development/libraries/jasper { inherit fetchurl stdenv unzip xlibs libjpeg; }; From 5fca80982a4fba9c5b45b80045db4bb49cd724eb Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Thu, 19 Nov 2009 13:57:57 +0000 Subject: [PATCH 44/48] move autoconfPhase so it can be overriden svn path=/nixpkgs/trunk/; revision=18458 --- pkgs/build-support/release/source-tarball.nix | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pkgs/build-support/release/source-tarball.nix b/pkgs/build-support/release/source-tarball.nix index a3ddc62deeb..7cd3208d105 100644 --- a/pkgs/build-support/release/source-tarball.nix +++ b/pkgs/build-support/release/source-tarball.nix @@ -36,6 +36,32 @@ stdenv.mkDerivation ( preConfigurePhases = "autoconfPhase"; postPhases = "finalPhase"; + + # Autoconfiscate the sources. + autoconfPhase = '' + export VERSION=${version} + export VERSION_SUFFIX=${versionSuffix} + + # `svn-revision' is set for backwards compatibility with the old + # Nix buildfarm. (Stratego/XT's autoxt uses it. We should + # update it eventually.) + echo ${versionSuffix} | sed -e s/pre// > svn-revision + + eval "$preAutoconf" + + if test -x ./bootstrap; then ./bootstrap + elif test -x ./bootstrap.sh; then ./bootstrap.sh + elif test -x ./autogen.sh; then ./autogen.sh + elif test -x ./autogen ; then ./autogen + elif test -x ./reconf; then ./reconf + elif test -f ./configure.in || test -f ./configure.ac; then + autoreconf --install --force --verbose + else + echo "No bootstrap, bootstrap.sh, configure.in or configure.ac. Assuming this is not an GNU Autotools package." + fi + + eval "$postAutoconf" + ''; } # Then, the caller-supplied attributes. @@ -64,32 +90,6 @@ stdenv.mkDerivation ( nextPostUnpack = if args ? postUnpack then args.postUnpack else ""; - # Autoconfiscate the sources. - autoconfPhase = '' - export VERSION=${version} - export VERSION_SUFFIX=${versionSuffix} - - # `svn-revision' is set for backwards compatibility with the old - # Nix buildfarm. (Stratego/XT's autoxt uses it. We should - # update it eventually.) - echo ${versionSuffix} | sed -e s/pre// > svn-revision - - eval "$preAutoconf" - - if test -x ./bootstrap; then ./bootstrap - elif test -x ./bootstrap.sh; then ./bootstrap.sh - elif test -x ./autogen.sh; then ./autogen.sh - elif test -x ./autogen ; then ./autogen - elif test -x ./reconf; then ./reconf - elif test -f ./configure.in || test -f ./configure.ac; then - autoreconf --install --force --verbose - else - echo "No bootstrap, bootstrap.sh, configure.in or configure.ac. Assuming this is not an GNU Autotools package." - fi - - eval "$postAutoconf" - ''; - # Cause distPhase to copy tar.bz2 in addition to tar.gz. tarballs = "*.tar.gz *.tar.bz2 *.tar.xz"; From aa392c3aa7e4743ff50b609009f4998a70ded628 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 19 Nov 2009 16:07:47 +0000 Subject: [PATCH 45/48] * Move functions like `runCommand' out of all-packages.nix and into build-support/. svn path=/nixpkgs/trunk/; revision=18465 --- pkgs/build-support/trivial-builders.nix | 71 +++++++++++++++++++++++++ pkgs/lib/attrsets.nix | 2 +- pkgs/top-level/all-packages.nix | 68 +++-------------------- 3 files changed, 80 insertions(+), 61 deletions(-) create mode 100644 pkgs/build-support/trivial-builders.nix diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix new file mode 100644 index 00000000000..1c9e7fc49f2 --- /dev/null +++ b/pkgs/build-support/trivial-builders.nix @@ -0,0 +1,71 @@ +{ stdenv, lndir }: + +rec { + + # Run the shell command `buildCommand' to produce a store path named + # `name'. The attributes in `env' are added to the environment + # prior to running the command. + runCommand = name: env: buildCommand: + stdenv.mkDerivation ({ + inherit name buildCommand; + } // env); + + + # Create a single file. + writeTextFile = + { name # the name of the derivation + , text + , executable ? false # run chmod +x ? + , destination ? "" # relative path appended to $out eg "/bin/foo" + }: + runCommand name {inherit text executable; } + '' + n=$out${destination} + mkdir -p "$(dirname "$n")" + echo -n "$text" > "$n" + (test -n "$executable" && chmod +x "$n") || true + ''; + + + # Shorthands for `writeTextFile'. + writeText = name: text: writeTextFile {inherit name text;}; + writeScript = name: text: writeTextFile {inherit name text; executable = true;}; + writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}";}; + + + # Create a forest of symlinks to the files in `paths'. + symlinkJoin = name: paths: + runCommand name { inherit paths; } + '' + mkdir -p $out + for i in $paths; do + ${lndir}/bin/lndir $i $out + done + ''; + + + # Make a package that just contains a setup hook with the given contents. + makeSetupHook = script: + runCommand "hook" {} + '' + ensureDir $out/nix-support + cp ${script} $out/nix-support/setup-hook + ''; + + + # Write the references (i.e. the runtime dependencies in the Nix store) of `path' to a file. + writeReferencesToFile = path: runCommand "runtime-deps" + { + exportReferencesGraph = ["graph" path]; + } + '' + touch $out + while read path; do + echo $path >> $out + read dummy + read nrRefs + for ((i = 0; i < nrRefs; i++)); do read ref; done + done < graph + ''; + +} diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix index 63abf789944..f6bf73a26fe 100644 --- a/pkgs/lib/attrsets.nix +++ b/pkgs/lib/attrsets.nix @@ -198,7 +198,7 @@ rec { /* Does the same as the update operator '//' except that attributes are merged until the given pedicate is verified. The predicate should - except 3 arguments which are the path to reach the attribute, a part of + accept 3 arguments which are the path to reach the attribute, a part of the first attribute set and a part of the second attribute set. When the predicate is verified, the value of the first attribute set is replaced by the value of the second attribute set. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 240685a7a8c..79f296b92ab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -75,6 +75,12 @@ let getConfig = attrPath: default: lib.attrByPath attrPath default config; + # Helper functions that are exported through `pkgs'. + helperFunctions = + (import ../stdenv/adapters.nix { inherit (pkgs) dietlibc fetchurl runCommand; }) // + (import ../build-support/trivial-builders.nix { inherit (pkgs) stdenv; inherit (pkgs.xorg) lndir; }); + + # Allow packages to be overriden globally via the `packageOverrides' # configuration option, which must be a function that takes `pkgs' # as an argument and returns a set of new or overriden packages. @@ -88,11 +94,11 @@ let pkgsOrig = pkgsFun {}; # the un-overriden packages, passed to packageOverrides pkgsOverriden = pkgsFun __overrides; # the overriden, final packages - pkgs = pkgsOverriden; + pkgs = pkgsOverriden // helperFunctions; # The package compositions. Yes, this isn't properly indented. - pkgsFun = __overrides: rec { + pkgsFun = __overrides: with helperFunctions; rec { inherit __overrides; @@ -198,12 +204,6 @@ let else stdenv; - inherit (import ../stdenv/adapters.nix {inherit (pkgs) dietlibc fetchurl runCommand;}) - overrideGCC overrideInStdenv overrideSetup - useDietLibC useKlibc makeStaticBinaries addAttrsToDerivation - keepBuildTree cleanupBuildTree addCoverageInstrumentation - replaceMaintainersField; - ### BUILD SUPPORT @@ -288,11 +288,6 @@ let inherit stdenv perl cpio contents; }; - makeSetupHook = script: runCommand "hook" {} '' - ensureDir $out/nix-support - cp ${script} $out/nix-support/setup-hook - ''; - makeWrapper = makeSetupHook ../build-support/make-wrapper/make-wrapper.sh; makeModulesClosure = {kernel, rootModules, allowMissing ? false}: @@ -303,38 +298,6 @@ let pathsFromGraph = ../build-support/kernel/paths-from-graph.pl; - # Run the shell command `buildCommand' to produce a store object - # named `name'. The attributes in `env' are added to the - # environment prior to running the command. - runCommand = name: env: buildCommand: stdenv.mkDerivation ({ - inherit name buildCommand; - } // env); - - symlinkJoin = name: paths: runCommand name {inherit paths;} "mkdir -p $out; for i in $paths; do ${xorg.lndir}/bin/lndir $i $out; done"; - - # Create a single file. - writeTextFile = - { name # the name of the derivation - , text - , executable ? false # run chmod +x ? - , destination ? "" # relative path appended to $out eg "/bin/foo" - }: - runCommand name {inherit text executable; } '' - n=$out${destination} - mkdir -p "$(dirname "$n")" - echo -n "$text" > "$n" - (test -n "$executable" && chmod +x "$n") || true - ''; - - # Shorthands for `writeTextFile'. - writeText = name: text: writeTextFile {inherit name text;}; - writeScript = name: text: writeTextFile {inherit name text; executable = true;}; - writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}";}; - - # entries is a list of attribute sets like { name = "name" ; path = "/nix/store/..."; } - linkFarm = name: entries: runCommand name {} ("mkdir -p $out; cd $out; \n" + - (lib.concatMapStrings (x: "ln -s '${x.path}' '${x.name}';\n") entries)); - srcOnly = args: (import ../build-support/src-only) ({inherit stdenv; } // args); substituteAll = import ../build-support/substitute/substitute-all.nix { @@ -357,21 +320,6 @@ let inherit pkgs lib; }; - # Write the references (i.e. the runtime dependencies in the Nix store) of `path' to a file. - writeReferencesToFile = path: runCommand "runtime-deps" - { - exportReferencesGraph = ["graph" path]; - } - '' - touch $out - while read path; do - echo $path >> $out - read dummy - read nrRefs - for ((i = 0; i < nrRefs; i++)); do read ref; done - done < graph - ''; - ### TOOLS From 519e7870b6b85262d3efc726f337bd0a4e8b8efa Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 19 Nov 2009 16:43:58 +0000 Subject: [PATCH 46/48] * Move `modifyDerivation' from build-support/vm to lib and rename it to `overrideDerivation'. svn path=/nixpkgs/trunk/; revision=18466 --- pkgs/build-support/vm/default.nix | 13 ++-------- pkgs/lib/attrsets.nix | 2 +- pkgs/lib/customisation.nix | 40 +++++++++++++++++++++++++++++++ pkgs/lib/default.nix | 2 ++ 4 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 pkgs/lib/customisation.nix diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 88ef284fa3b..1a8e584d65f 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -252,15 +252,6 @@ rec { ''; - modifyDerivation = f: attrs: - let attrsCleaned = removeAttrs attrs ["meta" "passthru" "outPath" "drvPath"]; - newDrv = derivation (attrsCleaned // (f attrs)); - in newDrv // - { meta = if attrs ? meta then attrs.meta else {}; - passthru = if attrs ? passthru then attrs.passthru else {}; - }; - - /* Run a derivation in a Linux virtual machine (using Qemu/KVM). By default, there is no disk image; the root filesystem is a tmpfs, and /nix/store is shared with the host (via the CIFS protocol to @@ -282,7 +273,7 @@ rec { `run-vm' will be left behind in the temporary build directory that allows you to boot into the VM and debug it interactively. */ - runInLinuxVM = modifyDerivation (attrs: { + runInLinuxVM = drv: lib.overrideDerivation drv (attrs: { builder = "${bash}/bin/sh"; args = ["-e" (vmRunCommand qemuCommandLinux)]; origArgs = attrs.args; @@ -317,7 +308,7 @@ rec { - Reboot to shutdown the machine (because Qemu doesn't seem capable of a APM/ACPI VM shutdown). */ - runInGenericVM = modifyDerivation (attrs: { + runInGenericVM = drv: lib.overrideDerivation drv (attrs: { system = "i686-linux"; builder = "${bash}/bin/sh"; args = ["-e" (vmRunCommand qemuCommandGeneric)]; diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix index f6bf73a26fe..72904458665 100644 --- a/pkgs/lib/attrsets.nix +++ b/pkgs/lib/attrsets.nix @@ -13,7 +13,7 @@ rec { /* Return an attribute from nested attribute sets. For instance ["x" "y"] applied to some set e returns e.x.y, if it exists. The - default value is returned otherwise. */ + default value is returned otherwise. */ attrByPath = attrPath: default: e: let attr = head attrPath; in diff --git a/pkgs/lib/customisation.nix b/pkgs/lib/customisation.nix new file mode 100644 index 00000000000..889ce04547f --- /dev/null +++ b/pkgs/lib/customisation.nix @@ -0,0 +1,40 @@ +{ + + + /* `overrideDerivation drv f' takes a derivation (i.e., the result + of a call to the builtin function `derivation') and returns a new + derivation in which the attributes of the original are overriden + according to the function `f'. This function is called with the + original derivation attributes. + + `overrideDerivation' allows certain "ad-hoc" customisation + scenarios (e.g. in ~/.nixpkgs/config.nix). For instance, if you + want to "patch" the derivation returned by a package function in + Nixpkgs to build another version than what the function itself + provides, you can do something like this: + + mySed = overrideDerivation pkgs.gnused (oldAttrs: { + name = "sed-4.2.2-pre"; + src = fetchurl { + url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2; + sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k"; + }; + patches = []; + }); + + For another application, see build-support/vm, where this + function is used to build arbitrary derivations inside a QEMU + virtual machine. */ + + overrideDerivation = drv: f: + let + # Filter out special attributes. + attrs = removeAttrs drv ["meta" "passthru" "outPath" "drvPath"]; + newDrv = derivation (attrs // (f drv)); + in newDrv // + { meta = if drv ? meta then drv.meta else {}; + passthru = if drv ? passthru then drv.passthru else {}; + }; + + +} diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 2f916d3ddd7..3c760964a28 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -15,6 +15,7 @@ let misc = import ./misc.nix; maintainers = import ./maintainers.nix; platforms = import ./platforms.nix; + customisation = import ./customisation.nix; in { inherit trivial lists strings stringsWithDeps attrsets sources options @@ -24,3 +25,4 @@ in # commonly used functions. // trivial // lists // strings // stringsWithDeps // attrsets // sources // properties // options // types // meta // debug // misc // modules + // customisation From 81c5c44ddb806eaec3c12088716db58e6f2e6b4f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 19 Nov 2009 17:30:21 +0000 Subject: [PATCH 47/48] * Move makeOverridable out of all-packages.nix. svn path=/nixpkgs/trunk/; revision=18469 --- pkgs/lib/customisation.nix | 27 ++++++++++++++++++++++++--- pkgs/top-level/all-packages.nix | 19 +------------------ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/pkgs/lib/customisation.nix b/pkgs/lib/customisation.nix index 889ce04547f..76d019a73c2 100644 --- a/pkgs/lib/customisation.nix +++ b/pkgs/lib/customisation.nix @@ -1,11 +1,13 @@ -{ +let lib = import ./default.nix; in + +rec { /* `overrideDerivation drv f' takes a derivation (i.e., the result of a call to the builtin function `derivation') and returns a new derivation in which the attributes of the original are overriden - according to the function `f'. This function is called with the - original derivation attributes. + according to the function `f'. The function `f' is called with + the original derivation attributes. `overrideDerivation' allows certain "ad-hoc" customisation scenarios (e.g. in ~/.nixpkgs/config.nix). For instance, if you @@ -37,4 +39,23 @@ }; + # usage: (you can use override multiple times) + # let d = makeOverridable stdenv.mkDerivation { name = ..; buildInputs; } + # noBuildInputs = d.override { buildInputs = []; } + # additionalBuildInputs = d.override ( args : args // { buildInputs = args.buildInputs ++ [ additional ]; } ) + makeOverridable = f: origArgs: f origArgs // + { override = newArgs: + makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs)); + deepOverride = newArgs: + makeOverridable f ((lib.mapAttrs (deepOverride newArgs) origArgs) // newArgs); + origArgs = origArgs; + }; + + + deepOverride = newArgs: name: x: if builtins.isAttrs x then ( + if x ? deepOverride then (x.deepOverride newArgs) else + if x ? override then (x.override newArgs) else + x) else x; + + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79f296b92ab..8f66c381677 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -125,7 +125,7 @@ let inherit lib config getConfig; - inherit (lib) lowPrio appendToName; + inherit (lib) lowPrio appendToName makeOverridable; # Applying this to an attribute set will cause nix-env to look # inside the set for derivations. @@ -157,23 +157,6 @@ let stringsWithDeps = lib.stringsWithDeps; - deepOverride = newArgs: name: x: if builtins.isAttrs x then ( - if x ? deepOverride then (x.deepOverride newArgs) else - if x ? override then (x.override newArgs) else - x) else x; - - # usage: (you can use override multiple times) - # let d = makeOverridable stdenv.mkDerivation { name = ..; buildInputs; } - # noBuildInputs = d.override { buildInputs = []; } - # additionalBuildInputs = d.override ( args : args // { buildInputs = args.buildInputs ++ [ additional ]; } ) - makeOverridable = f: origArgs: f origArgs // - { override = newArgs: - makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs)); - deepOverride = newArgs: - makeOverridable f ((lib.mapAttrs (deepOverride newArgs) origArgs) // newArgs); - origArgs = origArgs; - }; - ### STANDARD ENVIRONMENT From 58f543f19f1a2eed8a46202b36a855836cfc9e0f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 19 Nov 2009 17:36:43 +0000 Subject: [PATCH 48/48] * Remove some old Emacs versions. svn path=/nixpkgs/trunk/; revision=18470 --- pkgs/applications/editors/emacs-21/builder.sh | 12 ----- pkgs/applications/editors/emacs-21/crt.patch | 41 ---------------- .../applications/editors/emacs-21/default.nix | 28 ----------- pkgs/applications/editors/emacs-22/builder.sh | 27 ----------- .../applications/editors/emacs-22/default.nix | 48 ------------------- pkgs/top-level/all-packages.nix | 20 +------- pkgs/top-level/release.nix | 6 +-- 7 files changed, 2 insertions(+), 180 deletions(-) delete mode 100644 pkgs/applications/editors/emacs-21/builder.sh delete mode 100644 pkgs/applications/editors/emacs-21/crt.patch delete mode 100644 pkgs/applications/editors/emacs-21/default.nix delete mode 100644 pkgs/applications/editors/emacs-22/builder.sh delete mode 100644 pkgs/applications/editors/emacs-22/default.nix diff --git a/pkgs/applications/editors/emacs-21/builder.sh b/pkgs/applications/editors/emacs-21/builder.sh deleted file mode 100644 index acd98aefd04..00000000000 --- a/pkgs/applications/editors/emacs-21/builder.sh +++ /dev/null @@ -1,12 +0,0 @@ -source $stdenv/setup - -myglibc=`cat ${NIX_GCC}/nix-support/orig-libc` -echo "glibc: $myglibc" - -postConfigure() { - cp $myglibc/lib/crt1.o src - cp $myglibc/lib/crti.o src - cp $myglibc/lib/crtn.o src -} - -genericBuild diff --git a/pkgs/applications/editors/emacs-21/crt.patch b/pkgs/applications/editors/emacs-21/crt.patch deleted file mode 100644 index 93f17643a1a..00000000000 --- a/pkgs/applications/editors/emacs-21/crt.patch +++ /dev/null @@ -1,41 +0,0 @@ -Only in emacs-21.3: configure.in~ -Only in emacs-21.3: patchfile -Only in emacs-21.3/src: Makefile.in~ -diff -rc emacs-orig/src/s/gnu-linux.h emacs-21.3/src/s/gnu-linux.h -*** emacs-orig/src/s/gnu-linux.h 2001-09-28 17:50:04.000000000 +0200 ---- emacs-21.3/src/s/gnu-linux.h 2004-10-06 13:13:19.000000000 +0200 -*************** -*** 173,179 **** - /* GNU/Linux usually has crt0.o in a non-standard place */ - #define START_FILES pre-crt0.o /usr/lib/crt0.o - #else -! #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o - #endif - - #ifdef __ELF__ ---- 173,179 ---- - /* GNU/Linux usually has crt0.o in a non-standard place */ - #define START_FILES pre-crt0.o /usr/lib/crt0.o - #else -! #define START_FILES pre-crt0.o crt1.o crti.o - #endif - - #ifdef __ELF__ -*************** -*** 225,231 **** - #else - #undef LIB_GCC - #define LIB_GCC -! #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o - #endif - - /* Don't use -g in test compiles in configure. ---- 225,231 ---- - #else - #undef LIB_GCC - #define LIB_GCC -! #define LIB_STANDARD -lgcc -lc -lgcc crtn.o - #endif - - /* Don't use -g in test compiles in configure. -Only in emacs-21.3/src/s: gnu-linux.h~ diff --git a/pkgs/applications/editors/emacs-21/default.nix b/pkgs/applications/editors/emacs-21/default.nix deleted file mode 100644 index 9fc16594e26..00000000000 --- a/pkgs/applications/editors/emacs-21/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ xawSupport ? true -, xpmSupport ? true -, xaw3dSupport ? false -, stdenv, fetchurl, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null -}: - -assert xawSupport && !xaw3dSupport -> libXaw != null; -assert xawSupport && xaw3dSupport -> Xaw3d != null; -assert xpmSupport -> libXpm != null; - -stdenv.mkDerivation { - name = "emacs-21.4a"; - builder = ./builder.sh; - src = fetchurl { - url = http://nixos.org/tarballs/emacs-21.4a.tar.gz; - md5 = "8f9d97cbd126121bd5d97e5e31168a87"; - }; - patches = [./crt.patch]; - buildInputs = [ - ncurses x11 - (if xawSupport then if xaw3dSupport then Xaw3d else libXaw else null) - (if xpmSupport then libXpm else null) - ]; - - meta = { - description = "All Hail Emacs, the ultimate editor"; - }; -} diff --git a/pkgs/applications/editors/emacs-22/builder.sh b/pkgs/applications/editors/emacs-22/builder.sh deleted file mode 100644 index 7a82f6552ef..00000000000 --- a/pkgs/applications/editors/emacs-22/builder.sh +++ /dev/null @@ -1,27 +0,0 @@ -source $stdenv/setup - -preConfigure() { - libc=$(cat ${NIX_GCC}/nix-support/orig-libc) - echo "libc: $libc" - - case "${system}" in - x86_64-*) glibclibdir=lib64 ;; - *) glibclibdir=lib ;; - esac - - for i in src/s/*.h src/m/*.h; do - substituteInPlace $i \ - --replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \ - --replace /usr/${glibclibdir}/crti.o $libc/${glibclibdir}/crti.o \ - --replace /usr/${glibclibdir}/crtn.o $libc/${glibclibdir}/crtn.o \ - --replace /usr/lib/crt1.o $libc/${glibclibdir}/crt1.o \ - --replace /usr/lib/crti.o $libc/${glibclibdir}/crti.o \ - --replace /usr/lib/crtn.o $libc/${glibclibdir}/crtn.o - done - - for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do - substituteInPlace $i --replace /bin/pwd pwd - done -} - -genericBuild diff --git a/pkgs/applications/editors/emacs-22/default.nix b/pkgs/applications/editors/emacs-22/default.nix deleted file mode 100644 index da3c4babbf6..00000000000 --- a/pkgs/applications/editors/emacs-22/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ xawSupport ? true -, xpmSupport ? true -, xaw3dSupport ? false -, gtkGUI ? false -, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null -, pkgconfig ? null, gtk ? null -, ncurses -}: - -assert xawSupport && !xaw3dSupport -> libXaw != null; -assert xawSupport && xaw3dSupport -> Xaw3d != null; -assert xpmSupport -> libXpm != null; -assert gtkGUI -> pkgconfig != null && gtk != null; - -stdenv.mkDerivation rec { - name = "emacs-22.3"; - - builder = ./builder.sh; - - src = fetchurl { - url = "mirror://gnu/emacs/${name}.tar.gz"; - sha256 = "05hd89bchcpwzcx5la0alcp0wb7xywvnf98dxrshrqlfvccvgnbv"; - }; - - buildInputs = [ncurses x11] - ++ stdenv.lib.optional xawSupport (if xaw3dSupport then Xaw3d else libXaw) - ++ stdenv.lib.optional xpmSupport libXpm - ++ stdenv.lib.optionals gtkGUI [pkgconfig gtk]; - - configureFlags = - stdenv.lib.optional gtkGUI "--with-x-toolkit=gtk"; - - meta = { - description = "GNU Emacs, *the* text editor"; - - longDescription = '' - GNU Emacs is an extensible, customizable text editor—and more. - At its core is an interpreter for Emacs Lisp, a dialect of the - Lisp programming language with extensions to support text - editing. - ''; - - homepage = http://www.gnu.org/software/emacs/; - license = "GPLv3+"; - - platforms = stdenv.lib.platforms.linux; # GTK & co. are needed. - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8f66c381677..e5481bbf61c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6539,21 +6539,7 @@ let inherit fetchurl stdenv ncurses; }; - emacs = emacs22; - - emacs21 = import ../applications/editors/emacs-21 { - inherit fetchurl stdenv ncurses x11 Xaw3d; - inherit (xlibs) libXaw libXpm; - xaw3dSupport = true; - }; - - emacs22 = import ../applications/editors/emacs-22 { - inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d; - inherit (xlibs) libXaw libXpm; - inherit (gtkLibs) gtk; - xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false; - gtkGUI = getPkgConfig "emacs" "gtkSupport" true; - }; + emacs = emacs23; emacs23 = import ../applications/editors/emacs-23 { inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d @@ -6648,12 +6634,8 @@ let }; }); - emacs22Packages = emacsPackages emacs22; emacs23Packages = emacsPackages emacs23; - # The forthcoming GNU Emacs 23 used to be referred to as `emacsUnicode' here. - emacsUnicode = emacs23; - evince = makeOverridable (import ../applications/misc/evince) { inherit fetchurl stdenv perl perlXMLParser gettext intltool pkgconfig poppler libspectre djvulibre libxslt diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 060f389e9e0..83891984096 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -146,7 +146,6 @@ in { e2fsprogs = linux; ejabberd = linux; elinks = linux; - emacs22 = gtkSupported; emacs23 = gtkSupported; enscript = all; eprover = linux; @@ -436,16 +435,13 @@ in { tools = linux; }; - emacs22Packages = { + emacs23Packages = { bbdb = linux; cedet = linux; ecb = linux; emacsw3m = linux; emms = linux; nxml = all; - }; - - emacs23Packages = emacs22Packages // { jdee = linux; };