robert1
February 1, 2022, 10:25am
1
Hi,
I have an override for the tilt derivation which is a go module and is build with the buildGoModule function:
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "tilt";
/* Do not use "dev" as a version. If you do, Tilt will consider itself
running in development environment and try to serve assets from the
source tree, which is not there once build completes. */
version = "0.23.5";
src = fetchFromGitHub {
owner = "tilt-dev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-qVybS+gRuTezX89NMWYQVWtUH6wnjB11HImejrzVHAc=";
};
vendorSha256 = null;
subPackages = [ "cmd/tilt" ];
ldflags = [ "-X main.version=${version}" ];
This file has been truncated. show original
I use my override to build the latest version of tilt.
Since the version 0.23.7 of tilt it seems to require go 1.17 for the build. How can I specify in my override that the derivation is build with go_1_17 ?
Thanks
NobbZ
February 1, 2022, 11:59am
2
override { buildGoModule = buildGo117Module; }
or something like that.
Ah I don’t have an override but the following overlay:
nixpkgs.overlays = [
(self: super: {
tilt = super.tilt.overrideAttrs (old: rec {
version = "0.23.9";
src = super.fetchFromGitHub {
owner = "tilt-dev";
repo = "tilt";
rev = "v${version}";
# sha256 = lib.fakeSha256;
sha256 =
"sha256:1j5rflc2gmndp1b7rfcdvd5111ipm3vdpf5qpl6ihn2bjwxr84xk";
};
ldflags = [ "-X main.version=${version}" ];
});
})
];
I don’t know how to set the buildGo117Module here
NobbZ
February 1, 2022, 5:37pm
4
By overriding the overriden derivation.
(foo.override {...}).overrideAttrs (oa: {...})
1 Like
Thanks, defining my overlay as the following worked:
nixpkgs.overlays = [
(self: super: {
tilt = (super.tilt.override {
buildGoModule = pkgs.buildGo117Module;
}).overrideAttrs (old: rec {
version = "0.23.9";
src = super.fetchFromGitHub {
owner = "tilt-dev";
repo = "tilt";
rev = "v${version}";
# sha256 = lib.fakeSha256;
sha256 =
"sha256:1j5rflc2gmndp1b7rfcdvd5111ipm3vdpf5qpl6ihn2bjwxr84xk";
};
ldflags = [ "-X main.version=${version}" ];
});
})
];