mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-31 04:27:45 +00:00
perf: improve cache hits on code builds
This commit is contained in:
parent
dcaff814d2
commit
c9f1194cb8
1 changed files with 13 additions and 1 deletions
14
flake.nix
14
flake.nix
|
@ -21,8 +21,20 @@
|
||||||
alejandra = self.rustPlatform.buildRustPackage {
|
alejandra = self.rustPlatform.buildRustPackage {
|
||||||
pname = "alejandra";
|
pname = "alejandra";
|
||||||
inherit version;
|
inherit version;
|
||||||
src = ./.;
|
src = self.stdenv.mkDerivation {
|
||||||
|
name = "src";
|
||||||
|
builder = builtins.toFile "builder.sh" ''
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
mkdir $out
|
||||||
|
cp -rT --no-preserve=mode,ownership $src $out/src/
|
||||||
|
cp $cargoLock $out/Cargo.lock
|
||||||
|
cp $cargoToml $out/Cargo.toml
|
||||||
|
'';
|
||||||
|
cargoLock = ./Cargo.lock;
|
||||||
|
cargoToml = ./Cargo.toml;
|
||||||
|
src = ./src;
|
||||||
|
};
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue