Hi,
I’m trying to get gomod2nix’ buildGoApplication
to use clang instead of gcc, through the switching of its stdenv
to llvmPackages.stdenv
. Here’s my attempt:
where the expression
packages.default = (pkgs.buildGoApplication.override { stdenv = pkgs.llvmPackages_14.stdenv; })
results in
% nix build
error:
… while evaluating the attribute 'buildGoApplication.override'
at /nix/store/y6p51jza33989fck64faj0wyk2b1cp15-source/overlay.nix:8:38:
7| {
8| inherit (callPackage ./builder { }) buildGoApplication mkGoEnv;
| ^
9| gomod2nix = callPackage ./default.nix { };
… while selecting an attribute
at /nix/store/gg4swr5bg6md0rygxf8q7kbr0w053mh6-source/flake.nix:20:29:
19| in {
20| packages.default = (pkgs.buildGoApplication.override { stdenv = pkgs.llvmPackages_14.stdenv; }) {
| ^
21| name = "test";
error: value is a function while a set was expected
Note that according to pistol/flake.nix at d4a4290269357d3f98b03a4e8f730a2063ce22bb · doronbehar/pistol · GitHub, gomod2nix could at some point be overridden like this.
What am I holding wrong?
Elias