mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
Add Pypy support (#40)
This commit is contained in:
parent
769dc25d77
commit
7170aad633
5 changed files with 22 additions and 14 deletions
|
@ -195,7 +195,7 @@ let
|
|||
postPatch = (passedAttrs.postPatch or "") + ''
|
||||
# Tell poetry not to resolve the path dependencies. Any version is
|
||||
# fine !
|
||||
yj -tj < pyproject.toml | python ${./pyproject-without-path.py} > pyproject.json
|
||||
yj -tj < pyproject.toml | ${python.interpreter} ${./pyproject-without-path.py} > pyproject.json
|
||||
yj -jt < pyproject.json > pyproject.toml
|
||||
rm pyproject.json
|
||||
'';
|
||||
|
|
|
@ -112,7 +112,7 @@ pythonPackages.callPackage (
|
|||
builtins.map (n: pythonPackages.${lib.toLower n}) (builtins.attrNames dependencies);
|
||||
|
||||
meta = {
|
||||
broken = ! isCompatible python.version python-versions;
|
||||
broken = ! isCompatible python.pythonVersion python-versions;
|
||||
license = [];
|
||||
};
|
||||
|
||||
|
|
|
@ -21,11 +21,15 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
cffi = super.cffi.overrideAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.libffi ];
|
||||
}
|
||||
);
|
||||
cffi =
|
||||
# cffi is bundled with pypy
|
||||
if self.python.implementation == "pypy" then null else (
|
||||
super.cffi.overrideAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.libffi ];
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
cftime = super.cftime.overrideAttrs (
|
||||
old: {
|
||||
|
|
|
@ -83,7 +83,10 @@ let
|
|||
# This function also performs variable substitution, replacing environment markers with their explicit values
|
||||
transformExpressions = exprs: let
|
||||
variables = {
|
||||
os_name = "posix"; # TODO: Check other platforms
|
||||
os_name = (
|
||||
if python.pname == "jython" then "java"
|
||||
else "posix"
|
||||
);
|
||||
sys_platform = (
|
||||
if stdenv.isLinux then "linux"
|
||||
else if stdenv.isDarwin then "darwin"
|
||||
|
@ -100,7 +103,7 @@ let
|
|||
platform_version = ""; # Field not reproducible
|
||||
python_version = python.passthru.pythonVersion;
|
||||
python_full_version = python.version;
|
||||
implementation_name = "cpython"; # Only cpython supported for now
|
||||
implementation_name = python.implementation;
|
||||
implementation_version = python.version;
|
||||
extra = "";
|
||||
};
|
||||
|
|
|
@ -29,15 +29,16 @@ builtins.removeAttrs
|
|||
inherit poetry2nix poetry;
|
||||
inherit (pkgs) postgresql;
|
||||
};
|
||||
pyqt5 = pkgs.callPackage ./pyqt5 { inherit poetry2nix; };
|
||||
eggs = pkgs.callPackage ./eggs { inherit poetry2nix; };
|
||||
|
||||
# Test building poetry
|
||||
inherit poetry;
|
||||
poetry-python2 = poetry.override { python = pkgs.python2; };
|
||||
|
||||
# Pyqt5 test is waiting for nixpkgs sip bump to reach channel
|
||||
pyqt5 = pkgs.callPackage ./pyqt5 { inherit poetry2nix; };
|
||||
|
||||
# Egg support not yet in channel, uncomment when channel progressed
|
||||
eggs = pkgs.callPackage ./eggs { inherit poetry2nix; };
|
||||
# And also test with pypy
|
||||
poetry-pypy = poetry.override { python = pkgs.pypy; };
|
||||
poetry-pypy3 = poetry.override { python = pkgs.pypy3; };
|
||||
|
||||
inherit (poetry2nix) doc;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue