diff options
author | happysalada <raphael@megzari.com> | 2021-05-21 09:39:20 +0900 |
---|---|---|
committer | Raphael Megzari <raphael@megzari.com> | 2021-05-21 10:59:12 +0900 |
commit | 97335842d1aa00725d3af9dede37df2965972633 (patch) | |
tree | b28d208cdb4c376d391afb443513b8e6b78bd50e /pkgs/development/tools/rust/rustup | |
parent | f38ba786c1c4fb373d0a0999f1291394d28e5cc6 (diff) |
rustup: nixpkgs-fmt
Diffstat (limited to 'pkgs/development/tools/rust/rustup')
-rw-r--r-- | pkgs/development/tools/rust/rustup/default.nix | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/pkgs/development/tools/rust/rustup/default.nix b/pkgs/development/tools/rust/rustup/default.nix index 2baf731665c6a..9d7a1dc047e89 100644 --- a/pkgs/development/tools/rust/rustup/default.nix +++ b/pkgs/development/tools/rust/rustup/default.nix @@ -1,6 +1,16 @@ -{ stdenv, lib, runCommand, patchelf -, fetchFromGitHub, rustPlatform, makeWrapper -, pkg-config, curl, zlib, Security, CoreServices }: +{ stdenv +, lib +, runCommand +, patchelf +, fetchFromGitHub +, rustPlatform +, makeWrapper +, pkg-config +, curl +, zlib +, Security +, CoreServices +}: let libPath = lib.makeLibraryPath [ @@ -24,18 +34,19 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ makeWrapper pkg-config ]; buildInputs = [ - curl zlib + curl + zlib ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security ]; cargoBuildFlags = [ "--features no-self-update" ]; patches = lib.optionals stdenv.isLinux [ - (runCommand "0001-dynamically-patchelf-binaries.patch" { CC=stdenv.cc; patchelf = patchelf; libPath = "$ORIGIN/../lib:${libPath}"; } '' - export dynamicLinker=$(cat $CC/nix-support/dynamic-linker) - substitute ${./0001-dynamically-patchelf-binaries.patch} $out \ - --subst-var patchelf \ - --subst-var dynamicLinker \ - --subst-var libPath + (runCommand "0001-dynamically-patchelf-binaries.patch" { CC = stdenv.cc; patchelf = patchelf; libPath = "$ORIGIN/../lib:${libPath}"; } '' + export dynamicLinker=$(cat $CC/nix-support/dynamic-linker) + substitute ${./0001-dynamically-patchelf-binaries.patch} $out \ + --subst-var patchelf \ + --subst-var dynamicLinker \ + --subst-var libPath '') ]; |