!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

318 Members
https://github.com/nix-community/poetry2nix63 Servers

Load older messages


SenderMessageTime
10 Jul 2024
@truh:matrix.orgtruhI saw that, I asummed it should just work if you tell it which build system to add to the buildInputs as long as the p2n is actually able to build the build system. But there is something about known build systems in poetry2nix, maybe that's required10:27:21
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)tried that, and well, I have added things to build-system-overrides that ain't in that list, and whey won't be found even if in that list, so I don't know.10:29:02
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)It's a series of overlays, all teh way down10:30:29
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)if only I wasn't fighting the CI so hard.10:34:46
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)(one turn around on github takes 3-ish hours)10:34:54
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)and, well the way it's setup, you can somewhat run it locally with act10:35:07
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)after you've commented out all the tests you don't care about10:35:18
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)and if you haven't commited10:35:20
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)also things weirdly fail with 'you have a /homeless-shelter', so somehow the env is not quite as it is in the actions10:36:05
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)(you can run the tests individually using nix, but again, it's not quite the same env)10:36:20
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)and... the aarch64 test failed once again.10:37:11
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)I think it's also some kind of aggregate test-lots-of-things thing. Why you even have a matrix of os * tests...10:37:29
@truh:matrix.orgtruh Yesterday I waited for a CI build for over an hour just to realize I had forgotten -L after nix build and gained basically no insight at all. 10:37:35
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)we've all been there.10:38:01
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus) and you can't download the logs before all tests have finished 10:38:11
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)and the github gui dosn't really work well with those megabytes of output^^10:38:24
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)so I'll wait for the next one to fail and then we'll look agai.n10:38:33
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus) * so I'll wait for the next one to fail and then we'll look again.10:38:35
@truh:matrix.orgtruhI wish there was a way to cache the stuff that didn't fail to build.10:39:54
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)"This step has been truncated due to its large size. Download the full logs from the menu once the workflow run has completed. ". Thank you github.10:45:18
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)and since it's -darwin, I can't run it locally.10:47:33
@truh:matrix.orgtruhIf Github truncates code diffs in PR, no wonder they do it for logs as well10:48:36
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)the other job that's still running is now at 3h and 49 minutes.12:10:04
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)lol, now github fails to actually download the log13:31:11
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)ok,... 'raw log' individual log... 166 MB of logs, at 600kbyte a second... rofl13:37:33
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)ok, it seems to be something scipy, xcrun?...13:45:38
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)ah, I accidentially the prePatch in this derivation13:49:02
11 Jul 2024
@pepe:runas.rockspeppino joined the room.20:54:59
@pepe:runas.rockspeppinoHello everyone! I'm going crazy with a single dependency for my flake / dev env: bcrypt20:56:14
@pepe:runas.rockspeppino

I cannot figure - in any way - how to make my environment work. This is my flake:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/release-24.05";
    powerlifted-flake.url = "github:peperunas/planner8";
    flake-utils.url = "github:numtide/flake-utils";
    poetry2nix = {
      url = "github:nix-community/poetry2nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, flake-utils, powerlifted-flake, poetry2nix }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryEnv defaultPoetryOverrides;

        pkgs = import nixpkgs {
          inherit system;
          config.allowUnfree = true;
        };

        powerlifted = powerlifted-flake.packages.${system}.powerlifted;

        shellWithPkgs = packages:
          pkgs.mkShell {
            inherit packages;
            buildInputs = [
              pkgs.bashInteractive
              (mkPoetryEnv {
                projectDir = ./.;
                preferWheels = true;
                overrides = defaultPoetryOverrides.extend (self: super: {
                  gcs-oauth2-boto-plugin = super.gcs-oauth2-boto-plugin.overridePythonAttrs (old: {
                    buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
                  });
                  gsutil = super.gsutil.overridePythonAttrs (old: {
                    buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
                  });
                  python-gflags = super.python-gflags.overridePythonAttrs (old: {
                    buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
                  });
                });
              })
            ];
          };
        shell = with pkgs; shellWithPkgs [
          powerlifted
          parallel-full
          sqlite
        ];
      in
      {
        devShell = shell;
        defaultPackage = shell;
      });
}

And this is the error I get back when the compilation gets to bcrypt:

error: builder for '/nix/store/lqfg86v33h64hi1dj3ib3i2dr1p0b7q6-python3.11-bcrypt-4.1.3.drv' failed with exit code 1;
       last 10 log lines:
       > Running phase: unpackPhase
       > Executing wheelUnpackPhase
       > Finished executing wheelUnpackPhase
       > Running phase: patchPhase
       > Executing cargoSetupPostPatchHook
       > Validating consistency between /build/src/_bcrypt/Cargo.lock and /Cargo.lock
       > /nix/store/0fw4a3z849azkhyjxnpxbygj4g5qhd0v-diffutils-3.10/bin/diff: /build/src/_bcrypt/Cargo.lock: No such file or directory
       > /nix/store/0fw4a3z849azkhyjxnpxbygj4g5qhd0v-diffutils-3.10/bin/diff: /Cargo.lock: No such file or directory
       > ERROR: Missing Cargo.lock from src. Expected to find it at: /build/src/_bcrypt/Cargo.lock
       > Hint: You can use the cargoPatches attribute to add a Cargo.lock manually to the build.
       For full logs, run 'nix log /nix/store/lqfg86v33h64hi1dj3ib3i2dr1p0b7q6-python3.11-bcrypt-4.1.3.drv'.
error: 1 dependencies of derivation '/nix/store/swgnvl8v6ia6c0xljqgmrdnvqwpk5byc-python3.11-paramiko-3.4.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dk5k1wk3ms188q5v30045ijam6lwnhs5-python3.11-pwntools-4.11.1.drv' failed to build
error: 3 dependencies of derivation '/nix/store/agw1nq1w6756lml1dmn189zb7xil9r0x-python3-3.11.9-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/72cyph2439whiqn07xkar3100217n3n8-nix-shell-env.drv' failed to build

I tried multiple approaches - either having the shell not using poetry2nix and just call poetry shell (but then I get into weird libc++ linking issues) and trying to toggle preferWheels on and off. Nothing.

Do you have any pointers on how to make bcrypt / the python environment work? Thank you!

20:58:18

Show newer messages


Back to Room ListRoom Version: 6