Unverified Commit 413aa25d authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

matrix-authentication-service: fix darwin build (#345549)

parents d786d017 7337fc19
Loading
Loading
Loading
Loading
+31 −24
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, fetchNpmDeps
, npmHooks
, nodejs
, python3
, pkg-config
, sqlite
, zstd
, stdenv
, darwin
, open-policy-agent
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  fetchNpmDeps,
  npmHooks,
  nodejs,
  python3,
  pkg-config,
  sqlite,
  zstd,
  stdenv,
  darwin,
  open-policy-agent,
  cctools,
}:

rustPlatform.buildRustPackage rec {
@@ -45,12 +47,14 @@ rustPlatform.buildRustPackage rec {
    npmHooks.npmConfigHook
    nodejs
    (python3.withPackages (ps: [ ps.setuptools ])) # Used by gyp
  ];
  ] ++ lib.optional stdenv.isDarwin cctools; # libtool used by gyp;

  buildInputs = [
  buildInputs =
    [
      sqlite
      zstd
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      darwin.apple_sdk_11_0.frameworks.CoreFoundation
      darwin.apple_sdk_11_0.frameworks.Security
      darwin.apple_sdk_11_0.frameworks.SystemConfiguration
@@ -95,5 +99,8 @@ rustPlatform.buildRustPackage rec {
    license = lib.licenses.agpl3Only;
    maintainers = with lib.maintainers; [ teutat3s ];
    mainProgram = "mas-cli";
    # Note: broken on x86_64-darwin because of aligned_alloc, can be revisited after
    # https://github.com/NixOS/nixpkgs/pull/346043 is merged
    badPlatforms = [ "x86_64-darwin" ];
  };
}