mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
lean: substitute release commit sha1
This commit is contained in:
parent
5cf7cfccf0
commit
cbaf78cdaa
1 changed files with 12 additions and 1 deletions
|
@ -7,7 +7,11 @@ stdenv.mkDerivation rec {
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "leanprover-community";
|
owner = "leanprover-community";
|
||||||
repo = "lean";
|
repo = "lean";
|
||||||
rev = "v${version}";
|
# lean's version string contains the commit sha1 it was built
|
||||||
|
# from. this is then used to check whether an olean file should be
|
||||||
|
# rebuilt. don't use a tag as rev because this will get replaced into
|
||||||
|
# src/githash.h.in in preConfigure.
|
||||||
|
rev = "a5822ea47ebc52eec6323d8f1b60f6ec025daf99";
|
||||||
sha256 = "sha256-gJhbkl19iilNyfCt2TfPmghYA3yCjg6kS+yk/x/k14Y=";
|
sha256 = "sha256-gJhbkl19iilNyfCt2TfPmghYA3yCjg6kS+yk/x/k14Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,6 +24,13 @@ stdenv.mkDerivation rec {
|
||||||
# library.
|
# library.
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
preConfigure = assert builtins.stringLength src.rev == 40; ''
|
||||||
|
substituteInPlace src/githash.h.in \
|
||||||
|
--subst-var-by GIT_SHA1 "${src.rev}"
|
||||||
|
substituteInPlace library/init/version.lean.in \
|
||||||
|
--subst-var-by GIT_SHA1 "${src.rev}"
|
||||||
|
'';
|
||||||
|
|
||||||
postPatch = "patchShebangs .";
|
postPatch = "patchShebangs .";
|
||||||
|
|
||||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||||
|
|
Loading…
Reference in a new issue