From bc0010b84cd225fecbc31f71f0d42d42d762f605 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Tue, 24 Nov 2020 10:29:32 +0100 Subject: [PATCH] fix: Nix: Lean module ccache Now I remember again why I did that the way I did it --- nix/buildLeanPackage.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/buildLeanPackage.nix b/nix/buildLeanPackage.nix index 0cf306e19f..396ddd7964 100644 --- a/nix/buildLeanPackage.nix +++ b/nix/buildLeanPackage.nix @@ -83,7 +83,9 @@ in oPath = drv.relpath + ".o"; buildCommand = '' mkdir -p $out/$(dirname ${drv.relpath}) - leanc -c -o $out/$oPath ${drv.c}/${drv.cPath} ${if debug then "-g" else "-O3 -DNDEBUG"} + # make local "copy" so `drv`'s Nix store path doesn't end up in ccache's hash + ln -s ${drv.c}/${drv.cPath} src.c + leanc -c -o $out/$oPath src.c ${if debug then "-g" else "-O3 -DNDEBUG"} ''; }; singleton = name: value: listToAttrs [ { inherit name value; } ];