From fd29e9a3c0fc003fb47408164104c111b87c2ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 26 Oct 2020 09:52:56 +0100 Subject: [PATCH] rustscan: fix building on darwin --- pkgs/tools/security/rustscan/default.nix | 10 ++++------ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/security/rustscan/default.nix b/pkgs/tools/security/rustscan/default.nix index 773711d1f30..4d154bbc96f 100644 --- a/pkgs/tools/security/rustscan/default.nix +++ b/pkgs/tools/security/rustscan/default.nix @@ -1,8 +1,4 @@ -{ lib -, fetchFromGitHub -, rustPlatform -, nmap -}: +{ stdenv, fetchFromGitHub, rustPlatform, nmap, Security }: rustPlatform.buildRustPackage rec { pname = "rustscan"; @@ -22,6 +18,8 @@ rustPlatform.buildRustPackage rec { --replace 'Command::new("nmap")' 'Command::new("${nmap}/bin/nmap")' ''; + buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + checkFlags = [ "--skip=infer_ulimit_lowering_no_panic" "--skip=google_dns_runs" @@ -29,7 +27,7 @@ rustPlatform.buildRustPackage rec { "--skip=parse_hosts_file_and_incorrect_hosts" ]; - meta = with lib; { + meta = with stdenv.lib; { description = "Faster Nmap Scanning with Rust"; homepage = "https://github.com/RustScan/RustScan"; license = licenses.gpl3Only; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 14630896d3f..5f1cb87dcc5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6803,7 +6803,9 @@ in inherit (darwin.apple_sdk.frameworks) Security; }; - rustscan = callPackage ../tools/security/rustscan { }; + rustscan = callPackage ../tools/security/rustscan { + inherit (darwin.apple_sdk.frameworks) Security; + }; rw = callPackage ../tools/misc/rw { };