mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-09 20:19:08 +00:00
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
|
|
''
|