mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-09 20:19:08 +00:00
bca2a1231e
Closes #68
21 lines
384 B
Nix
21 lines
384 B
Nix
{ runCommand, mkGoEnv, which }:
|
|
|
|
let
|
|
env = mkGoEnv {
|
|
pwd = ./.;
|
|
};
|
|
in
|
|
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
|
|
''
|