Nix Flakes | 886 Members | |
| 179 Servers |
| Sender | Message | Time |
|---|---|---|
| 21 Oct 2023 | ||
| 17:15:37 | ||
| 17:22:07 | ||
| 22 Oct 2023 | ||
| 16:12:13 | ||
| 17:29:13 | ||
| 19:55:42 | ||
| 21:03:21 | ||
| 21:38:12 | ||
| 23 Oct 2023 | ||
| 09:49:12 | ||
| 14:27:35 | ||
| 24 Oct 2023 | ||
| 17:24:45 | ||
| 19:51:53 | ||
| 20:06:59 | ||
When exeucuting nix build github:NixOS/nixpkgs/nixos-unstable#hello I would like nix build to print the revision that it used (to have a reproducible copy-pastable output). There doesn't seem to be an option? How do I do that? | 20:08:33 | |
* When exeucuting nix build github:NixOS/nixpkgs/nixos-unstable#hello I would like nix build to print the revision that it used, i.e. the hash that "nixos-unstable" referred to at the time of invocation, (to have a reproducible copy-pastable output). There doesn't seem to be an option? How do I do that? | 20:23:57 | |
* When exeucuting nix build github:NixOS/nixpkgs/nixos-unstable#hello I would like nix build to print the revision that it used, i.e. the hash that "nixos-unstable" referred to at the time of invocation, to have a reproducible copy-pastable output. There doesn't seem to be an option? How do I do that? | 20:25:15 | |
| make an alias? | 20:26:33 | |
| nix registry may be the place to look | 20:26:57 | |
In reply to @pederbs:pvv.ntnu.noI'd like a solution that works both for flakes that are in the registry and for ones that are not. The requirement to know which revision was used isn't that crazy, is it? | 20:27:54 | |
In reply to @pederbs:pvv.ntnu.no* I'd like a solution that works both for flakes that are in the registry and for ones that are not. The question which revision was used isn't that crazy, is it? | 20:28:03 | |
In reply to @pederbs:pvv.ntnu.noYou mean a shell alias? An alias from what to what? I don't know an that gives me the output I want. I could call nix flake show right before/after I call nix build, but that's racy. | 20:30:00 | |
| You use the resolved flake url in nix build | 20:53:01 | |
| One nice property of flakes is that I can address them as It's not a question of whether there is a possibility to somehow obtain a fully resolved flake URL, and that it can be provided as an argument to | 20:58:37 | |
| * One nice property of flakes is that I can address them as It's not a question of whether there is a possibility to somehow obtain a fully resolved flake URL, and that it can be provided as an argument to | 20:58:59 | |
| * One nice property of flakes is that I can address them as It's not a question of whether there is a possibility to somehow obtain a fully resolved flake URL, and that it can be provided as an argument to | 20:59:27 | |
nix flake show does this by the way (as I have mentioned above), but there's no way for me to guarantee that the reference does not change in between invocations of nix build and nix flake show. That's why I am asking for a solution that only involves nix build. Or a convincing explanation for a better solution... | 21:03:38 | |
| huh, you're right | 21:06:42 | |
there is no utility to expand github:nixos/nixpkgs#hello to e.g. github:NixOS/nixpkgs/7e63eed145566cca98158613f3700515b4009ce3#hello | 21:07:26 | |
At least I couldn't find one... And if there would be one, I'd still prefer nix build to give me the expansion of the very thing I am building to avoid races (colleague pushing to Git in parallel, who knows...). | 21:08:24 | |
* At least I couldn't find one... And if there would be one, I'd still prefer nix build to give me the expansion of the very thing I am building to avoid races (colleague pushing to Git host in parallel, who knows...). | 21:08:45 | |
Also note that nix flake show --json does not print the resolved URL (which nix flake show does). I just filed an issue: https://github.com/NixOS/nix/issues/9230 | 21:09:44 | |