Desktop: Improve Nix build times with more caching (#4007)

This commit is contained in:
Timon
2026-04-08 01:46:38 +02:00
committed by GitHub
parent 211111a01f
commit 0eb440db14
6 changed files with 144 additions and 117 deletions
+25 -2
View File
@@ -1,5 +1,28 @@
{ pkgs, inputs, ... }:
{
pkgs,
inputs,
...
}:
{
lib = inputs.crane.mkLib pkgs;
lib = (inputs.crane.mkLib pkgs) // {
vendorCargoDepsFlatten =
src:
pkgs.stdenvNoCC.mkDerivation (finalAttrs: {
name = "graphite-cargo-vendored";
inherit src;
installPhase = ''
cp -rL --no-preserve=mode "$src" "$out"
chmod -R u+w "$out"
find "$out" -type f -print0 | xargs -r -0 sed -i "s|$src|$out|g"
'';
disallowedReferences = [ finalAttrs.src ];
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
});
};
}