lean4: 4.18.0 -> 4.19.0

Release notes:
- https://github.com/leanprover/lean4/releases/tag/v4.19.0
- https://github.com/leanprover/lean4/releases/tag/v4.19.0-rc3
- https://github.com/leanprover/lean4/releases/tag/v4.19.0-rc2
- https://github.com/leanprover/lean4/releases/tag/v4.19.0-rc1

jthulhu 0ee203fa 669deec7

+50 -9
+16
pkgs/by-name/le/lean4/mimalloc.patch
···
··· 1 + --- a/CMakeLists.txt 2 + +++ b/CMakeLists.txt 3 + @@ -77,12 +77,8 @@ 4 + if (USE_MIMALLOC) 5 + ExternalProject_add(mimalloc 6 + PREFIX mimalloc 7 + - GIT_REPOSITORY https://github.com/microsoft/mimalloc 8 + - GIT_TAG v2.2.3 9 + - # just download, we compile it as part of each stage as it is small 10 + - CONFIGURE_COMMAND "" 11 + - BUILD_COMMAND "" 12 + + SOURCE_DIR "MIMALLOC-SRC" 13 + INSTALL_COMMAND "") 14 + list(APPEND EXTRA_DEPENDS mimalloc) 15 + endif() 16 +
+34 -9
pkgs/by-name/le/lean4/package.nix
··· 8 cadical, 9 pkg-config, 10 libuv, 11 perl, 12 testers, 13 }: 14 15 stdenv.mkDerivation (finalAttrs: { 16 pname = "lean4"; 17 - version = "4.18.0"; 18 19 src = fetchFromGitHub { 20 owner = "leanprover"; 21 repo = "lean4"; 22 tag = "v${finalAttrs.version}"; 23 - hash = "sha256-1hVcRO9RbVUgoKTUTFXBqJZwt50/aw/P9dxUdI7RpCc="; 24 }; 25 26 - postPatch = '' 27 - substituteInPlace src/CMakeLists.txt \ 28 - --replace-fail 'set(GIT_SHA1 "")' 'set(GIT_SHA1 "${finalAttrs.src.tag}")' 29 30 - # Remove tests that fails in sandbox. 31 - # It expects `sourceRoot` to be a git repository. 32 - rm -rf src/lake/examples/git/ 33 - ''; 34 35 preConfigure = '' 36 patchShebangs stage0/src/bin/ src/bin/ ··· 52 perl 53 ]; 54 55 cmakeFlags = [ 56 "-DUSE_GITHASH=OFF" 57 "-DINSTALL_LICENSE=OFF" 58 ]; 59 60 passthru.tests = {
··· 8 cadical, 9 pkg-config, 10 libuv, 11 + enableMimalloc ? true, 12 perl, 13 testers, 14 }: 15 16 stdenv.mkDerivation (finalAttrs: { 17 pname = "lean4"; 18 + version = "4.19.0"; 19 + 20 + # Using a vendored version rather than nixpkgs' version to match the exact version required by 21 + # Lean. Apparently, even a slight version change can impact greatly the final performance. 22 + mimalloc-src = fetchFromGitHub { 23 + owner = "microsoft"; 24 + repo = "mimalloc"; 25 + tag = "v2.2.3"; 26 + hash = "sha256-B0gngv16WFLBtrtG5NqA2m5e95bYVcQraeITcOX9A74="; 27 + }; 28 29 src = fetchFromGitHub { 30 owner = "leanprover"; 31 repo = "lean4"; 32 tag = "v${finalAttrs.version}"; 33 + hash = "sha256-Iw5JSamrty9l6aJ2WwslAolSHfi2q0UO8P8HI1gp+j8="; 34 }; 35 36 + postPatch = 37 + let 38 + pattern = "\${LEAN_BINARY_DIR}/../mimalloc/src/mimalloc"; 39 + in 40 + '' 41 + substituteInPlace src/CMakeLists.txt \ 42 + --replace-fail 'set(GIT_SHA1 "")' 'set(GIT_SHA1 "${finalAttrs.src.tag}")' 43 44 + # Remove tests that fails in sandbox. 45 + # It expects `sourceRoot` to be a git repository. 46 + rm -rf src/lake/examples/git/ 47 + '' 48 + + (lib.optionalString enableMimalloc '' 49 + substituteInPlace CMakeLists.txt \ 50 + --replace-fail 'MIMALLOC-SRC' '${finalAttrs.mimalloc-src}' 51 + for file in src/CMakeLists.txt src/runtime/CMakeLists.txt; do 52 + substituteInPlace "$file" \ 53 + --replace-fail '${pattern}' '${finalAttrs.mimalloc-src}' 54 + done 55 + ''); 56 57 preConfigure = '' 58 patchShebangs stage0/src/bin/ src/bin/ ··· 74 perl 75 ]; 76 77 + patches = [ ./mimalloc.patch ]; 78 + 79 cmakeFlags = [ 80 "-DUSE_GITHASH=OFF" 81 "-DINSTALL_LICENSE=OFF" 82 + "-DUSE_MIMALLOC=${if enableMimalloc then "ON" else "OFF"}" 83 ]; 84 85 passthru.tests = {