1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00

poetry2nix: 1.9.0 -> 1.9.2

This commit is contained in:
adisbladis 2020-06-08 23:52:47 +02:00
parent e5b7f1325c
commit 25b9f3b3e0
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
4 changed files with 75 additions and 4 deletions

View file

@ -7,7 +7,7 @@ let
inherit (poetryLib) isCompatible readTOML moduleName;
# Poetry2nix version
version = "1.8.0";
version = "1.9.2";
/* The default list of poetry2nix override overlays */
defaultPoetryOverrides = (import ./overrides.nix { inherit pkgs lib; });

View file

@ -146,7 +146,7 @@ let
else
pkgs.fetchurl {
url = predictURLFromPypi { inherit pname file hash kind; };
sha256 = builtins.elemAt (builtins.match "sha256:(.*)" hash) 0; # nix 2.0 backwards compatibility.
inherit hash;
}
);
getBuildSystemPkgs =

View file

@ -6,6 +6,12 @@
self: super:
{
automat = super.automat.overridePythonAttrs (
old: rec {
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.m2r ];
}
);
astroid = super.astroid.overridePythonAttrs (
old: rec {
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
@ -211,6 +217,12 @@ self: super:
}
);
intreehooks = super.intreehooks.overridePythonAttrs (
old: {
doCheck = false;
}
);
isort = super.isort.overridePythonAttrs (
old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.setuptools ];
@ -398,6 +410,12 @@ self: super:
}
);
parsel = super.parsel.overridePythonAttrs (
old: rec {
nativeBuildInputs = old.nativeBuildInputs ++ [ self.pytest-runner ];
}
);
peewee = super.peewee.overridePythonAttrs (
old:
let
@ -517,6 +535,46 @@ self: super:
}
);
pygame = super.pygame.overridePythonAttrs (
old: rec {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.SDL
];
buildInputs = [
pkgs.SDL
pkgs.SDL_image
pkgs.SDL_mixer
pkgs.SDL_ttf
pkgs.libpng
pkgs.libjpeg
pkgs.portmidi
pkgs.xorg.libX11
pkgs.freetype
];
# Tests fail because of no audio device and display.
doCheck = false;
preConfigure = ''
sed \
-e "s/origincdirs = .*/origincdirs = []/" \
-e "s/origlibdirs = .*/origlibdirs = []/" \
-e "/'\/lib\/i386-linux-gnu', '\/lib\/x86_64-linux-gnu']/d" \
-e "/\/include\/smpeg/d" \
-i buildconfig/config_unix.py
${lib.concatMapStrings (dep: ''
sed \
-e "/origincdirs =/a\ origincdirs += ['${lib.getDev dep}/include']" \
-e "/origlibdirs =/a\ origlibdirs += ['${lib.getLib dep}/lib']" \
-i buildconfig/config_unix.py
'') buildInputs
}
LOCALBASE=/ ${self.python.interpreter} buildconfig/config.py
'';
}
);
pygobject = super.pygobject.overridePythonAttrs (
old: {
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkgconfig ];
@ -537,6 +595,12 @@ self: super:
}
);
pytoml = super.pytoml.overridePythonAttrs (
old: {
doCheck = false;
}
);
pyqt5 =
let
drv = super.pyqt5;

View file

@ -20,7 +20,9 @@ let
#
toWheelAttrs = str:
let
entries = splitString "-" str;
entries' = splitString "-" str;
# Hack: Remove version "suffixes" like 2.11.4-1
entries = builtins.filter (x: builtins.match "[0-9]" x == null) entries';
p = removeSuffix ".whl" (builtins.elemAt entries 4);
in
{
@ -60,7 +62,12 @@ let
selectWheel = files:
let
filesWithoutSources = (builtins.filter (x: hasSuffix ".whl" x.file) files);
isPyAbiCompatible = pyabi: x: x == "none" || pyabi == x;
isPyAbiCompatible = pyabi: x: x == "none" || lib.hasPrefix pyabi x || (
# The CPython stable ABI is abi3 as in the shared library suffix.
python.passthru.implementation == "cpython" &&
builtins.elemAt (lib.splitString "." python.version) 0 == "3" &&
x == "abi3"
);
withPython = ver: abi: x: (isPyVersionCompatible ver x.pyVer) && (isPyAbiCompatible abi x.abi);
withPlatform =
if isLinux