mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 17:28:12 +08:00
Desktop: Improve Nix build times with more caching (#4007)
This commit is contained in:
+25
-2
@@ -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;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user