tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
subversion: Use callPackages
Eelco Dolstra
10 years ago
64792ffd
35f8952a
+86
-76
2 changed files
expand all
collapse all
unified
split
pkgs
applications
version-management
subversion
default.nix
top-level
all-packages.nix
+67
-64
pkgs/applications/version-management/subversion/default.nix
···
8
, stdenv, fetchurl, apr, aprutil, zlib, sqlite
9
, apacheHttpd ? null, expat, swig ? null, jdk ? null, python ? null, perl ? null
10
, sasl ? null, serf ? null
11
-
, branch ? "1.9"
12
}:
13
14
assert bdbSupport -> aprutil.bdbSupport;
···
17
assert javahlBindings -> jdk != null && perl != null;
18
19
let
20
-
config = {
21
-
"1.9".ver_min = "2";
22
-
"1.9".sha1 = "fb9db3b7ddf48ae37aa8785872301b59bfcc7017";
23
24
-
"1.8".ver_min = "14";
25
-
"1.8".sha1 = "0698efc58373e7657f6dd3ce13cab7b002ffb497";
26
-
};
27
-
in
28
-
assert builtins.hasAttr branch config;
29
30
-
stdenv.mkDerivation (rec {
0
0
0
31
32
-
version = "${branch}." + config.${branch}.ver_min;
0
0
0
0
33
34
-
name = "subversion-${version}";
0
0
0
0
0
0
0
0
0
0
35
36
-
src = fetchurl {
37
-
url = "mirror://apache/subversion/${name}.tar.bz2";
38
-
inherit (config.${branch}) sha1;
39
-
};
0
0
0
0
0
40
41
-
buildInputs = [ zlib apr aprutil sqlite ]
42
-
++ stdenv.lib.optional httpSupport serf
43
-
++ stdenv.lib.optional pythonBindings python
44
-
++ stdenv.lib.optional perlBindings perl
45
-
++ stdenv.lib.optional saslSupport sasl;
0
0
0
46
47
-
configureFlags = ''
48
-
${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"}
49
-
${if httpServer then "--with-apxs=${apacheHttpd}/bin/apxs" else "--without-apxs"}
50
-
${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"}
51
-
${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""}
52
-
--disable-keychain
53
-
${if saslSupport then "--with-sasl=${sasl}" else "--without-sasl"}
54
-
${if httpSupport then "--with-serf=${serf}" else "--without-serf"}
55
-
--with-zlib=${zlib}
56
-
--with-sqlite=${sqlite}
57
-
'';
58
59
-
preBuild = ''
60
-
makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
61
-
'';
62
63
-
postInstall = ''
64
-
if test -n "$pythonBindings"; then
65
-
make swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
66
-
make install-swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
67
-
fi
68
69
-
if test -n "$perlBindings"; then
70
-
make swig-pl-lib
71
-
make install-swig-pl-lib
72
-
cd subversion/bindings/swig/perl/native
73
-
perl Makefile.PL PREFIX=$out
74
-
make install
75
-
cd -
76
-
fi
77
78
-
mkdir -p $out/share/bash-completion/completions
79
-
cp tools/client-side/bash_completion $out/share/bash-completion/completions/subversion
80
-
'';
0
0
0
81
82
-
inherit perlBindings pythonBindings;
83
84
-
enableParallelBuilding = true;
0
0
0
85
86
-
meta = {
87
-
description = "A version control system intended to be a compelling replacement for CVS in the open source community";
88
-
homepage = http://subversion.apache.org/;
89
-
maintainers = with stdenv.lib.maintainers; [ eelco lovek323 ];
90
-
hydraPlatforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
91
};
92
-
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
93
-
CXX = "clang++";
94
-
CC = "clang";
95
-
CPP = "clang -E";
96
-
CXXCPP = "clang++ -E";
97
-
})
···
8
, stdenv, fetchurl, apr, aprutil, zlib, sqlite
9
, apacheHttpd ? null, expat, swig ? null, jdk ? null, python ? null, perl ? null
10
, sasl ? null, serf ? null
0
11
}:
12
13
assert bdbSupport -> aprutil.bdbSupport;
···
16
assert javahlBindings -> jdk != null && perl != null;
17
18
let
0
0
0
19
20
+
common = { version, sha1 }: stdenv.mkDerivation (rec {
21
+
inherit version;
22
+
name = "subversion-${version}";
0
0
23
24
+
src = fetchurl {
25
+
url = "mirror://apache/subversion/${name}.tar.bz2";
26
+
inherit sha1;
27
+
};
28
29
+
buildInputs = [ zlib apr aprutil sqlite ]
30
+
++ stdenv.lib.optional httpSupport serf
31
+
++ stdenv.lib.optional pythonBindings python
32
+
++ stdenv.lib.optional perlBindings perl
33
+
++ stdenv.lib.optional saslSupport sasl;
34
35
+
configureFlags = ''
36
+
${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"}
37
+
${if httpServer then "--with-apxs=${apacheHttpd}/bin/apxs" else "--without-apxs"}
38
+
${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"}
39
+
${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""}
40
+
--disable-keychain
41
+
${if saslSupport then "--with-sasl=${sasl}" else "--without-sasl"}
42
+
${if httpSupport then "--with-serf=${serf}" else "--without-serf"}
43
+
--with-zlib=${zlib}
44
+
--with-sqlite=${sqlite}
45
+
'';
46
47
+
preBuild = ''
48
+
makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
49
+
'';
50
+
51
+
postInstall = ''
52
+
if test -n "$pythonBindings"; then
53
+
make swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
54
+
make install-swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
55
+
fi
56
57
+
if test -n "$perlBindings"; then
58
+
make swig-pl-lib
59
+
make install-swig-pl-lib
60
+
cd subversion/bindings/swig/perl/native
61
+
perl Makefile.PL PREFIX=$out
62
+
make install
63
+
cd -
64
+
fi
65
66
+
mkdir -p $out/share/bash-completion/completions
67
+
cp tools/client-side/bash_completion $out/share/bash-completion/completions/subversion
68
+
'';
0
0
0
0
0
0
0
0
69
70
+
inherit perlBindings pythonBindings;
0
0
71
72
+
enableParallelBuilding = true;
0
0
0
0
73
74
+
meta = {
75
+
description = "A version control system intended to be a compelling replacement for CVS in the open source community";
76
+
homepage = http://subversion.apache.org/;
77
+
maintainers = with stdenv.lib.maintainers; [ eelco lovek323 ];
78
+
hydraPlatforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
79
+
};
0
0
80
81
+
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
82
+
CXX = "clang++";
83
+
CC = "clang";
84
+
CPP = "clang -E";
85
+
CXXCPP = "clang++ -E";
86
+
});
87
88
+
in {
89
90
+
subversion18 = common {
91
+
version = "1.8.14";
92
+
sha1 = "0698efc58373e7657f6dd3ce13cab7b002ffb497";
93
+
};
94
95
+
subversion19 = common {
96
+
version = "1.9.2";
97
+
sha1 = "fb9db3b7ddf48ae37aa8785872301b59bfcc7017";
0
0
98
};
99
+
100
+
}
0
0
0
0
+19
-12
pkgs/top-level/all-packages.nix
···
13217
13218
sublime3 = lowPrio (callPackage ../applications/editors/sublime3 { });
13219
13220
-
subversion = callPackage ../applications/version-management/subversion/default.nix {
13221
-
bdbSupport = true;
13222
-
httpServer = false;
13223
-
httpSupport = true;
13224
-
pythonBindings = false;
13225
-
perlBindings = false;
13226
-
javahlBindings = false;
13227
-
saslSupport = false;
13228
-
sasl = cyrus_sasl;
13229
-
};
0
0
0
13230
13231
-
subversionClient = appendToName "client" (subversion.override {
13232
bdbSupport = false;
13233
perlBindings = true;
13234
pythonBindings = true;
···
14527
libcanberra = libcanberra_kde;
14528
boost = boost155;
14529
kdelibs = kdeApps_15_08.kdelibs;
14530
-
subversionClient = subversionClient.override { branch = "1.8"; };
0
0
0
0
14531
}
14532
../desktops/kde-4.14;
14533
···
13217
13218
sublime3 = lowPrio (callPackage ../applications/editors/sublime3 { });
13219
13220
+
inherit (callPackages ../applications/version-management/subversion/default.nix {
13221
+
bdbSupport = true;
13222
+
httpServer = false;
13223
+
httpSupport = true;
13224
+
pythonBindings = false;
13225
+
perlBindings = false;
13226
+
javahlBindings = false;
13227
+
saslSupport = false;
13228
+
sasl = cyrus_sasl;
13229
+
})
13230
+
subversion18 subversion19;
13231
+
13232
+
subversion = pkgs.subversion19;
13233
13234
+
subversionClient = appendToName "client" (pkgs.subversion.override {
13235
bdbSupport = false;
13236
perlBindings = true;
13237
pythonBindings = true;
···
14530
libcanberra = libcanberra_kde;
14531
boost = boost155;
14532
kdelibs = kdeApps_15_08.kdelibs;
14533
+
subversionClient = pkgs.subversion18.override {
14534
+
bdbSupport = false;
14535
+
perlBindings = true;
14536
+
pythonBindings = true;
14537
+
};
14538
}
14539
../desktops/kde-4.14;
14540