Unverified Commit a7d066ea authored by Becker A.'s avatar Becker A. Committed by GitHub
Browse files

spade: enable build on darwin (#335520)

parent 02c88776
Loading
Loading
Loading
Loading
+17 −9
Original line number Diff line number Diff line
{ 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}
  };
}