| 30 Aug 2023 |
@theclearpill:matrix.org | It's go v1.20.7 in both cases. | 09:13:57 |
@theclearpill:matrix.org | Mhh, I guess I'll just try another version. | 09:15:28 |
j-k | I just built what you built and got
error: hash mismatch in fixed-output derivation '/nix/store/qkk0kml8q992k99ivj83bdf7fri7j8d7-discord-0.6.1-go-modules.drv':
specified: sha256-GKUy/HYuPyaUNzfAD7NQWH+tuwcoQhWU4bfxhOpIM0Y=
got: sha256-8SfxzooeX9jPdi2FZ4iiGiF8e3DLtZhjOvFnNsvPAjU=
I don't think you invalidated your vendorsha256 when you changed something so it's using an old copy of the modules that's out of sync
| 09:17:34 |
@theclearpill:matrix.org | Thats weird. I removed the vendorSha and got the same one back...
```
error: hash mismatch in fixed-output derivation '/nix/store/f41z9cabgm4qqk6g78vx2ig1s662f36n-discord-0.6.1-go-modules.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-GKUy/HYuPyaUNzfAD7NQWH+tuwcoQhWU4bfxhOpIM0Y=
``` | 09:20:00 |
@theclearpill:matrix.org | * Thats weird. I removed the vendorSha and got the same one back...
`
error: hash mismatch in fixed-output derivation '/nix/store/f41z9cabgm4qqk6g78vx2ig1s662f36n-discord-0.6.1-go-modules.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-GKUy/HYuPyaUNzfAD7NQWH+tuwcoQhWU4bfxhOpIM0Y=
` | 09:20:09 |
@theclearpill:matrix.org | * Thats weird. I removed the vendorSha and got the same one back...
```
error: hash mismatch in fixed-output derivation '/nix/store/f41z9cabgm4qqk6g78vx2ig1s662f36n-discord-0.6.1-go-modules.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-GKUy/HYuPyaUNzfAD7NQWH+tuwcoQhWU4bfxhOpIM0Y=
``` | 09:20:17 |
j-k | you're on nixos or using nix on a different distro? | 09:20:54 |
@theclearpill:matrix.org | I'm on NixOS unstable.
My nix-info: system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix Super) 2.18.0pre20230813_65e8aba, channels(root): "nixos-21.11pre324423.34ad3ffe08a, nixpkgs-21.11pre325327.30f73c6493b", channels(moritz): "", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos | 09:21:39 |
j-k | 21.11 👀 | 09:22:21 |
@theclearpill:matrix.org | Oh wait 😧 | 09:22:52 |
j-k | FYI this builds for me using latest nixpkgs repo and
$ nix --version
nix (Nix) 2.15.1
{ lib
, buildGoModule
, fetchFromGitHub
, olm
}:
buildGoModule rec {
pname = "discord";
version = "0.6.1";
src = fetchFromGitHub {
owner = "mautrix";
repo = "discord";
rev = "v${version}";
hash = "sha256-rs7wWlQMc79Vls+cqPPo+lRzYAGye4WcKKz+9EXlEBo=";
};
vendorSha256 = "sha256-ZI1+Tfru2OfnqLnaaiDL08OtSmbMBiRDvkL39+jhhmI=";
ldflags = [ "-s" "-w" ];
buildInputs = [ olm ];
doCheck = false;
meta = with lib; {
description = "A Matrix-Discord puppeting bridge";
homepage = "https://github.com/mautrix/discord";
changelog = "https://github.com/mautrix/discord/blob/${src.rev}/CHANGELOG.md";
license = licenses.agpl3Only;
maintainers = with maintainers; [ ];
};
}
| 09:24:43 |
@theclearpill:matrix.org | Mhh it seems I still had the channels set from before I switched to flakes...
Okay, thanks. I guess then there is just something wrong on my end.
Sorry for wasting your time... | 09:25:49 |
j-k | np. maybe try run this quickly nix run github:nixos/nixpkgs/nixpkgs-unstable#nix-info -- -m | 09:28:33 |
@theclearpill:matrix.org | - system:
"x86_64-linux"
- host os:
Linux 6.4.11, NixOS, 23.11 (Tapir), 23.11.20230823.9201b5f - multi-user?:
no - sandbox:
yes - version:
nix-env (Nix Super) 2.18.0pre20230813_65e8aba - channels(root):
"" - channels(moritz):
"" - nixpkgs:
not found
| 09:29:15 |
@theclearpill:matrix.org | * - system:
"x86_64-linux" - host os:
Linux 6.4.11, NixOS, 23.11 (Tapir), 23.11.20230823.9201b5f - multi-user?:
no - sandbox:
yes - version:
nix-env (Nix Super) 2.18.0pre20230813_65e8aba - channels(root):
"" - channels(moritz):
"" - nixpkgs:
not found | 09:29:41 |
@theclearpill:matrix.org | I guess I really just need to setup my channels to follow the flake input. | 09:30:13 |
j-k | hmm ok so I thought it might be sandboxing disabled but it's on. I'm not sure how you managed to turn off multi-user on nixos ... 👀 nix 2.18 probably didn't break anything.
is this file in a clone of nixpkgs? how are you running nix-build?
| 09:31:08 |
@theclearpill:matrix.org | I'm running:
nix-build -E '(import <nixpkgs> {}).callPackage ./default.nix {}' | 09:32:05 |
j-k | yeah so that's pulling nixpkgs from your channels which will be super old | 09:32:31 |
j-k | <nixpkgs> is channels syntax | 09:32:51 |
@theclearpill:matrix.org | Ahhh, that makes perfect sense then... | 09:33:24 |
@theclearpill:matrix.org | Thanks for your help. Now with the nixpkgs it builds flawlessly :) | 09:48:25 |
j-k | glad to hear | 11:23:13 |
| 5 Sep 2023 |
| zoopli joined the room. | 17:28:41 |
| 9 Sep 2023 |
| Moritz Sanft joined the room. | 12:15:00 |
| 10 Sep 2023 |
| farcaller joined the room. | 12:35:56 |
farcaller |  Download image.png | 12:39:52 |
farcaller | wrote a tiny idiomatic API wrapper around C bindings to nix:
```
$ go run examples/build_hello/main.go
drv /nix/store/nms6chyaxb6pxzb021jx351nn32j3lx7-hello-2.12.1.drv vaild? true
out -> /nix/store/6wmplzfs0nz866p320xnknpr05q79m62-hello-2.12.1
``` | 12:39:52 |
farcaller | * wrote a tiny idiomatic API wrapper around C bindings to nix: \$ go run examples/build\_hello/main.go
drv /nix/store/nms6chyaxb6pxzb021jx351nn32j3lx7-hello-2.12.1.drv vaild? true
out -> /nix/store/6wmplzfs0nz866p320xnknpr05q79m62-hello-2.12.1 | 12:40:07 |
farcaller | * wrote a tiny idiomatic API wrapper around C bindings to nix: $ go run examples/build_hello/main.go
drv /nix/store/nms6chyaxb6pxzb021jx351nn32j3lx7-hello-2.12.1.drv vaild? true
out -> /nix/store/6wmplzfs0nz866p320xnknpr05q79m62-hello-2.12.1 | 12:40:29 |