subversion: Use callPackages

This commit is contained in:
Eelco Dolstra 2015-12-16 15:17:00 +01:00
parent 35f8952a8c
commit 64792ffdaa
2 changed files with 93 additions and 83 deletions

View File

@ -8,7 +8,6 @@
, stdenv, fetchurl, apr, aprutil, zlib, sqlite
, apacheHttpd ? null, expat, swig ? null, jdk ? null, python ? null, perl ? null
, sasl ? null, serf ? null
, branch ? "1.9"
}:
assert bdbSupport -> aprutil.bdbSupport;
@ -17,25 +16,14 @@ assert pythonBindings -> swig != null && python != null;
assert javahlBindings -> jdk != null && perl != null;
let
config = {
"1.9".ver_min = "2";
"1.9".sha1 = "fb9db3b7ddf48ae37aa8785872301b59bfcc7017";
"1.8".ver_min = "14";
"1.8".sha1 = "0698efc58373e7657f6dd3ce13cab7b002ffb497";
};
in
assert builtins.hasAttr branch config;
stdenv.mkDerivation (rec {
version = "${branch}." + config.${branch}.ver_min;
common = { version, sha1 }: stdenv.mkDerivation (rec {
inherit version;
name = "subversion-${version}";
src = fetchurl {
url = "mirror://apache/subversion/${name}.tar.bz2";
inherit (config.${branch}) sha1;
inherit sha1;
};
buildInputs = [ zlib apr aprutil sqlite ]
@ -89,9 +77,24 @@ stdenv.mkDerivation (rec {
maintainers = with stdenv.lib.maintainers; [ eelco lovek323 ];
hydraPlatforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
};
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
CXX = "clang++";
CC = "clang";
CPP = "clang -E";
CXXCPP = "clang++ -E";
})
});
in {
subversion18 = common {
version = "1.8.14";
sha1 = "0698efc58373e7657f6dd3ce13cab7b002ffb497";
};
subversion19 = common {
version = "1.9.2";
sha1 = "fb9db3b7ddf48ae37aa8785872301b59bfcc7017";
};
}

View File

@ -13217,7 +13217,7 @@ let
sublime3 = lowPrio (callPackage ../applications/editors/sublime3 { });
subversion = callPackage ../applications/version-management/subversion/default.nix {
inherit (callPackages ../applications/version-management/subversion/default.nix {
bdbSupport = true;
httpServer = false;
httpSupport = true;
@ -13226,9 +13226,12 @@ let
javahlBindings = false;
saslSupport = false;
sasl = cyrus_sasl;
};
})
subversion18 subversion19;
subversionClient = appendToName "client" (subversion.override {
subversion = pkgs.subversion19;
subversionClient = appendToName "client" (pkgs.subversion.override {
bdbSupport = false;
perlBindings = true;
pythonBindings = true;
@ -14527,7 +14530,11 @@ let
libcanberra = libcanberra_kde;
boost = boost155;
kdelibs = kdeApps_15_08.kdelibs;
subversionClient = subversionClient.override { branch = "1.8"; };
subversionClient = pkgs.subversion18.override {
bdbSupport = false;
perlBindings = true;
pythonBindings = true;
};
}
../desktops/kde-4.14;