about summary refs log tree commit diff
path: root/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/rust/cargo-bisect-rustc/default.nix')
-rw-r--r--pkgs/development/tools/rust/cargo-bisect-rustc/default.nix66
1 files changed, 36 insertions, 30 deletions
diff --git a/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix b/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix
index 5c7d0d57fde0b..9babac9ebadee 100644
--- a/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix
+++ b/pkgs/development/tools/rust/cargo-bisect-rustc/default.nix
@@ -1,13 +1,14 @@
-{ stdenv
-, lib
-, fetchFromGitHub
-, rustPlatform
-, pkg-config
-, openssl
-, runCommand
-, patchelf
-, zlib
-, Security
+{
+  stdenv,
+  lib,
+  fetchFromGitHub,
+  darwin,
+  rustPlatform,
+  pkg-config,
+  openssl,
+  runCommand,
+  patchelf,
+  zlib,
 }:
 
 rustPlatform.buildRustPackage rec {
@@ -23,41 +24,46 @@ rustPlatform.buildRustPackage rec {
 
   patches =
     let
-      patchelfPatch = runCommand "0001-dynamically-patchelf-binaries.patch"
-        {
-          CC = stdenv.cc;
-          patchelf = patchelf;
-          libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}";
-        }
-        ''
-          export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
-          substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
-            --subst-var patchelf \
-            --subst-var dynamicLinker \
-            --subst-var libPath
-        '';
+      patchelfPatch =
+        runCommand "0001-dynamically-patchelf-binaries.patch"
+          {
+            CC = stdenv.cc;
+            patchelf = patchelf;
+            libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}";
+          }
+          ''
+            export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
+            substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
+              --subst-var patchelf \
+              --subst-var dynamicLinker \
+              --subst-var libPath
+          '';
     in
     lib.optionals stdenv.isLinux [ patchelfPatch ];
 
   nativeBuildInputs = [ pkg-config ];
 
-  buildInputs = [
-    openssl
-  ] ++ lib.optionals stdenv.isDarwin [
-    Security
-  ];
+  buildInputs =
+    [ openssl ]
+    ++ lib.optionals stdenv.isDarwin [
+      darwin.apple_sdk.frameworks.Security
+      darwin.apple_sdk.frameworks.SystemConfiguration
+    ];
 
   cargoHash = "sha256-CgEs0cejquFRY3VN6CgbE23Gipg+LEuWp/jSIkITrjw=";
 
   checkFlags = [
-    "--skip test_github"  # requires internet
+    "--skip test_github" # requires internet
   ];
 
   meta = with lib; {
     description = "Bisects rustc, either nightlies or CI artifacts";
     mainProgram = "cargo-bisect-rustc";
     homepage = "https://github.com/rust-lang/cargo-bisect-rustc";
-    license = with licenses; [ asl20 mit ];
+    license = with licenses; [
+      asl20
+      mit
+    ];
     maintainers = with maintainers; [ davidtwco ];
   };
 }