forked from mirrors/gomod2nix
1ffea526a0
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.
17 lines
321 B
Nix
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
|
|
''
|