| 22 Apr 2024 |
symphorien | je suppose qu'il faut que tu utilises unstable dans ce fichier aussi | 19:27:19 |
ManUtopiK | Ok, merci ! Pour connaitre ma version de nixpkgs, c'est nix-channel --list ? Ça me retourne :
nixpkgs https://nixos.org/channels/nixpkgs-unstable Comment je peux utiliser unstable dans default.nix ? En fait, idéalement, il me faudrait la version 1.75 de rustc pour builder. | 19:29:49 |
symphorien | nix-info te dira | 19:30:10 |
symphorien | aussi pense bien que root et ton utilisateur peuvent avoir des channels différents | 19:30:59 |
ManUtopiK | nix-info retourne :
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.18.1, channels(manu): "nixpkgs", channels(root): "nixos-23.11, nixos-hardware, nixos-unstable, nixpkgs, unstable", nixpkgs: /home/manu/.nix-defexpr/channels/nixpkgs | 19:31:29 |
symphorien | je te déconseille d'avoir le même nom de channel pour ton utilisateur et root, ça.prête à confusion | 19:32:44 |
symphorien | mais sinon remplace <nixpkgs> par <nixos-unstable> et ça devrait marcher | 19:34:34 |
ManUtopiK | Ah ok, tout simplement ! Ça build :) | 19:36:39 |
ManUtopiK | Bon, le build plante, mais ça vient du code que je compile. J'ai pas finit de galérer...
Merci en tout cas ! | 19:39:30 |
ManUtopiK | In reply to @symphorien:xlumurb.eu je te déconseille d'avoir le même nom de channel pour ton utilisateur et root, ça.prête à confusion Comment je peux changer ça ? | 19:40:27 |
symphorien | avec nix-channel --delete | 19:41:10 |
symphorien | et à la fin --update | 19:41:21 |
ManUtopiK | Il y a pas --delete, j'ai fait nix-channel --remove nixpkgs.
nix-channel --list ne retourne plus rien. Mais nix-info retourne exactement la même chose. C'est mieux comme ça ? | 19:50:10 |
symphorien | sans --update ça n'a pas d'effet | 20:02:11 |
ManUtopiK | Oui, j'ai fait nix-channel --update aussi. En fait, je ne vois pas bien le problème. Avec nix-info, tu veux que channels(manu): "nixpkgs" soit différent car nixpkgs est aussi dans channels(root) ? | 20:08:10 |
ManUtopiK | Tu sais comment obtenir le hash d'un packet rust ? Dans default.nix, il y a "simple-mermaid-0.1.0" = "sha256-IekTldxYq+uoXwGvbpkVTXv2xrcZ0TQfyyE2i2zH+6w=" qui faut que je passe en version 0.1.1. J'ai télécharger l'archive tar.gz et je fait nix-hash --type sha256 --base32 simple-mermaid-0.1.1.tar.gz, mais il me sort pas un hash qui ressemble à ce qu'il faut... | 20:11:13 |
ManUtopiK | Avec nix-prefetch-url ou nix-prefetch-url --unpack c'est pas mieux | 20:14:08 |
Minijackson | en général, ce qu'on fait, c'est qu'on met une string vide "", et Nix nous dit à quel hash il s'attendait | 20:18:23 |
ManUtopiK | Ah oui, ça serait plus simple ! Mais ça plante. Avec une string vide il retourne cette erreur :
❯ nix-build default.nix
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'gcli-0.2.9'
whose name attribute is located at /nix/store/3r643hm4q1l4dj1yw0hlaya8gkbbn235-nixos-unstable/nixos-unstable/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'cargoDeps' of derivation 'gcli-0.2.9'
at /nix/store/3r643hm4q1l4dj1yw0hlaya8gkbbn235-nixos-unstable/nixos-unstable/pkgs/build-support/rust/build-rust-package/default.nix:101:10:
100| } // {
101| inherit buildAndTestSubdir cargoDeps;
| ^
102|
(stack trace truncated; use '--show-trace' to show the full trace)
error: A hash was specified for simple-mermaid-0.1.1, but there is no corresponding git dependency.
| 20:23:58 |
ManUtopiK | Ah c'est bon. J'ai réussi ! | 20:26:02 |
ManUtopiK | Merci ! | 20:26:18 |
ManUtopiK | Ah non en fait 🤪 Ça marche pour "simple-mermaid-0.1.0" = ""; mais pas pour "simple-mermaid-0.1.1" = ""; | 20:27:51 |
Minijackson |
there is no corresponding git dependency
| 20:32:11 |
Minijackson | est-ce que tu dépends vraiment d'un simple-mermaid-0.1.1 venant d'un dépôt git dans ton Cargo.lock ? | 20:32:35 |