forked from mirrors/gomod2nix
commit
60a67aaa2d
2 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
|||
, jq
|
||||
, cacert
|
||||
, pkgs
|
||||
, pkgsBuildBuild
|
||||
}:
|
||||
let
|
||||
|
||||
|
@ -18,9 +19,10 @@ let
|
|||
# Internal only build-time attributes
|
||||
internal =
|
||||
let
|
||||
mkInternalPkg = name: src: pkgs.runCommand "gomod2nix-${name}"
|
||||
mkInternalPkg = name: src: pkgsBuildBuild.runCommand "gomod2nix-${name}"
|
||||
{
|
||||
nativeBuildInputs = [ pkgs.go ];
|
||||
inherit (pkgsBuildBuild.go) GOOS GOARCH;
|
||||
nativeBuildInputs = [ pkgsBuildBuild.go ];
|
||||
} ''
|
||||
export HOME=$(mktemp -d)
|
||||
cp ${src} src.go
|
||||
|
|
|
@ -20,7 +20,7 @@ buildGoApplication {
|
|||
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.targetPlatform) ''
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform == stdenv.targetPlatform) ''
|
||||
$out/bin/gomod2nix completion bash > gomod2nix.bash
|
||||
$out/bin/gomod2nix completion fish > gomod2nix.fish
|
||||
$out/bin/gomod2nix completion zsh > _gomod2nix
|
||||
|
|
Loading…
Reference in a new issue