lychee: avoid unstable usage of fetchgit.leaveDotGit
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
rustPlatform,
|
rustPlatform,
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
git,
|
|
||||||
openssl,
|
openssl,
|
||||||
testers,
|
testers,
|
||||||
}:
|
}:
|
||||||
@@ -23,16 +22,23 @@ rustPlatform.buildRustPackage rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lycheeverse";
|
owner = "lycheeverse";
|
||||||
repo = "lychee";
|
repo = "lychee";
|
||||||
rev = "lychee-v${version}";
|
tag = "lychee-v${version}";
|
||||||
hash = "sha256-zV3EVFFYU9fR5gXPTyYudE8rgAW3eDjOF3sTJMuXzh4=";
|
leaveDotGit = true;
|
||||||
leaveDotGit = true; # used by lychee to determine latest commit date at build time
|
postFetch = ''
|
||||||
|
GIT_DATE=$(git -C $out/.git show -s --format=%cs)
|
||||||
|
substituteInPlace $out/lychee-bin/build.rs \
|
||||||
|
--replace-fail \
|
||||||
|
'("cargo:rustc-env=GIT_DATE={}", git_date())' \
|
||||||
|
'("cargo:rustc-env=GIT_DATE={}", "'$GIT_DATE'")'
|
||||||
|
rm -rf $out/.git
|
||||||
|
'';
|
||||||
|
hash = "sha256-Nt7LsnQkWQS0f2/lS8WNYkI+XbKUSHQ6bNf9FNjfk7A=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-1sqFjNil6KktpqrsXXgt3xtOz7eFQc2skkFHqmTMDg4=";
|
cargoHash = "sha256-1sqFjNil6KktpqrsXXgt3xtOz7eFQc2skkFHqmTMDg4=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
git
|
|
||||||
installShellFiles
|
installShellFiles
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user