Unverified Commit 804a66fc authored by Thiago Kenji Okada's avatar Thiago Kenji Okada Committed by GitHub
Browse files

xh: use new Darwin SDK pattern (#366154)

parents fcbd7ab1 d42eb0e0
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -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 ];

  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
    ];