# HG changeset patch # User Marcin Kuzminski # Date 2019-07-09 20:14:48 # Node ID ae6fe219c1a1feabf900d26bef7074c49b136e4a # Parent 14efe1b186ee802557076e32a6fdb35c3017b6f4 requirements: added pygit2 into project diff --git a/pkgs/overlays.nix b/pkgs/overlays.nix --- a/pkgs/overlays.nix +++ b/pkgs/overlays.nix @@ -1,4 +1,5 @@ self: super: { + # bump GIT version git = super.lib.overrideDerivation super.git (oldAttrs: { name = "git-2.19.2"; @@ -18,6 +19,29 @@ self: super: { }); + libgit2rc = super.lib.overrideDerivation super.libgit2 (oldAttrs: { + name = "libgit2-0.28.2"; + version = "0.28.2"; + + src = self.fetchFromGitHub { + owner = "libgit2"; + repo = "libgit2"; + rev = "v0.28.2"; + sha256 = "0cm8fvs05rj0baigs2133q5a0sm3pa234y8h6hmwhl2bz9xq3k4b"; + }; + + cmakeFlags = [ "-DTHREADSAFE=ON" "-DUSE_HTTPS=no"]; + + buildInputs = [ + super.zlib + super.libssh2 + super.openssl + super.curl + ]; + + + }); + # Override subversion derivation to # - activate python bindings subversion = @@ -41,7 +65,7 @@ self: super: { " --with-utf8proc=internal" ]; - }); + } diff --git a/pkgs/python-packages-overrides.nix b/pkgs/python-packages-overrides.nix --- a/pkgs/python-packages-overrides.nix +++ b/pkgs/python-packages-overrides.nix @@ -15,6 +15,12 @@ in self: super: { + "cffi" = super."cffi".override (attrs: { + buildInputs = [ + pkgs.libffi + ]; + }); + "gevent" = super."gevent".override (attrs: { propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ # NOTE: (marcink) odd requirements from gevent aren't set properly, @@ -52,6 +58,12 @@ self: super: { ]; }); + "pygit2" = super."pygit2".override (attrs: { + propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ + pkgs.libffi + pkgs.libgit2rc + ]; + }); # Avoid that base packages screw up the build process inherit (basePythonPackages) diff --git a/pkgs/python-packages.nix b/pkgs/python-packages.nix --- a/pkgs/python-packages.nix +++ b/pkgs/python-packages.nix @@ -48,6 +48,20 @@ self: super: { license = [ pkgs.lib.licenses.mit ]; }; }; + "cffi" = super.buildPythonPackage { + name = "cffi-1.12.3"; + doCheck = false; + propagatedBuildInputs = [ + self."pycparser" + ]; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz"; + sha256 = "0x075521fxwv0mfp4cqzk7lvmw4n94bjw601qkcv314z5s182704"; + }; + meta = { + license = [ pkgs.lib.licenses.mit ]; + }; + }; "configobj" = super.buildPythonPackage { name = "configobj-5.0.6"; doCheck = false; @@ -504,6 +518,32 @@ self: super: { license = [ pkgs.lib.licenses.mit ]; }; }; + "pycparser" = super.buildPythonPackage { + name = "pycparser-2.19"; + doCheck = false; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz"; + sha256 = "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"; + }; + meta = { + license = [ pkgs.lib.licenses.bsdOriginal ]; + }; + }; + "pygit2" = super.buildPythonPackage { + name = "pygit2-0.28.2"; + doCheck = false; + propagatedBuildInputs = [ + self."cffi" + self."six" + ]; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/4c/64/88c2a4eb2d22ca1982b364f41ff5da42d61de791d7eb68140e7f8f7eb721/pygit2-0.28.2.tar.gz"; + sha256 = "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"; + }; + meta = { + license = [ { fullName = "GPLv2 with linking exception"; } ]; + }; + }; "pygments" = super.buildPythonPackage { name = "pygments-2.4.2"; doCheck = false; @@ -691,6 +731,7 @@ self: super: { self."pastedeploy" self."pyramid" self."pyramid-mako" + self."pygit2" self."repoze.lru" self."simplejson" self."subprocess32" diff --git a/pkgs/shell-generate.nix b/pkgs/shell-generate.nix --- a/pkgs/shell-generate.nix +++ b/pkgs/shell-generate.nix @@ -23,6 +23,7 @@ pkgs.stdenv.mkDerivation { pythonPackages.pip-tools pkgs.apr pkgs.aprutil + pkgs.libffi ]; shellHook = '' diff --git a/requirements.txt b/requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -17,6 +17,7 @@ msgpack-python==0.5.6 pastedeploy==2.0.1 pyramid==1.10.4 pyramid-mako==1.0.2 +pygit2==0.28.2 repoze.lru==0.7 simplejson==3.16.0