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