From da77e713b4c3c596cbbca63352198d370c88ec8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Fri, 4 Oct 2024 18:27:53 +0200 Subject: [PATCH 1/3] matrix-authentication-service: format with nixfmt-rfc-style --- .../matrix-authentication-service/package.nix | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/pkgs/by-name/ma/matrix-authentication-service/package.nix b/pkgs/by-name/ma/matrix-authentication-service/package.nix index c6de3b3a0a09..8b2dacbb6fbc 100644 --- a/pkgs/by-name/ma/matrix-authentication-service/package.nix +++ b/pkgs/by-name/ma/matrix-authentication-service/package.nix @@ -1,16 +1,17 @@ -{ 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, }: rustPlatform.buildRustPackage rec { @@ -27,8 +28,8 @@ rustPlatform.buildRustPackage rec { cargoLock = { lockFile = ./Cargo.lock; outputHashes = { - "sea-query-0.32.0-rc.1" = "sha256-Q/NFiIBu8L5rQj4jwcIo8ACmAhLBy4HSTcJv06UdK8E="; - }; + "sea-query-0.32.0-rc.1" = "sha256-Q/NFiIBu8L5rQj4jwcIo8ACmAhLBy4HSTcJv06UdK8E="; + }; }; npmDeps = fetchNpmDeps { @@ -47,14 +48,16 @@ rustPlatform.buildRustPackage rec { (python3.withPackages (ps: [ ps.setuptools ])) # Used by gyp ]; - buildInputs = [ - sqlite - zstd - ] ++ 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 - ]; + buildInputs = + [ + sqlite + zstd + ] + ++ 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 + ]; env = { ZSTD_SYS_USE_PKG_CONFIG = true; From 846019f060029085f458e5f3f18d392c482f393d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Fri, 4 Oct 2024 18:28:59 +0200 Subject: [PATCH 2/3] matrix-authentication-service: mark x86-64-darwin as a badPlatform --- pkgs/by-name/ma/matrix-authentication-service/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/ma/matrix-authentication-service/package.nix b/pkgs/by-name/ma/matrix-authentication-service/package.nix index 8b2dacbb6fbc..5e4ebdcdee74 100644 --- a/pkgs/by-name/ma/matrix-authentication-service/package.nix +++ b/pkgs/by-name/ma/matrix-authentication-service/package.nix @@ -98,5 +98,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" ]; }; } From 7337fc192893734c51f4d9c0dd69573fde5eb3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Fri, 4 Oct 2024 18:30:54 +0200 Subject: [PATCH 3/3] matrix-authentication-service: fix aarch64-darwin build --- pkgs/by-name/ma/matrix-authentication-service/package.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ma/matrix-authentication-service/package.nix b/pkgs/by-name/ma/matrix-authentication-service/package.nix index 5e4ebdcdee74..96318e3d4b0b 100644 --- a/pkgs/by-name/ma/matrix-authentication-service/package.nix +++ b/pkgs/by-name/ma/matrix-authentication-service/package.nix @@ -12,6 +12,7 @@ stdenv, darwin, open-policy-agent, + cctools, }: rustPlatform.buildRustPackage rec { @@ -46,7 +47,7 @@ rustPlatform.buildRustPackage rec { npmHooks.npmConfigHook nodejs (python3.withPackages (ps: [ ps.setuptools ])) # Used by gyp - ]; + ] ++ lib.optional stdenv.isDarwin cctools; # libtool used by gyp; buildInputs = [