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