mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-09-17 09:29:21 +00:00
parent
b8c2216317
commit
bca2a1231e
3 changed files with 12 additions and 6 deletions
|
@ -170,7 +170,7 @@ let
|
|||
dontConfigure = true;
|
||||
dontInstall = true;
|
||||
|
||||
propagatedNativeBuildInputs = [ go ];
|
||||
propagatedBuildInputs = [ go ];
|
||||
|
||||
GO_NO_VENDOR_CHECKS = "1";
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
pkgs.mkShell {
|
||||
NIX_PATH = "nixpkgs=${builtins.toString pkgs.path}";
|
||||
buildInputs = [
|
||||
nativeBuildInputs = [
|
||||
pkgs.nixpkgs-fmt
|
||||
pkgs.gomod2nix.go
|
||||
pkgs.gomod2nix
|
||||
pkgs.golangci-lint
|
||||
pkgs.gomod2nix
|
||||
(pkgs.mkGoEnv { pwd = ./.; })
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
{ runCommand, mkGoEnv }:
|
||||
{ runCommand, mkGoEnv, which }:
|
||||
|
||||
let
|
||||
env = mkGoEnv {
|
||||
pwd = ./.;
|
||||
};
|
||||
in
|
||||
runCommand "mkgoenv-assert" { } ''
|
||||
runCommand "mkgoenv-assert"
|
||||
{
|
||||
nativeBuildInputs = [ which ];
|
||||
buildInputs = [ env ]; # Trigger propagation
|
||||
} ''
|
||||
if ! test -f ${env}/bin/stringer; then
|
||||
echo "stringer command not found in env!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
which go > /dev/null || echo "Go compiler not found in env!"
|
||||
|
||||
ln -s ${env} $out
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue