gomod2nix/tests/cli-args/default.nix
adisbladis 1ffea526a0 Add package generation for non development packages
This makes it possible to generate packages that you do not have a
local checkout for, e.g. running:
`gomod2nix generate --outdir example/ golang.org/x/tools/cmd/stringer`

This will be useful for packaging dependencies that you are not
developing, but just simply packaging.
2022-06-14 05:15:43 +08:00

17 lines
321 B
Nix

{ runCommand, buildGoApplication }:
let
drv = buildGoApplication {
pname = "stringer";
pwd = ./.;
};
in
assert drv.version == "0.1.11";
runCommand "cli-args-stringer-assert" { } ''
if ! test -f ${drv}/bin/stringer; then
echo "stringer command not found in env!"
exit 1
fi
ln -s ${drv} $out
''