!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

315 Members
https://github.com/nix-community/poetry2nix60 Servers

Load older messages


SenderMessageTime
7 Dec 2023
@adis:blad.isadisbladis You can work around it with nix develop --impure 21:48:50
8 Dec 2023
@gaivs:matrix.orggaivsI'm trying to include the `simplejpeg` package. First I get the ModuleNotFoundError for setuptools, so I add that to the override. Then I get a metadata-generation-failed error. Investigating the log, I find that I have a ModuleNotFoundError for cmake, so I add that also to the override for simplejpeg. However now I get a cmake command not found error... Have anyone met this kind of error before, and have an idea of how to solve it? 11:31:21
@k900:0upti.meK900 Add cmake to nativeBuildInputs 11:32:31
@gaivs:matrix.orggaivs
In reply to @k900:0upti.me
Add cmake to nativeBuildInputs

Thanks! Now I first get a cmake warning:
Ignoring extra path from command line:
".."

Then a cmake error:
The source directory "/build" does not appear to contain CMakeLists.txt

11:46:27
@k900:0upti.meK900That sounds like a packaging issue maybe11:46:44
@k900:0upti.meK900I don't think we wrap cmake?11:46:54
@gaivs:matrix.orggaivsYeah I suppose, simplejpeg seems pretty obscure... It does compile if I use preferWheels. obviously that is not optimal, but if it works 🤷‍♂️11:50:19
@gaivs:matrix.orggaivs
In reply to @gaivs:matrix.org
Yeah I suppose, simplejpeg seems pretty obscure... It does compile if I use preferWheels. obviously that is not optimal, but if it works 🤷‍♂️
With preferWheels and without the override for simplejpeg ofc
11:50:47
@lriesebos:matrix.org@lriesebos:matrix.org joined the room.13:09:38
@lriesebos:matrix.org@lriesebos:matrix.org left the room.14:38:07
9 Dec 2023
@softinio:matrix.org@softinio:matrix.org changed their profile picture.05:18:30
10 Dec 2023
@matthewcroughan:defenestrate.itmatthewcroughanWhen a hash is not in the list, how do you override it?21:32:25
@matthewcroughan:defenestrate.itmatthewcroughanhttps://github.com/nix-community/poetry2nix/blob/7249b835c5e08e2ecba2b50cba78f4c7c96eed86/overrides/default.nix#L293221:32:27
@matthewcroughan:defenestrate.itmatthewcroughan

I've done something like

                ruff = super.ruff.overridePythonAttrs
                  (
                    old: {
                      src = pkgs.fetchFromGitHub {
                        owner = "astral-sh";
                        repo = "ruff";
                        rev = "v${old.version}";
                        hash = "";
                      };
                      cargoDeps = pkgs.rustPlatform.importCargoLock {
                        lockFile = "${super.ruff.src}/Cargo.lock";
                      };
                      nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
                        pkgs.rustPlatform.cargoSetupHook
                        pkgs.rustPlatform.maturinBuildHook
                      ];
                    }
                  );

21:32:51
@matthewcroughan:defenestrate.itmatthewcroughan

But I still get the message like

