!ZUiNnfpRqQMDrPLChM:nixos.org

Nix ♥ la francophonie

218 Members
Salon francographe de NixOS71 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
22 Apr 2024
@symphorien:xlumurb.eusymphorienje suppose qu'il faut que tu utilises unstable dans ce fichier aussi19:27:19
@ManUtopiK:matrix.orgManUtopiK 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:xlumurb.eusymphoriennix-info te dira19:30:10
@symphorien:xlumurb.eusymphorienaussi pense bien que root et ton utilisateur peuvent avoir des channels différents19:30:59
@ManUtopiK:matrix.orgManUtopiK 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:xlumurb.eusymphorienje te déconseille d'avoir le même nom de channel pour ton utilisateur et root, ça.prête à confusion19:32:44
@symphorien:xlumurb.eusymphorienmais sinon remplace <nixpkgs> par <nixos-unstable> et ça devrait marcher19:34:34
@ManUtopiK:matrix.orgManUtopiKAh ok, tout simplement ! Ça build :)19:36:39
@ManUtopiK:matrix.orgManUtopiKBon, 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:matrix.orgManUtopiK
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:xlumurb.eusymphorienavec nix-channel --delete19:41:10
@symphorien:xlumurb.eusymphorienet à la fin --update19:41:21
@ManUtopiK:matrix.orgManUtopiK 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:xlumurb.eusymphoriensans --update ça n'a pas d'effet20:02:11
@ManUtopiK:matrix.orgManUtopiK 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:matrix.orgManUtopiK 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:matrix.orgManUtopiK Avec nix-prefetch-url ou nix-prefetch-url --unpack c'est pas mieux 20:14:08
@Minijackson:matrix.orgMinijackson 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:matrix.orgManUtopiK

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:matrix.orgManUtopiKAh c'est bon. J'ai réussi !20:26:02
@ManUtopiK:matrix.orgManUtopiKMerci !20:26:18
@ManUtopiK:matrix.orgManUtopiKAh non en fait 🤪 Ça marche pour "simple-mermaid-0.1.0" = ""; mais pas pour "simple-mermaid-0.1.1" = "";20:27:51
@Minijackson:matrix.orgMinijackson

there is no corresponding git dependency

20:32:11
@Minijackson:matrix.orgMinijackson 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

Show newer messages


Back to Room ListRoom Version: 6