##// END OF EJS Templates
nix: bump py3c for compilation of python3 svn
marcink -
r990:a1e80427 python3
parent child Browse files
Show More
@@ -1,96 +1,100 b''
1 1 self: super: {
2 2
3 3 # change GIT version
4 4 # latest supported are in: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git
5 5 git = super.lib.overrideDerivation super.git (oldAttrs: {
6 6 name = "git-2.25.3";
7 7 src = self.fetchurl {
8 8 url = "https://www.kernel.org/pub/software/scm/git/git-2.25.3.tar.xz";
9 9 sha256 = "0yvr97cl0dvj3fwblq1mb0cp97v8hrn9l98p8b1jx8815mbsnz9h";
10 10 };
11 11
12 12 # patches come from: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git
13 13 patches = [
14 14 ./patches/git/docbook2texi.patch
15 15 ./patches/git/git-sh-i18n.patch
16 16 ./patches/git/ssh-path.patch
17 17 ./patches/git/git-send-email-honor-PATH.patch
18 18 ./patches/git/installCheck-path.patch
19 19 ];
20 20
21 21 });
22 22
23 23 libgit2rc = super.lib.overrideDerivation super.libgit2 (oldAttrs: {
24 24 name = "libgit2-1.0.1";
25 25 version = "1.0.1";
26 26
27 27 src = self.fetchFromGitHub {
28 28 owner = "libgit2";
29 29 repo = "libgit2";
30 30 rev = "v1.0.1";
31 31 sha256 = "0xqdnvrq1bnf8hxh9xjw25y2cg91agvd9jr5qwd30z2a0dzll22v";
32 32 };
33 33
34 34 cmakeFlags = [ "-DTHREADSAFE=ON" "-DUSE_HTTPS=no"];
35 35
36 36 buildInputs = [
37 37 super.zlib
38 38 super.libssh2
39 39 super.openssl
40 40 super.curl
41 41 ];
42 42
43 43 });
44 44
45 45 # Override subversion derivation to
46 46 # - activate special python bindings
47 47 subversionrc =
48
48 49 let
49 50 py3c = self.python38Packages.buildPythonPackage rec {
50 51 pname = "py3c";
51 version = "1.0";
52 version = "1.1";
52 53 src = self.fetchurl {
53 url = "https://files.pythonhosted.org/packages/6a/aa/9f1a69a8c71e72553b281603633e42501de932aa4d9912bccbf9a2884093/py3c-1.0.tar.gz";
54 sha256 = "1h80jqi6r64kppxb4kshsiadrgc5hwk5arp3zcki01jf4ahknjz9";
54 url = "https://github.com/encukou/py3c/archive/v1.1.tar.gz";
55 sha256 = "086xxccgzr4zkhsjkbcakydghrmll3rkxdcxhp5d1pidr4mw5zy7";
55 56 };
56 57 format = "setuptools";
57 58 doCheck = false;
58 59 buildInputs = [];
59 60 checkInputs = [];
60 61 nativeBuildInputs = [];
61 62 propagatedBuildInputs = [];
62 63 meta = {
63 64 license = [ ];
64 65 };
66
67 preBuild = ''
68 make install
69 '';
65 70 };
66 in
67 let
71
68 72 pythonWithEnv = self.python38Packages.python.buildEnv.override {
69 73 extraLibs = [ py3c ];
70 74 };
71 in
72 let
75
73 76 subversionWithPython = super.subversion.override {
74 77 httpSupport = true; # client must support http
75 78 pythonBindings = true;
76 79 python = pythonWithEnv;
77 80 };
78 81
79 82 in
80 83 super.lib.overrideDerivation subversionWithPython (oldAttrs: {
81 84 name = "subversion-1.14.0";
82 85 src = self.fetchurl {
83 86 url = "https://archive.apache.org/dist/subversion/subversion-1.14.0.tar.gz";
84 87 sha256 = "1l1px5kva5a13pi2rkxfgxfvypvl6bmbkdag6168fhayad3i2ggg";
85 88 };
86 89
87 90 ## use internal lz4/utf8proc because it is stable and shipped with SVN
88 91 configureFlags = oldAttrs.configureFlags ++ [
89 92 " --with-lz4=internal"
90 93 " --with-utf8proc=internal"
94 " --with-py3c=${py3c}/include/python3.8/py3c/"
91 95 ];
92 96 });
93 97
94 98
95 99
96 100 }
@@ -1,50 +1,50 b''
1 1 # This file contains the adjustments which are desired for a development
2 2 # environment.
3 3
4 4 { pkgs ? (import <nixpkgs> {})
5 5 , pythonPackages ? "python38Packages"
6 6 , doCheck ? false
7 7 }:
8 8
9 9 let
10 10
11 11 # Full runtime environment without the actual Python package
12 env = import ./default.nix {
12 PythonDepsEnv = import ./default.nix {
13 13 inherit
14 14 doCheck;
15 15 pythonExternalOverrides = self: super: {
16 16 rhodecode-vcsserver = null;
17 17 };
18 18 };
19 19
20 20 # The python package with full runtime environment as dependency for nix-shell
21 21 package = (import ./default.nix {
22 22 inherit
23 23 doCheck;
24 24 pythonExternalOverrides = self: super: {
25 25 rhodecode-vcsserver = super.rhodecode-vcsserver.overridePythonAttrs(attrs: {
26 26 nativeBuildInputs = with self;
27 27 attrs.nativeBuildInputs ++
28 28 attrs.buildInputs ++
29 29 attrs.propagatedBuildInputs ++ [
30 env
30 PythonDepsEnv
31 31 pytest
32 32 ipdb
33 33 ipython
34 34 ];
35 35 });
36 36 };
37 37 }).passthru.pythonPackages.rhodecode-vcsserver;
38 38
39 39 in package.overridePythonAttrs(attrs: {
40 40 postShellHook= ''
41 41 # Custom prompt to distinguish from other dev envs.
42 42 export PS1="\n\[\033[1;32m\][vcsserver-shell:\w]$\[\033[0m\] "
43 43
44 44 # Set locale
45 45 export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
46 46 export LC_ALL="en_US.UTF-8"
47 47
48 48 '';
49 49
50 50 })
General Comments 0
You need to be logged in to leave comments. Login now