!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

317 Members
https://github.com/nix-community/poetry2nix61 Servers

Load older messages


SenderMessageTime
21 Nov 2023
@julius:mtx.liftm.deˈt͡sɛːzaɐ̯ Or maybe it doesn't. Tried to apply mkPoetryScriptsPackage to a real thing, which needs overrides, which isn't supported. I also can't seem to mix scripts inside and outside of the package folder. :/ 23:51:53
22 Nov 2023
@kranzes:matrix.org@kranzes:matrix.org is it just me or does mkPoetryScriptsPackage not add the dependencies to the PYTHONPATH or whatever it's called 00:53:04
@kranzes:matrix.org@kranzes:matrix.orgmkPoetryApplication works but the binary in mkPoetryScriptsPackage with "No module named 'requests'"00:53:34
@ppenguin:matrix.orgppenguin I'm in the midst of fixing the "fallout" from removal of poetry2nix from nixpkgs for my xls2latex package, but I'm getting a bit confused (partly because of multi-layered flakes/shells). So now I have this flake, aiming to achieve the "sweet spot" of being compatible with non-flake usage (fetchFromGithub) and having the necessary flake outputs to do seamless development on it (repo devShell) and inclusion in user deployments, preferrably via overlay so the user can call it as a normal pkgs.xls2latex.

Now I'm looking for advice:
  1. whether the current flake structure is "best practice" for this case (notably defining the repo's package attr xls2latex via callPackage in let .. in and directly refering to it for the different flake outputs),

  2. secondly I get a strange errorr message in a consuming flake (see next)

14:32:25
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:
`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
but I get an error:
error: function 'anonymous lambda' called without required argument 'lib'

at /nix/store/5iviv2i2c2fkb5frjc1apkrymvzhpldc-source/default.nix:1:1:
`
14:36:49
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:
`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
but I get an error:
```
       error: function 'anonymous lambda' called without required argument 'lib'
       at /nix/store/5iviv2i2c2fkb5frjc1apkrymvzhpldc-source/default.nix:1:1:
14:37:01
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:
`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
`
but I get an error:

       error: function 'anonymous lambda' called without required argument 'lib'
       at /nix/store/5iviv2i2c2fkb5frjc1apkrymvzhpldc-source/default.nix:1:1:
14:37:22
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:
`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
`

but I get an error:

error: function 'anonymous lambda' called without required argument 'lib'
       at /nix/store/5iviv2i2c2fkb5frjc1apkrymvzhpldc-source/default.nix:1:1:
14:37:32
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
`

but I get an error:

error: function 'anonymous lambda' called without required argument 'lib'
       at /nix/store/5iviv2i2c2fkb5frjc1apkrymvzhpldc-source/default.nix:1:1:
14:37:57
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
`
14:38:30
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
`
14:38:41
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}

`
14:39:04
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

flake
14:39:36
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
xls2latex = {
url = "github:ppenguin/xls2latex/fix-external-poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}

`
14:40:24
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`nix
{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";
...
outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}

`
14:41:02
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`nix

{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";
...
outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}

`
14:41:17
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

`nix

{
description = "Complete self-contained pandoc(omatic) flake with templates etc.";
...
outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:

flake-utils.lib.eachDefaultSystem (system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
in
{
devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
}
);
}
`
14:41:30
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

{
  description = "Complete self-contained pandoc(omatic) flake with templates etc.";
   ...
  outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
      in
        {
          devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
        }
    );
}
14:41:50
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

{
  description = "Complete self-contained pandoc(omatic) flake with templates etc.";
   ...
  outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
      in
        {
          devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
        }
    );
}

but I get an error:

      error: function 'anonymous lambda' called without required argument 'lib'
       at /nix/store/5iviv2i2c2fkb5frjc1apkrymvzhpldc-source/default.nix:1:1:
14:42:28
@ppenguin:matrix.orgppenguin In a consumer of the mentioned flake:

{
  description = "Complete self-contained pandoc(omatic) flake with templates etc.";
   ...
  outputs = inputs@{ self, nixpkgs, flake-utils, xls2latex }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { overlays = [ (import xls2latex {}).overlays.xls2latex ]; inherit system; };
      in
        {
          devShells.default = import ./nix/pandoc-shell.nix { inherit pkgs; };
        }
    );
}

but I get an error:

error: function 'anonymous lambda' called without required argument 'lib'
       at /nix/store/5iviv2i2c2fkb5frjc1apkrymvzhpldc-source/default.nix:1:1:

The content of the nix path in the error is the default.nix from the xls2latex repo. (And the pandoc shell simply refers to the xls2latex package from pkgs for the build inputs..
14:45:47
@ppenguin:matrix.orgppenguinRedacted or Malformed Event15:05:54
@ppenguin:matrix.orgppenguin Following this pattern I managed to solve the error, the only funky thing(?) now is that I have flake outputs like this: overlays.${system}.default, which seems a bit unusual, but I need pkgs (system dependent) for the callPackage, so chicken & egg problem? 15:12:48
23 Nov 2023
@jsimonrichard:matrix.orgSimon Richard joined the room.03:23:36
@jsimonrichard:matrix.orgSimon Richard I'm trying to use the development shell generated by the poetry2nix template, but when I run poetry add ... I get [org.freedesktop.DBus.Error.UnknownObject] ("No such object path '/org/freedesktop/secrets/aliases/default'",). Is this likely to be an issue with my host configuration, or is this a bug? (in case it's helpful, my host configuration can be found here: https://github.com/jsimonrichard/nix-config) 03:27:04
@julius:mtx.liftm.deˈt͡sɛːzaɐ̯

Simon Richard: Not entirely sure this is the same issue I had, but I have

          shellHook = ''
            export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
          '';

on my dev shell…

03:48:15
@jsimonrichard:matrix.orgSimon Richard Thanks, that worked! However, the second time I ran nix develop I got the error attribute 'format' missing. I think it's being caused by the pypoetry.toml file or the poetry.lock file since those are the only files that have changed since the first time I ran nix develop. Any thoughts? 14:56:48
25 Nov 2023
@10leej:matrix.org@10leej:matrix.org joined the room.15:56:35
28 Nov 2023
@benbot:matrix.orgBenBot joined the room.14:30:58
@benbot:matrix.orgBenBot

Hey all, is there a newer way to add overrides that isn't in the docs?

I keep getting errors that both poetry2nix.overrides and poetry2nix.defaultPoetryOverrides is missing from poetry2nix

14:31:48
@k900:0upti.meK900 Is poetry2nix your flake? 15:58:08

Show newer messages


Back to Room ListRoom Version: 6