Compare commits

..

No commits in common. "1bc17e8f25f775897415fbd931efa5801ef2b179" and "5db94471a62009013238e57b6aacab068d6fdff4" have entirely different histories.

3 changed files with 4 additions and 25 deletions

View File

@ -11,28 +11,14 @@
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication overrides;
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication;
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
test_flake_poetry2nix = mkPoetryApplication {
projectDir = self;
overrides = overrides.withDefaults (self: super: {
pillow = super.pillow.overridePythonAttrs(old: {
# 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=";
})
];
});
});
};
test_flake_poetry2nix = mkPoetryApplication { projectDir = self; };
docker = pkgs.dockerTools.buildImage {
name = "test_flake_poetry2nix";
tag = "latest";
copyToRoot = pkgs.buildEnv {
name = "test_flake_poetry2nix_root_img";
paths = [ self.packages.${system}.test_flake_poetry2nix ];

View File

@ -17,7 +17,7 @@ numpy = "^1.24.3"
matplotlib = "^3.7.1"
[tool.poetry.scripts]
test_p2n = "test_flake_poetry2nix.cli:main"
test = "test_flake_poetry2nix.cli:main"
[tool.poetry.group.dev.dependencies]
pytest = "*"

View File

@ -1,15 +1,8 @@
import numpy as np
import matplotlib.pyplot as plt
import argparse
from pathlib import Path
def main():
parser = argparse.ArgumentParser(prog="test_p2n")
parser.add_argument("file", type=Path)
args = parser.parse_args()
print("plop")
fig, (ax1, ax2) = plt.subplots(2, 1)
# make a little extra space between the subplots
fig.subplots_adjust(hspace=0.5)
@ -39,4 +32,4 @@ def main():
cxy, f = ax2.csd(s1, s2, 256, 1.0 / dt)
ax2.set_ylabel("CSD (dB)")
plt.savefig(args.file)
plt.savefig("test.pdf")