3 Sep 2024 |
rpop0 | Like in my specific case, only me and 2 other team members are doing our development in a linux environment, while the rest of our team are on windows. Out of the 3 of us on linux, I'm the only one interested in nix and configuring my environment that way, so I'd rather not bother other people with my configurations and things | 23:00:09 |
adisbladis | The reason why I'm suggesting nix-shell here is because it doesn't have strange special behaviour re git | 23:00:27 |
rpop0 | Alright, I'll look into that | 23:01:17 |
rpop0 | Thanks | 23:01:55 |
| @djacu:matrix.org left the room. | 23:29:35 |
4 Sep 2024 |
l0b0 | In reply to @vengmark2:matrix.org
Yep, it's definitely something to do with the wrong Python version - I see mention of Python 3.12 in pre-commit output, and both mypy and pylint complain about missing libraries which are installed in the poetry2nix package set. Also:
❯ type -a python
python is /nix/store/d6cy7nfpwjppghqg3mav9537ypl6ww82-python3-3.11.9-env/bin/python
python is /nix/store/pgb120fb7srbh418v4i2a70aq1w9dawd-python3-3.12.5/bin/python
Any idea why this could be? I don't have Python installed at the OS level:
❯ python --version
The program 'python' is currently not installed. It is provided by
several packages. You can install it by typing one of the following:
It's even easier to see the issue in this PR.
| 22:44:08 |
l0b0 | In reply to @vengmark2:matrix.org
Yep, it's definitely something to do with the wrong Python version - I see mention of Python 3.12 in pre-commit output, and both mypy and pylint complain about missing libraries which are installed in the poetry2nix package set. Also:
❯ type -a python
python is /nix/store/d6cy7nfpwjppghqg3mav9537ypl6ww82-python3-3.11.9-env/bin/python
python is /nix/store/pgb120fb7srbh418v4i2a70aq1w9dawd-python3-3.12.5/bin/python
* Any idea why this could be? I don't have Python installed at the OS level:
❯ python --version
The program 'python' is currently not installed. It is provided by
several packages. You can install it by typing one of the following:
It's even easier to see the issue in this PR, which only bumps nixpkgs and sets the global repo Python to pkgs.python311 .
| 22:44:49 |
5 Sep 2024 |
l0b0 | Or even easier than that, check out master and apply this diff:
diff --git a/python.nix b/python.nix
index 2c252db..64d5494 100644
--- a/python.nix
+++ b/python.nix
@@ -1,2 +1,2 @@
{pkgs}:
-pkgs.python3
+pkgs.python310
With the old version of nixpkgs it builds, you get both Python 3.10 and 3.11 in the resulting shell.
| 03:48:18 |
l0b0 | On a related note, How to figure out which part of a derivation is pulling in a specific store path? | 20:15:13 |
l0b0 | Hmh, after a bit of manual shenanigans it looks like all of black , check-jsonschema , gitlint , and nbqa pull in the Python executable. Dang. But also, nothing to do with poetry2nix. | 20:31:13 |
l0b0 | * Hmh, after a bit of manual shenanigans it looks like all of black , check-jsonschema , gitlint , and nbqa pull in the Python executable. Dang. But also, nothing to do with poetry2nix. But now I need to wire a bunch of packages to the same Python I use in the poetry2nix package set, otherwise I can't run things like mypy . | 20:38:14 |
l0b0 | I've tried to instead patch the third party packages to support Python 3.12, but now I'm running into another issue with GDAL: "error: value is null while a set was expected" because nativeBuildInputs is null somehow. | 21:55:39 |
l0b0 | * I've tried to instead patch the third party packages to support Python 3.12, but now I'm running into another issue with GDAL: "error: value is null while a set was expected" because nativeBuildInputs is null somehow. Using poetry2nix 2024.9.285936. | 21:57:09 |
l0b0 | Excluding that part of the derivation, I run into yet another issue: "ModuleNotFoundError: No module named '_cffi_backend'" when building argon2-cffi-bindings. I've tried adding cffi to buildInputs , nativeBuildInputs , and propagatedBuildInputs , with no change in the error message. | 22:28:57 |
l0b0 | Turns out argon2-cffi-bindings doesn't build on Python 3.12 | 22:56:19 |
l0b0 | * Turns out argon2-cffi-bindings doesn't build on Python 3.12, which in turn breaks jedi and then numpy. | 22:59:22 |
l0b0 | OK, I give up. I've been trying to update nixpkgs for two days now, and I keep getting new and weird error messages. | 23:53:01 |
6 Sep 2024 |
| Thom Jordan joined the room. | 18:21:39 |
10 Sep 2024 |
| matthewcroughan changed their display name from matthewcroughan - going to nix.camp to matthewcroughan. | 15:53:44 |
| moved to @amadaluzia:tchncs.de changed their display name from (lambda (u) (format nil "~A lost their email!" u)) "Artur Manuel" to Artur Manuel (on break). | 17:32:36 |
| moved to @amadaluzia:tchncs.de changed their profile picture. | 17:34:58 |
| moved to @amadaluzia:tchncs.de changed their display name from Artur Manuel (on break) to (lambda (u) (format nil "~A is not using Matrix right now." u)) "Artur Manuel". | 17:36:37 |
11 Sep 2024 |
| wecmyrc joined the room. | 17:49:46 |
wecmyrc | Hi everyone, I was trying to build a program using nix build and encountered an error: "[Errno 2] No such file or directory: 'git'". I tried adding setuptools-scm to nativeBuildInputs , but it didn't help. Has anyone run into this issue before? | 17:55:28 |
wecmyrc | flake.nix :
{ inputs = { flake-utils.url = "github:numtide/flake-utils"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; poetry2nix = { url = "github:nix-community/poetry2nix"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = inputs@{ self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem ( system: let pkgs = nixpkgs.legacyPackages.${system}; poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }; in { packages = { buzzer = poetry2nix.mkPoetryApplication { packageName = "buzzer"; projectDir = ./.;
overrides = poetry2nix.overrides.withDefaults (
self: super: {
twitch-chat-irc = super.twitch-chat-irc.overridePythonAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
});
rhvoice-wrapper = super.rhvoice-wrapper.overridePythonAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
self.setuptools-scm
];
# buildInputs = (old.buildInputs or [ ]) ++ [
# super.setuptools-scm
# ];
});
rhvoice-wrapper-bin = super.rhvoice-wrapper-bin.overridePythonAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
self.setuptools-scm
];
# buildInputs = (old.buildInputs or [ ]) ++ [
# super.setuptools-scm
# ];
});
rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
self.setuptools-scm
];
# buildInputs = (old.buildInputs or [ ]) ++ [
# super.setuptools-scm
# ];
});
}
);
packages = with pkgs; [
rhvoice
vlc
];
};
default = self.packages.${system}.buzzer;
};
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.buzzer ];
packages = with pkgs; [
python312Packages.lxml
scons
poetry
rhvoice
vlc
];
};
}
);
}
| 18:15:53 |
wecmyrc | * flake.nix :
| 18:16:43 |
wecmyrc | * flake.nix :
| 18:16:50 |
wecmyrc | * flake.nix :
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
in
{
packages = {
buzzer = poetry2nix.mkPoetryApplication {
packageName = "buzzer";
projectDir = ./.;
overrides = poetry2nix.overrides.withDefaults (
self: super: {
twitch-chat-irc = super.twitch-chat-irc.overridePythonAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
});
rhvoice-wrapper = super.rhvoice-wrapper.overridePythonAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
self.setuptools-scm
];
# buildInputs = (old.buildInputs or [ ]) ++ [
# super.setuptools-scm
# ];
});
rhvoice-wrapper-bin = super.rhvoice-wrapper-bin.overridePythonAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
self.setuptools-scm
];
# buildInputs = (old.buildInputs or [ ]) ++ [
# super.setuptools-scm
# ];
});
rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
self.setuptools-scm
];
# buildInputs = (old.buildInputs or [ ]) ++ [
# super.setuptools-scm
# ];
});
}
);
packages = with pkgs; [
rhvoice
vlc
];
};
default = self.packages.${system}.buzzer;
};
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.buzzer ];
packages = with pkgs; [
python312Packages.lxml
scons
poetry
rhvoice
vlc
];
};
}
);
}
| 18:16:58 |
wecmyrc | pyproject.toml :
[tool.poetry]
name = "buzzer"
version = "1.0.0"
description = ""
authors = ["wecmyrc <wecmyrc@gmail.com>"]
# readme = "README.md"
license = "MIT"
packages = [
{ include = "buzzer" },
{ include = "logger" },
{ include = "db/*.py" },
]
[tool.poetry.dependencies]
python = ">=3.12,<4.0"
twitch-chat-irc = "0.0.4"
rhvoice-wrapper = "0.8.0"
# scons = "4.8.1"
lxml = "5.3.0"
rhvoice-wrapper-bin = "0.5.0"
setuptools-scm = "^8.1.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
buzzer = "buzzer.buzzer:main"
| 18:17:24 |
wecmyrc | error:
| 18:19:29 |