From 1bc17e8f25f775897415fbd931efa5801ef2b179 Mon Sep 17 00:00:00 2001 From: Histausse Date: Sat, 20 May 2023 15:15:59 +0200 Subject: [PATCH] new test --- flake.nix | 8 +------- test_flake_poetry2nix/cli.py | 8 +++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index b4bd845..bba04df 100644 --- a/flake.nix +++ b/flake.nix @@ -20,13 +20,6 @@ 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 { @@ -39,6 +32,7 @@ }; 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 ]; diff --git a/test_flake_poetry2nix/cli.py b/test_flake_poetry2nix/cli.py index 8f1d3ae..1441e88 100644 --- a/test_flake_poetry2nix/cli.py +++ b/test_flake_poetry2nix/cli.py @@ -1,8 +1,14 @@ 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 @@ -33,4 +39,4 @@ def main(): cxy, f = ax2.csd(s1, s2, 256, 1.0 / dt) ax2.set_ylabel("CSD (dB)") - plt.savefig("test.pdf") + plt.savefig(args.file)