From ff6d1ff918eabbe5a1341d9745678e78164b5917 Mon Sep 17 00:00:00 2001 From: Harry Callahan Date: Wed, 3 Jan 2024 14:18:32 +0000 Subject: [PATCH 1/2] Move poetryOverrides to outputs.lib This prevents the flake check warning about unknown outputs, using lib is a community convention for misc outputs. --- flake.nix | 2 +- poetryOverrides.nix => lib/poetryOverrides.nix | 0 pkgs/python_ot/default.nix | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename poetryOverrides.nix => lib/poetryOverrides.nix (100%) diff --git a/flake.nix b/flake.nix index 166c02b..06f2c9d 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,7 @@ ... } @ inputs: let no_system_outputs = { - poetryOverrides = import ./poetryOverrides.nix; + lib.poetryOverrides = import ./lib/poetryOverrides.nix; }; all_system_outputs = flake-utils.lib.eachDefaultSystem (system: let diff --git a/poetryOverrides.nix b/lib/poetryOverrides.nix similarity index 100% rename from poetryOverrides.nix rename to lib/poetryOverrides.nix diff --git a/pkgs/python_ot/default.nix b/pkgs/python_ot/default.nix index b980327..6f01c29 100644 --- a/pkgs/python_ot/default.nix +++ b/pkgs/python_ot/default.nix @@ -8,7 +8,7 @@ ... }: let poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}; - poetryOverrides = inputs.self.poetryOverrides {inherit pkgs;}; + poetryOverrides = inputs.self.lib.poetryOverrides {inherit pkgs;}; in poetry2nix.mkPoetryEnv { projectDir = ./.; From a026ea0af3a95398ec2b228d1711494d8667a196 Mon Sep 17 00:00:00 2001 From: Harry Callahan Date: Thu, 4 Jan 2024 11:59:39 +0000 Subject: [PATCH 2/2] Add comments about broken libcst to poetryOverrides --- lib/poetryOverrides.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/poetryOverrides.nix b/lib/poetryOverrides.nix index b916f89..1a44d96 100644 --- a/lib/poetryOverrides.nix +++ b/lib/poetryOverrides.nix @@ -43,9 +43,18 @@ preferWheel = true; }; libcst = prev.libcst.override { - # Missing rustc/cargo etc. - # buildInputs = (old.buildInputs or []) ++ [ final.setuptools-rust ]; preferWheel = true; + # }).overridePythonAttrs ( old: { + # # This fix is incomplete, and appears to be due to the issue here: + # # https://github.com/nix-community/poetry2nix/issues/413 + # # https://github.com/nix-community/poetry2nix/issues/442 + # buildInputs = (old.buildInputs or []) ++ [ + # pkgs.rustc + # pkgs.cargo + # # pkgs.rustPlatform.cargoSetupHook + # final.setuptools-rust + # ]; + # }); }; isort = prev.isort.override { # Some problem building due to a malformed semantic version string.