Merge pull request #124507 from collares/olean-cache-misses

lean: substitute release commit sha1 (so upstream oleans are compatible with nixpkgs lean)
launchpad/nixpkgs/master
Gabriel Ebner 3 years ago committed by GitHub
commit 4aa2e32246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      pkgs/applications/science/logic/lean/default.nix

@ -7,7 +7,11 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "leanprover-community";
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=";
};
@ -20,6 +24,13 @@ stdenv.mkDerivation rec {
# library.
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 .";
postInstall = lib.optionalString stdenv.isDarwin ''

Loading…
Cancel
Save