diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-06-23 14:18:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-23 14:18:45 +0200 |
commit | ce5257d7194814a451c49f7440ce361beb6a7574 (patch) | |
tree | 6bfa04a7a24d8ebef42bcbfe273ec36508670a1a /pkgs | |
parent | 4bfc9be0d4f7ec010e072cb4b2352551d188c72b (diff) | |
parent | a31ca1691468f1373777554b70b5ad2fe34961bd (diff) |
Merge pull request #321727 from matteo-pacini/blightmud-fix
blightmud: darwin support
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/games/blightmud/default.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/games/blightmud/default.nix b/pkgs/games/blightmud/default.nix index e90b674b5b8a9..237fed69ff484 100644 --- a/pkgs/games/blightmud/default.nix +++ b/pkgs/games/blightmud/default.nix @@ -7,8 +7,12 @@ , openssl , withTTS ? false , speechd +, darwin }: - +let + inherit (darwin.apple_sdk.frameworks) + CoreAudio AudioUnit AVFoundation AppKit; +in rustPlatform.buildRustPackage rec { pname = "blightmud"; version = "5.3.0"; @@ -17,7 +21,7 @@ rustPlatform.buildRustPackage rec { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-e9Uo0IJYL9/6/nNL27zfUYnsTwDaOJOcR2CY6t++jDE="; + hash = "sha256-e9Uo0IJYL9/6/nNL27zfUYnsTwDaOJOcR2CY6t++jDE="; }; cargoHash = "sha256-QSgTpmSojZrwZ0RsUL6c2xO310RZX3gkyGl6oNf6pYI="; @@ -26,7 +30,11 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; - buildInputs = [ alsa-lib openssl ] ++ lib.optionals withTTS [ speechd ]; + buildInputs = [ openssl ] + ++ lib.optionals (withTTS && stdenv.isLinux) [ speechd ] + ++ lib.optionals stdenv.isLinux [ alsa-lib ] + ++ lib.optionals (withTTS && stdenv.isDarwin) [ AVFoundation AppKit ] + ++ lib.optionals stdenv.isDarwin [ CoreAudio AudioUnit ]; checkFlags = let @@ -44,6 +52,9 @@ rustPlatform.buildRustPackage rec { "timer_test" "validate_assertion_fail" "regex_smoke_test" + "test_tls_init_verify_err" + "test_tls_init_no_verify" + "test_tls_init_verify" ]; skipFlag = test: "--skip " + test; in @@ -64,6 +75,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/Blightmud/Blightmud"; license = licenses.gpl3Plus; maintainers = with maintainers; [ cpu ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } |