From dda1916f8cacd729c9a4f55e3d04429f37700181 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Mon, 10 Feb 2020 12:09:52 +0000 Subject: [PATCH] static executable in nix --- site.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/site.nix b/site.nix index b42870a..7062d9b 100644 --- a/site.nix +++ b/site.nix @@ -12,7 +12,10 @@ buildGoPackage rec { goDeps = ./deps.nix; allowGoReference = false; - CGO_ENABLED = "0"; + preBuild = '' + export CGO_ENABLED=0 + buildFlagsArray+=(-pkgdir "$TMPDIR") + ''; postInstall = '' cp -rf $src/blog $bin/blog