| 26 Apr 2024 |
matthewcroughan | When poetry2nix sees apsw uses the sources from pypi, which are wrong because they contain a setup.py which breaks the build, because it doesn't do the same thing as the setup.py from GitHub. | 13:13:00 |
matthewcroughan | * When poetry2nix sees apsw uses the sources from pypi, which are wrong because they contain a setup.py which breaks the build, because it doesn't do the same thing as the setup.py from GitHub. | 13:13:09 |
matthewcroughan | In addition sqlite is not in the buildInputs of the poetry2nix generated derivation, which implies nothing is added to poetry2nix by the pre-existing nixpkgs derivation | 13:14:04 |
matthewcroughan | Here's a minimal flake.nix to reproduce it ``nix { description = "A minimal Python project with apsw dependency";
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; poetry2nix.url = "github:nix-community/poetry2nix"; };
outputs = { self, nixpkgs, flake-utils, poetry2nix }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ poetry2nix.overlays.default ]; }; in { packages.default = pkgs.poetry2nix.mkPoetryApplication { projectDir = ./.; preferWheels = false; };
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
poetry
(pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
preferWheels = false;
overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend
(self: super: {
apsw = super.apsw.overridePythonAttrs
(
old: {
src = pkgs.fetchFromGitHub {
owner = "rogerbinns";
repo = "apsw";
rev = "3.45.2.0";
hash = "sha256-tTi3/10W4OoGH6PQVhvPWc5o09on5BZrWoAvrfh4C/E=";
};
buildInputs = old.buildInputs ++ [ pkgs.sqlite ];
}
);
});
})
];
};
}
);
}
| 13:15:34 |
matthewcroughan | * Here's a minimal flake.nix to reproduce it
{
description = "A minimal Python project with apsw dependency";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix.url = "github:nix-community/poetry2nix";
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ poetry2nix.overlays.default ]; };
in
{
packages.default = pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;
preferWheels = false;
};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
poetry
(pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
preferWheels = false;
overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend
(self: super: {
apsw = super.apsw.overridePythonAttrs
(
old: {
src = pkgs.fetchFromGitHub {
owner = "rogerbinns";
repo = "apsw";
rev = "3.45.2.0";
hash = "sha256-tTi3/10W4OoGH6PQVhvPWc5o09on5BZrWoAvrfh4C/E=";
};
buildInputs = old.buildInputs ++ [ pkgs.sqlite ];
}
);
});
})
];
};
}
);
}
| 13:15:56 |
matthewcroughan | and a pyproject.toml
[tool.poetry]
name = "my-project"
version = "0.1.0"
description = "A minimal Python project with apsw dependency"
authors = ["Your Name <your@email.com>"]
[tool.poetry.dependencies]
python = "^3.8"
apsw = "*"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
~
| 13:16:11 |
matthewcroughan | * and a pyproject.toml
[tool.poetry]
name = "my-project"
version = "0.1.0"
description = "A minimal Python project with apsw dependency"
authors = ["Your Name <your@email.com>"]
[tool.poetry.dependencies]
python = "^3.8"
apsw = "*"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
~
| 13:16:16 |
matthewcroughan | https://github.com/nix-community/poetry2nix/pull/1614 anyway | 14:00:42 |
matthewcroughan | maybe it's not the right way to fix it | 14:00:45 |
| @christian:kampka.net left the room. | 18:32:59 |
| 29 Apr 2024 |
gaivs | Have anyone here had success getting imgui to work with nix?
| 06:55:09 |
| @noonvandersilk:matrix.org left the room. | 08:22:13 |
| papayapeanut joined the room. | 12:26:53 |
| matthewcroughan changed their profile picture. | 13:02:53 |
| NixOS Moderation Botchanged room power levels. | 15:29:44 |