mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-12 22:17:41 +00:00
nix: removal of ifd
This commit is contained in:
parent
b4762f3050
commit
864b5cb93e
1 changed files with 2 additions and 23 deletions
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
lib,
|
||||
craneLib,
|
||||
runCommandNoCCLocal,
|
||||
}: let
|
||||
inherit (craneLib) buildDepsOnly buildPackage mkDummySrc;
|
||||
inherit (craneLib) buildDepsOnly buildPackage;
|
||||
|
||||
pname = "stash";
|
||||
version = (builtins.fromTOML (builtins.readFile ../Cargo.toml)).package.version;
|
||||
|
|
@ -20,30 +19,10 @@
|
|||
];
|
||||
};
|
||||
|
||||
# basically avoid crane rebuilding everything
|
||||
# when the package version changes
|
||||
replacedSrc = let
|
||||
rgxIn = ''
|
||||
name = "${pname}"
|
||||
version = "${version}"
|
||||
'';
|
||||
rgxOut = ''
|
||||
name = "${pname}"
|
||||
version = "0.9.6"
|
||||
'';
|
||||
in
|
||||
runCommandNoCCLocal "bakaSrc" {} ''
|
||||
cp -r ${src} $out
|
||||
substituteInPlace $out/Cargo.toml \
|
||||
--replace-fail '${rgxIn}' '${rgxOut}'
|
||||
substituteInPlace $out/Cargo.lock \
|
||||
--replace-fail '${rgxIn}' '${rgxOut}'
|
||||
'';
|
||||
|
||||
cargoArtifacts = buildDepsOnly {
|
||||
name = "${pname}-deps";
|
||||
strictDeps = true;
|
||||
dummySrc = mkDummySrc {src = replacedSrc;};
|
||||
inherit src;
|
||||
};
|
||||
in
|
||||
buildPackage {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue