4 Dec 2023 |
| @milibopp:matrix.org joined the room. | 12:45:48 |
5 Dec 2023 |
| @federicodschonborn:matrix.org changed their profile picture. | 00:37:53 |
virtu | Hi. I'm getting the following error when trying to build my application via flake:
error: hash mismatch in fixed-output derivation '/nix/store/fygngq683zgps12zy1063gbq8vsjzvzm-cryptography-41.0.7-vendor.tar.gz.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
I read about this issue, but I'm using a flake and made sure the revision for poetry2nix in flake.lock matches the HEAD commit in the master repo. Any ideas what could be wrong?
| 14:01:13 |
6 Dec 2023 |
virtu | In reply to @virtu:matrix.im
Hi. I'm getting the following error when trying to build my application via flake:
error: hash mismatch in fixed-output derivation '/nix/store/fygngq683zgps12zy1063gbq8vsjzvzm-cryptography-41.0.7-vendor.tar.gz.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
I read about this issue, but I'm using a flake and made sure the revision for poetry2nix in flake.lock matches the HEAD commit in the master repo. Any ideas what could be wrong?
nevermind. I just saw the commit from yesterday that fixed it. working now. | 07:16:43 |
| quleuber joined the room. | 17:59:51 |
7 Dec 2023 |
| cameronraysmith joined the room. | 13:10:21 |
quleuber | I'd like help to understand editablePackageSources .
I've defined on my flake.nix:
cexpl-py = (p2n.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
cexpl = ./.;
};
overrides = p2n-overrides;
}).env.overrideAttrs (oldAttrs: {
buildInputs = dependencies;
});
and I'm able to import my package:
❯ python3
Python 3.11.6 (main, Oct 2 2023, 13:45:54) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cexpl
>>> cexpl
<module 'cexpl' from '/nix/store/vj18qa9acmghnipqx98x94fqbhg1vcdq-source/cexpl/__init__.py'>
>>>
But it shows up inside the nix store, which is read-only. So, how could it be "editable"?
pip show outputs:
❯ pip show cexpl
Name: cexpl
Version: 0.1.0
Summary:
Home-page:
Author:
Author-email:
License:
Location: /nix/store/2sgs2pfsggbnrpg6hc3lm4b84al8fz32-python3-3.11.6-env/lib/python3.11/site-packages
Requires:
Required-by:
without the Editable project location: ... line.
| 21:38:52 |
quleuber | I'd expect for it to point to the local package source folder. But I also don't think it's possible to link something like that inside de Nix store. | 21:39:53 |
adisbladis | Are you using flakes? | 21:40:59 |
K900 | Flakes can't do editable installs | 21:41:03 |
K900 | Because flakes need to be copied to the store for evaluation to be hermetix | 21:41:15 |
K900 | * Because flakes need to be copied to the store for evaluation to be hermetic | 21:41:22 |
K900 | So they don't know where they've been copied from | 21:41:30 |
quleuber | In reply to @adis:blad.is Are you using flakes? Yeap. | 21:44:35 |
quleuber | In reply to @k900:0upti.me So they don't know where they've been copied from I see. Thank you. | 21:44:44 |
adisbladis | You can work around it with nix develop --impure | 21:48:50 |
8 Dec 2023 |
gaivs | I'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 | Add cmake to nativeBuildInputs | 11:32:31 |
gaivs | 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 | That sounds like a packaging issue maybe | 11:46:44 |
K900 | I don't think we wrap cmake? | 11:46:54 |
gaivs | Yeah 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 | 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 joined the room. | 13:09:38 |
| @lriesebos:matrix.org left the room. | 14:38:07 |
9 Dec 2023 |
| @softinio:matrix.org changed their profile picture. | 05:18:30 |
10 Dec 2023 |
matthewcroughan - nix.how | When a hash is not in the list, how do you override it? | 21:32:25 |
matthewcroughan - nix.how | https://github.com/nix-community/poetry2nix/blob/7249b835c5e08e2ecba2b50cba78f4c7c96eed86/overrides/default.nix#L2932 | 21:32:27 |
matthewcroughan - nix.how | 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 - nix.how | 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 |