From a7d066ea4ba9cb7586d154740e86b97ee8218deb Mon Sep 17 00:00:00 2001 From: "Becker A." Date: Mon, 19 Aug 2024 14:05:17 -0600 Subject: [PATCH] spade: enable build on darwin (#335520) --- pkgs/by-name/sp/spade/package.nix | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/sp/spade/package.nix b/pkgs/by-name/sp/spade/package.nix index 2a3eb725e2d7..e154d7ccfd4e 100644 --- a/pkgs/by-name/sp/spade/package.nix +++ b/pkgs/by-name/sp/spade/package.nix @@ -1,10 +1,12 @@ -{ lib -, rustPlatform -, fetchFromGitLab -, stdenv -, nix-update -, writeScript -, git +{ + lib, + rustPlatform, + fetchFromGitLab, + stdenv, + nix-update, + writeScript, + git, + python312, }: rustPlatform.buildRustPackage rec { @@ -39,14 +41,20 @@ rustPlatform.buildRustPackage rec { '') ]; + buildInputs = lib.optionals stdenv.isDarwin [ python312 ]; + env.NIX_CFLAGS_LINK = lib.optionals stdenv.isDarwin "-L${python312}/lib/python3.12/config-3.12-darwin -lpython3.12"; + meta = with lib; { description = "Better hardware description language"; homepage = "https://gitlab.com/spade-lang/spade"; changelog = "https://gitlab.com/spade-lang/spade/-/blob/${src.rev}/CHANGELOG.md"; # compiler is eupl12, spade-lang stdlib is both asl20 and mit - license = with licenses; [ eupl12 asl20 mit ]; + license = with licenses; [ + eupl12 + asl20 + mit + ]; maintainers = with maintainers; [ pbsds ]; mainProgram = "spade"; - broken = stdenv.isDarwin; # ld: symbol(s) not found for architecture ${system} }; }