static executable in nix

This commit is contained in:
Cadey Ratio 2020-02-10 12:09:52 +00:00
parent 195eccdc44
commit dda1916f8c
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
allowGoReference = false; allowGoReference = false;
CGO_ENABLED = "0"; preBuild = ''
export CGO_ENABLED=0
buildFlagsArray+=(-pkgdir "$TMPDIR")
'';
postInstall = '' postInstall = ''
cp -rf $src/blog $bin/blog cp -rf $src/blog $bin/blog