fix (?) flake
parent
5db94471a6
commit
11e4aed516
24
flake.nix
24
flake.nix
|
|
@ -11,12 +11,32 @@
|
|||
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication;
|
||||
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication overrides;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
test_flake_poetry2nix = mkPoetryApplication { projectDir = self; };
|
||||
test_flake_poetry2nix = mkPoetryApplication {
|
||||
projectDir = self;
|
||||
overrides = overrides.withDefaults (self: super: {
|
||||
pillow = super.pillow.overridePythonAttrs(old: {
|
||||
# Use preConfigure from nixpkgs to fix library detection issues and
|
||||
# impurities which can break the build process; this also requires
|
||||
# adding propagatedBuildInputs and buildInputs from the same source.
|
||||
# propagatedBuildInputs = (old.buildInputs or []) ++ pkgs.python3.pkgs.pillow.propagatedBuildInputs;
|
||||
# buildInputs = (old.buildInputs or []) ++ pkgs.python3.pkgs.pillow.buildInputs;
|
||||
# preConfigure = (old.preConfigure or "") + pkgs.python3.pkgs.pillow.preConfigure;
|
||||
|
||||
# https://github.com/nix-community/poetry2nix/issues/1139
|
||||
patches = (old.patches or []) ++ nixpkgs.lib.optionals (old.version == "9.5.0") [
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/python-pillow/Pillow/commit/0ec0a89ead648793812e11739e2a5d70738c6be5.diff";
|
||||
sha256 = "sha256-rZfk+OXZU6xBpoumIW30E80gRsox/Goa3hMDxBUkTY0=";
|
||||
})
|
||||
];
|
||||
});
|
||||
});
|
||||
};
|
||||
docker = pkgs.dockerTools.buildImage {
|
||||
name = "test_flake_poetry2nix";
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ numpy = "^1.24.3"
|
|||
matplotlib = "^3.7.1"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
test = "test_flake_poetry2nix.cli:main"
|
||||
test_p2n = "test_flake_poetry2nix.cli:main"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pytest = "*"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import matplotlib.pyplot as plt
|
|||
|
||||
|
||||
def main():
|
||||
print("plop")
|
||||
fig, (ax1, ax2) = plt.subplots(2, 1)
|
||||
# make a little extra space between the subplots
|
||||
fig.subplots_adjust(hspace=0.5)
|
||||
|
|
|
|||
Loading…
Reference in New Issue