Merge pull request #294040 from marsam/elan-revert-tmp-directory

elan: revert temporary directory creation
This commit is contained in:
Mauricio Collares 2024-03-07 14:43:25 +01:00 committed by GitHub
commit d6a4aea404
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
{ stdenv, lib, runCommand, patchelf, makeWrapper, pkg-config, curl, runtimeShell
{ stdenv, lib, runCommand, patchelf, makeWrapper, pkg-config, curl, runtimeShell, fetchpatch
, openssl, zlib, fetchFromGitHub, rustPlatform, libiconv }:
rustPlatform.buildRustPackage rec {
@ -23,6 +23,14 @@ rustPlatform.buildRustPackage rec {
buildFeatures = [ "no-self-update" ];
patches = lib.optionals stdenv.isLinux [
# revert temporary directory creation, because it break the wrapper
# https://github.com/NixOS/nixpkgs/pull/289941#issuecomment-1980778358
(fetchpatch {
url = "https://github.com/leanprover/elan/commit/bd54acaab75d08b3912ee1f051af8657f3a9cfdf.patch";
hash = "sha256-6If/wxWSea8Zjlp3fx9wh3D0TjmWZbvCuY9q5c2qJGA=";
revert = true;
})
# Run patchelf on the downloaded binaries.
# This is necessary because Lean 4 is now dynamically linked.
(runCommand "0001-dynamically-patchelf-binaries.patch" {