diff options
| author | Gabriel Ebner <gebner@gebner.org> | 2022-08-22 16:52:52 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2022-08-22 16:48:56 +0000 |
| commit | de6fd522173b7319e6990c64b0277ff10591a268 (patch) | |
| tree | 24ab616d25e441ada9d28aa2b35a4af3096616db | |
| parent | Merge pull request #184571 from NixOS/backport-182744-to-release-22.05 (diff) | |
| download | nixpkgs-origin/backport-187896-to-release-22.05.tar.gz | |
elan: overwrite llvm-ar with stdenv arorigin/backport-187896-to-release-22.05
(cherry picked from commit e99329eb02194e2750078cce0bd4c92726149088)
| -rw-r--r-- | pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch | 7 | ||||
| -rw-r--r-- | pkgs/applications/science/logic/elan/default.nix | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch b/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch index 768be10b6df3..74da9d854f34 100644 --- a/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch +++ b/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch @@ -2,7 +2,7 @@ diff --git a/src/elan-dist/src/component/package.rs b/src/elan-dist/src/componen index c51e76d..ae8159e 100644 --- a/src/elan-dist/src/component/package.rs +++ b/src/elan-dist/src/component/package.rs -@@ -56,6 +56,30 @@ fn unpack_without_first_dir<R: Read>(archive: &mut tar::Archive<R>, path: &Path) +@@ -56,6 +56,35 @@ fn unpack_without_first_dir<R: Read>(archive: &mut tar::Archive<R>, path: &Path) entry .unpack(&full_path) .chain_err(|| ErrorKind::ExtractingPackage)?; @@ -30,6 +30,11 @@ index c51e76d..ae8159e 100644 +LEAN_CC="${{LEAN_CC:-@cc@}}" exec -a "$0" {} "$@" -L {}/lib # use bundled libraries, but not bundled compiler that doesn't know about NIX_LDFLAGS +"#, new_path.to_str().unwrap(), dest_path.parent().unwrap().parent().unwrap().to_str().unwrap()))?; + ::std::fs::set_permissions(dest_path, ::std::fs::Permissions::from_mode(0o755))?; ++ } ++ ++ if dest_path.file_name() == Some(::std::ffi::OsStr::new("llvm-ar")) { ++ ::std::fs::remove_file(dest_path)?; ++ ::std::os::unix::fs::symlink("@ar@", dest_path)?; } Ok(()) diff --git a/pkgs/applications/science/logic/elan/default.nix b/pkgs/applications/science/logic/elan/default.nix index 1c16de8ad951..b77d06e50091 100644 --- a/pkgs/applications/science/logic/elan/default.nix +++ b/pkgs/applications/science/logic/elan/default.nix @@ -28,6 +28,7 @@ rustPlatform.buildRustPackage rec { (runCommand "0001-dynamically-patchelf-binaries.patch" { CC = stdenv.cc; cc = "${stdenv.cc}/bin/cc"; + ar = "${stdenv.cc}/bin/ar"; patchelf = patchelf; shell = runtimeShell; } '' @@ -36,6 +37,7 @@ rustPlatform.buildRustPackage rec { --subst-var patchelf \ --subst-var dynamicLinker \ --subst-var cc \ + --subst-var ar \ --subst-var shell '') ]; |