warning: Git tree '/home/matthew/tmp/privategpt/privateGPT' is dirty
error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/nn17kpb3mlp3kdhi4vm1m71w0m68f1gk-source/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/nn17kpb3mlp3kdhi4vm1m71w0m68f1gk-source/pkgs/stdenv/generic/make-derivation.nix:395:7:

          394|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          395|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          396|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute '"0.1.6"' missing

       at /nix/store/hpjjmqvaclmdwj9amvl5xwkc5a18zzny-source/overrides/default.nix:2965:34:

         2964|           #      echo "\"$(echo {version} | sed 's/^v//')\" = \"$(echo $nix_prefetch | jq -r .sha256)\";"'
         2965|           getRepoHash = version: {
             |                                  ^
         2966|             "0.1.5" = "g52cIw0af/wQSuA4QhC2dCjcDGikirswBDAtwf8Drvo=";
       Did you mean one of 0.1.0, 0.1.1, 0.1.2, 0.1.3 or 0.1.4?
21:33:11
11 Dec 2023
@quleuber:matrix.org@quleuber:matrix.org
In reply to @adis:blad.is
You can work around it with nix develop --impure

Does something like this also looks like a sensible workaround?

        shellRc = ''
          root="$(git rev-parse --show-toplevel)"
          export PYTHONPATH="$root/src:$PYTHONPATH"
        '';
13:54:16
@quleuber:matrix.org@quleuber:matrix.org
In reply to @adis:blad.is
You can work around it with nix develop --impure
*

Does something like this also looks like a sensible workaround?

     let
        shellRc = ''
          root="$(git rev-parse --show-toplevel)"
          export PYTHONPATH="$root/src:$PYTHONPATH"
        '';
   in {
        devShells = {
          default = pkgs.mkShell {
            shellHook = shellRc;
            inputsFrom = non_python_dependencies ++ [ packages.cexpl-py-dev.env ];
          };
       };
  ...
13:54:54
@matthewcroughan:defenestrate.itmatthewcroughan
error: hash mismatch in fixed-output derivation '/nix/store/jxnvqm1m8wbpz4bi2jh9gc4whvxccz86-rpds-py-0.13.0-vendor.tar.gz.drv':
         specified: sha256-jdr0xN3Pd/bCoKfLLFNGXHJ+G1ORAft6/W7VS3PbdHs=
            got:    sha256-bHfxiBSN7/SbZiyYRj01phwrpyH7Fa3xVaA3ceWZYCE=
18:05:22
@matthewcroughan:defenestrate.itmatthewcroughanDoes this stuff happen because they replace certain files corresponding to a version release?18:06:05
@matthewcroughan:defenestrate.itmatthewcroughanOh no, it's because I was maintaining an override and didn't know it :D 18:06:52
@matthewcroughan:defenestrate.itmatthewcroughanI see something in a poetry.lock20:27:01
@matthewcroughan:defenestrate.itmatthewcroughan optimum = {version = ">=1.13.2,<2.0.0", extras = ["onnxruntime"], optional = true, markers = "extra == \"local-models\""} 20:27:02
@matthewcroughan:defenestrate.itmatthewcroughan what does optional = true mean, and how can I tell poetry2nix to remove it if it's optional? 20:27:17
12 Dec 2023
@cameronraysmith:matrix.org@cameronraysmith:matrix.orgRedacted or Malformed Event02:50:49
@cameronraysmith:matrix.org@cameronraysmith:matrix.org
In reply to @reivilibre:librepush.net
I think mysql-connector-python is to blame; its sdist (source distribution) doesn't have a setup.py in it. Even pip can't install it
https://bugs.mysql.com/bug.php?id=113396
04:10:45
@cameronraysmith:matrix.org@cameronraysmith:matrix.org
In reply to @reivilibre:librepush.net
I think mysql-connector-python is to blame; its sdist (source distribution) doesn't have a setup.py in it. Even pip can't install it
*

https://bugs.mysql.com/bug.php?id=113396

@rolandco:matrix.org

04:11:33
@cameronraysmith:matrix.org@cameronraysmith:matrix.org Does anyone have experience with the sort of issue described in this discussion: https://github.com/orgs/python-poetry/discussions/8781 ? I don't think it really has much to do with poetry2nix even if it's conceivable to patch it in the flake. For more direct access, I reference the flake toward the end of that discussion question. 13:52:57
@cameronraysmith:matrix.org@cameronraysmith:matrix.org * Does anyone have experience with the sort of issue described in this discussion question: https://github.com/orgs/python-poetry/discussions/8781 ? I don't think it really has much to do with poetry2nix even if it's conceivable to patch it in the flake. For more direct access, I reference the flake toward the end of that discussion question. 13:54:50
@cameronraysmith:matrix.org@cameronraysmith:matrix.org * Does anyone have experience with the sort of issue described in this discussion question: https://github.com/orgs/python-poetry/discussions/8781 ? I don't think it really has much to do with poetry2nix even if it's conceivable to patch it in the flake. For more direct access, I reference the flake toward the end of that discussion question, but the question has to do with package name normalization in poetry.lock files for packages installed from git source of a package also distributed on PyPI. 13:56:32
@cameronraysmith:matrix.org@cameronraysmith:matrix.org * Does anyone have experience with the sort of issue described in this discussion question: https://github.com/orgs/python-poetry/discussions/8781 ? I don't think it really has much to do with poetry2nix even if it's conceivable to patch it in the flake. For more direct access, I reference the flake toward the end of that discussion question, but the question has to do with consistency of package name normalization in poetry.lock files for packages installed from git source that are also distributed on PyPI. 13:57:13

Show newer messages


Back to Room ListRoom Version: 6