From d42eb0e024161988fc220895d20d7b1aab6bf3b8 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Wed, 18 Dec 2024 13:21:06 +0000 Subject: [PATCH] xh: use new Darwin SDK pattern --- pkgs/by-name/xh/xh/package.nix | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/xh/xh/package.nix b/pkgs/by-name/xh/xh/package.nix index eea4a464476e..65d447f2d936 100644 --- a/pkgs/by-name/xh/xh/package.nix +++ b/pkgs/by-name/xh/xh/package.nix @@ -6,7 +6,6 @@ pkg-config, withNativeTls ? true, stdenv, - darwin, openssl, }: @@ -30,15 +29,12 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = lib.optionals withNativeTls ( - if stdenv.hostPlatform.isDarwin then - [ darwin.apple_sdk.frameworks.SystemConfiguration ] - else - [ openssl ] - ); + buildInputs = lib.optionals (withNativeTls && !stdenv.hostPlatform.isDarwin) [ openssl ]; - # Get openssl-sys to use pkg-config - OPENSSL_NO_VENDOR = 1; + env = { + # Get openssl-sys to use pkg-config + OPENSSL_NO_VENDOR = 1; + }; postInstall = '' installShellCompletion \ @@ -62,12 +58,12 @@ rustPlatform.buildRustPackage rec { $out/bin/xhs --help > /dev/null ''; - meta = with lib; { + meta = { description = "Friendly and fast tool for sending HTTP requests"; homepage = "https://github.com/ducaale/xh"; changelog = "https://github.com/ducaale/xh/blob/v${version}/CHANGELOG.md"; - license = licenses.mit; - maintainers = with maintainers; [ + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ figsoda aaronjheng ];