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