| 25 Feb 2025 |
gigahawk | * is there a way to make a non-fixed-output derivation with buildGoModule?
I have a package with dependencies that need to be patched to point to nix store
but this still results in illegal path references in fixed-output derivation | 08:26:40 |
gigahawk | * is there a way to make a non-fixed-output derivation with buildGoModule? I have a package with dependencies that need to be patched to point to nix store
packages = rec {
env86 = pkgs.buildGoModule {
name = "env86";
# TODO: Real version
version = "1";
src = ./.;
buildInputs = with pkgs; [
gtk3
];
# HACK: this package uses purego to link libraries at runtime,
# which will fail since we have no global libs, patch the library
# paths to point to nix store
modPostBuild = ''
sed -i 's|"libgtk-3.so"|"${pkgs.gtk3}/lib/libgtk-3.so"|' vendor/tractor.dev/toolkit-go/desktop/linux/linux.go
'';
vendorHash = pkgs.lib.fakeHash;
outputHashMode = null;
outputHashAlgo = null;
outputHash = null;
# HACK: guest86 needs to be built externally
preBuild = ''
rm -r cmd/guest86
'';
};
default = env86;
};
but this still results in illegal path references in fixed-output derivation
| 08:26:54 |
| @odysee:catgirl.cloud removed their profile picture. | 12:01:57 |
| @odysee:catgirl.cloud removed their display name odysee. | 12:02:04 |
| @odysee:catgirl.cloud left the room. | 12:02:14 |
kdn | Why would go install hang when trying to rebuild netbird from nixpkgs? nom-build -A netbird https://github.com/r-ryantm/nixpkgs/archive/267f63cb9b4faf3ef8fd5be997f1864c29795b2b.tar.gz I've made my own local version to add set -x and it just hangs on the go install step doing nothing | 12:24:20 |
kdn | ohhh... it just took forever, I'm on 22nd minute and it's building management now | 12:33:34 |
kdn | still running it outside nix build finishes in seconds | 12:43:02 |
| 26 Feb 2025 |
diamond (it/its) | a hack would be to make a derivation that copies all of the vendor derivation's files out and then do the transformation | 06:54:10 |
diamond (it/its) | though I'm like 90% sure Nix has a hook to patch library paths inside programs that specifically do dynimports but I could be wrong? | 06:54:43 |
diamond (it/its) | iirc `autoPatchelfHook` does what you want I think??? | 06:54:50 |
| lanestolen joined the room. | 12:44:49 |
| 1 Mar 2025 |
| @achnazoor:matrix.org left the room. | 12:44:17 |
K900 | Can someone tell me if I did anything wrong on the Go side of https://github.com/NixOS/nixpkgs/pull/386064 | 12:51:52 |
| 3 Mar 2025 |
@qbit:tapenet.org | lgtm | 14:25:19 |