mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +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 {
|
||||
pname = "alejandra";
|
||||
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;
|
||||
|
||||
passthru.tests = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue