Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

uiua: fix darwin build, format with nixfmt #307691

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 30 additions & 24 deletions pkgs/by-name/ui/uiua/package.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, audioSupport ? true
, darwin
, alsa-lib
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
audioSupport ? true,
darwin,
alsa-lib,

# passthru.tests.run
, runCommand
, uiua
# passthru.tests.run
runCommand,
uiua,
}:

let
inherit (darwin.apple_sdk.frameworks) AppKit AudioUnit CoreServices;
in
rustPlatform.buildRustPackage rec {
pname = "uiua";
version = "0.10.3";
Expand All @@ -25,19 +29,17 @@ rustPlatform.buildRustPackage rec {

cargoHash = "sha256-R97KO3MYmtO9C1Hi9kU+1FDdbOCVQk+gwVXTTvbeok4=";

nativeBuildInputs = lib.optionals stdenv.isDarwin [
rustPlatform.bindgenHook
] ++ lib.optionals audioSupport [
pkg-config
];
nativeBuildInputs =
lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ]
++ lib.optionals audioSupport [ pkg-config ];

buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
] ++ lib.optionals (audioSupport && stdenv.isDarwin) [
darwin.apple_sdk.frameworks.AudioUnit
] ++ lib.optionals (audioSupport && stdenv.isLinux) [
alsa-lib
];
buildInputs =
lib.optionals stdenv.isDarwin [
AppKit
CoreServices
]
++ lib.optionals (audioSupport && stdenv.isDarwin) [ AudioUnit ]
++ lib.optionals (audioSupport && stdenv.isLinux) [ alsa-lib ];

buildFeatures = lib.optional audioSupport "audio";

Expand All @@ -59,6 +61,10 @@ rustPlatform.buildRustPackage rec {
homepage = "https://www.uiua.org/";
license = lib.licenses.mit;
mainProgram = "uiua";
maintainers = with lib.maintainers; [ cafkafk tomasajt defelo ];
maintainers = with lib.maintainers; [
cafkafk
tomasajt
defelo
];
};
}