diff --git a/pkgs/applications/misc/audio/sox/default.nix b/pkgs/applications/misc/audio/sox/default.nix index 91bd5be07880..c0cf9d91b730 100644 --- a/pkgs/applications/misc/audio/sox/default.nix +++ b/pkgs/applications/misc/audio/sox/default.nix @@ -1,5 +1,5 @@ args: -( args.mkDerivationByConfigruation { +( args.mkDerivationByConfiguration { flagConfig = { mandatory = { implies = [ "no_oss" "no_sun_audio" ]; }; # are these options of interest? We'll see diff --git a/pkgs/build-support/fetchsvn/builder.sh b/pkgs/build-support/fetchsvn/builder.sh index d06efa88e291..b53ce95579ab 100644 --- a/pkgs/build-support/fetchsvn/builder.sh +++ b/pkgs/build-support/fetchsvn/builder.sh @@ -12,7 +12,7 @@ fi # hash of the output matters. echo 'p' | svn export -r "$rev" "$url" $out -actual=$(nix-hash $out) +actual=$(nix-hash $out --type "$outputHashAlgo") if test "$actual" != "$outputHash"; then echo "hash is $actual, expected $outputHash" >&2 exit 1 diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix index ff842b0ee243..ce6a1e61d9cf 100644 --- a/pkgs/build-support/fetchsvn/default.nix +++ b/pkgs/build-support/fetchsvn/default.nix @@ -1,4 +1,5 @@ -{stdenv, subversion, nix, sshSupport ? false, openssh ? null}: {url, rev ? "HEAD", md5}: +{stdenv, subversion, nix, sshSupport ? false, openssh ? null}: +{url, rev ? "HEAD", md5 ? "", sha256 ? ""}: stdenv.mkDerivation { name = "svn-export"; @@ -6,11 +7,11 @@ stdenv.mkDerivation { buildInputs = [subversion nix]; # Nix <= 0.7 compatibility. - id = md5; + /*id = if sha256 == "" then md5 else sha256;*/ - outputHashAlgo = "md5"; + outputHashAlgo = if sha256=="" then "md5" else "sha256"; outputHashMode = "recursive"; - outputHash = md5; + outputHash = if sha256 =="" then md5 else sha256; inherit url rev sshSupport openssh; } diff --git a/pkgs/development/libraries/ffmpeg_svn_snapshot/default.nix b/pkgs/development/libraries/ffmpeg_svn_snapshot/default.nix index 3719f1301a3f..f3611afb0b63 100644 --- a/pkgs/development/libraries/ffmpeg_svn_snapshot/default.nix +++ b/pkgs/development/libraries/ffmpeg_svn_snapshot/default.nix @@ -1,11 +1,16 @@ -{stdenv, fetchurl}: +{stdenv, fetchsvn}: stdenv.mkDerivation { - name = "ffmpeg-svn"; - src = fetchurl { + name = "ffmpeg-svn-2007-12-04"; + src = fetchsvn { + url = svn://svn.mplayerhq.hu/ffmpeg/trunk ; + rev = "11164"; + sha256 = "95658455e466aeab5a302ddd6e7b2f79f620d4495012add46028a548e6c364b2"; + }; + /*fetchurl { url = http://ffmpeg.mplayerhq.hu/ffmpeg-export-snapshot.tar.bz2; sha256 = "040a35f0c004323af14329c09ad3cff8d040e2cf9797d97cde3d9d83d02b4d87"; - }; + };*/ # !!! Hm, what are the legal consequences of --enable-gpl? configureFlags = "--enable-shared --enable-pp --enable-gpl --disable-ffserver --disable-ffplay"; } diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix index 895772d7fc0c..2ea959528a87 100644 --- a/pkgs/development/libraries/libsamplerate/default.nix +++ b/pkgs/development/libraries/libsamplerate/default.nix @@ -1,5 +1,5 @@ args: -( args.mkDerivationByConfigruation { +( args.mkDerivationByConfiguration { flagConfig = { mandatory = { buildInputs = ["pkgconfig"];}; # are these options of interest? We'll see diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3023dbd5c2ed..d02a94bfdcc0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -204,7 +204,7 @@ rec { args: with args.lib; with args; if ( builtins.isAttrs extraAttrs ) then builtins.throw "the argument extraAttrs needs to be a function beeing passed co, but attribute set passed " else - let co = chooseOptionsByFlags { inherit args flagConfig optionals defaults collectExtraPhaseActions; }; in + let co = lib_unstable.chooseOptionsByFlags { inherit args flagConfig optionals defaults collectExtraPhaseActions; }; in args.stdenv.mkDerivation ( { inherit (co) configureFlags buildInputs /*flags*/; @@ -674,6 +674,14 @@ rec { zlibSupport = !stdenv ? isDietLibC; }; + /*relfsFun = lib.sumArgs (selectVersion ../tools/misc/relfs) { + inherit fetchcvs stdenv ocaml postgresql fuse builderDefs; + }; + + relfs = relfsFun { + version = "cvs.2007.12.01"; + } null;*/ + replace = import ../tools/text/replace { inherit fetchurl stdenv; }; @@ -1740,7 +1748,7 @@ rec { }; ffmpeg_svn = import ../development/libraries/ffmpeg_svn_snapshot { - inherit fetchurl stdenv; + inherit fetchsvn stdenv; }; fftw = import ../development/libraries/fftw { @@ -2052,9 +2060,9 @@ rec { }; # commented out because it's using the new configuration style proposal which is unstable - #libsamplerate = (import ../development/libraries/libsamplerate) { - # inherit fetchurl stdenv mkDerivationByConfigruation pkgconfig lib; - #}; + libsamplerate = if builtins ? listToAttrs then (import ../development/libraries/libsamplerate) { + inherit fetchurl stdenv mkDerivationByConfiguration pkgconfig lib; + } else null; libgsf = import ../development/libraries/libgsf { inherit fetchurl stdenv perl perlXMLParser pkgconfig libxml2 gettext bzip2 @@ -4260,9 +4268,9 @@ rec { } null; # commented out because it's using the new configuration style proposal which is unstable - /* - sox = import ../applications/misc/audio/sox { - inherit fetchurl stdenv lib mkDerivationByConfigruation; + + sox = if builtins ? listToAttrs then import ../applications/misc/audio/sox { + inherit fetchurl stdenv lib mkDerivationByConfiguration; # optional features inherit alsaLib; # libao inherit libsndfile libogg flac libmad lame libsamplerate; @@ -4271,8 +4279,8 @@ rec { # /tmp/nix-7957-1/sox-14.0.0/src/ffmpeg.c:130: undefined reference to `avcodec_decode_audio2 # That's why I'v added ffmpeg_svn ffmpeg = ffmpeg_svn; - }; - */ + } else null; + spoofax = import ../applications/editors/eclipse/plugins/spoofax { inherit fetchurl stdenv; diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index 94f83b9c06fd..4e6a84a25ebf 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -12,6 +12,7 @@ args: with args; with stringsWithDeps; with lib; else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz" else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) then "tbz2" else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip" + else if (hasSuffixHack "-cvs-export" s) then "cvs-dir" else (abort "unknown archive type : ${s}")); defAddToSearchPath = FullDepEntry (" @@ -175,6 +176,9 @@ args: with args; with stringsWithDeps; with lib; unzip '${s}' cd \"$( unzip -lqq '${s}' | tail -1 | sed -e 's@^\\(\\s\\+[-0-9:]\\+\\)\\{3,3\\}\\s\\+\\([^/]\\+\\)/.*@\\2@' )\" + " else if (archiveType s) == "cvs-dir" then " + cp -r '${s}' . + cd \$(basename ${s}) " else (abort "unknown archive type : ${s}"))+ (if args ? goSrcDir then args.goSrcDir else "") ) [minInit];