main
Histausse 2023-05-20 15:15:59 +02:00
parent 11e4aed516
commit 1bc17e8f25
2 changed files with 8 additions and 8 deletions

View File

@ -20,13 +20,6 @@
projectDir = self; projectDir = self;
overrides = overrides.withDefaults (self: super: { overrides = overrides.withDefaults (self: super: {
pillow = super.pillow.overridePythonAttrs(old: { 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 # https://github.com/nix-community/poetry2nix/issues/1139
patches = (old.patches or []) ++ nixpkgs.lib.optionals (old.version == "9.5.0") [ patches = (old.patches or []) ++ nixpkgs.lib.optionals (old.version == "9.5.0") [
(pkgs.fetchpatch { (pkgs.fetchpatch {
@ -39,6 +32,7 @@
}; };
docker = pkgs.dockerTools.buildImage { docker = pkgs.dockerTools.buildImage {
name = "test_flake_poetry2nix"; name = "test_flake_poetry2nix";
tag = "latest";
copyToRoot = pkgs.buildEnv { copyToRoot = pkgs.buildEnv {
name = "test_flake_poetry2nix_root_img"; name = "test_flake_poetry2nix_root_img";
paths = [ self.packages.${system}.test_flake_poetry2nix ]; paths = [ self.packages.${system}.test_flake_poetry2nix ];

View File

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