60 lines
1.5 KiB
Nix
60 lines
1.5 KiB
Nix
{ lib
|
|
, poetry2nix
|
|
, pkgs
|
|
, gettext
|
|
, tlds-alpha-by-domain ? ./tlds-alpha-by-domain.txt
|
|
}:
|
|
|
|
let
|
|
tlds = pkgs.fetchurl {
|
|
url = "https://data.iana.org/TLD/tlds-alpha-by-domain.txt";
|
|
sha256 = "0153py77ll759jacq41dp2z2ksr08pdcfic0rwjd6pr84dk89y9v";
|
|
};
|
|
pkgsRequiringSetuptools = [
|
|
"dj-static"
|
|
"django-jquery-js"
|
|
"paypal-checkout-serversdk"
|
|
"python-u2flib-server"
|
|
"slimit"
|
|
"static3"
|
|
];
|
|
in
|
|
poetry2nix.mkPoetryApplication rec {
|
|
projectDir = ./.;
|
|
#python = pkgs.python310;
|
|
preferWheels = true;
|
|
overrides = poetry2nix.defaultPoetryOverrides.extend
|
|
(
|
|
self: super: lib.attrsets.genAttrs pkgsRequiringSetuptools
|
|
(
|
|
pythonPackage:
|
|
super."${pythonPackage}".overridePythonAttrs (
|
|
old: {
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
|
|
}
|
|
)
|
|
) // {
|
|
tlds = super.tlds.overridePythonAttrs (
|
|
old: {
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
|
|
}
|
|
);
|
|
pretix = super.pretix.overridePythonAttrs (
|
|
old: {
|
|
buildInputs = (old.buildInputs or [ ]) ++ [
|
|
gettext
|
|
];
|
|
preFixup = ''
|
|
python -m pretix compilemessages
|
|
python -m pretix compilejsi18n
|
|
'';
|
|
}
|
|
);
|
|
reportlab = super.reportlab.overridePythonAttrs (
|
|
old: {
|
|
postPatch = "";
|
|
}
|
|
);
|
|
}
|
|
);
|
|
}
|