nixpkgs/pkgs/by-name/li/libui-ng/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2023-12-25 05:20:00 +01:00
{ lib
, stdenv
, cmocka
, darwin
, fetchFromGitHub
, gtk3
, meson
, ninja
, pkg-config
2024-02-13 05:20:00 +01:00
, unstableGitUpdater
2023-12-25 05:20:00 +01:00
}:
stdenv.mkDerivation rec {
pname = "libui-ng";
version = "4.1-unstable-2024-02-05";
2023-12-25 05:20:00 +01:00
src = fetchFromGitHub {
owner = "libui-ng";
repo = "libui-ng";
rev = "4d46de31eafad84c88b939356bcd64e6c5ee3821";
hash = "sha256-Yb8VdJe75uBzRnsfTOVxUXstZmu6dJ9nBuOrf86KO5s=";
2023-12-25 05:20:00 +01:00
};
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
substituteInPlace meson.build --replace "'-arch', 'arm64'" ""
'';
nativeBuildInputs = [
cmocka
meson
ninja
pkg-config
];
buildInputs =
if stdenv.isDarwin then [
darwin.libobjc
darwin.apple_sdk_11_0.Libsystem
darwin.apple_sdk_11_0.frameworks.Cocoa
darwin.apple_sdk_11_0.frameworks.AppKit
darwin.apple_sdk_11_0.frameworks.CoreFoundation
] else [
gtk3
];
mesonFlags = [
(lib.mesonBool "examples" (!stdenv.isDarwin))
];
passthru.updateScript = unstableGitUpdater {
tagPrefix = "alpha";
};
2024-02-13 05:20:00 +01:00
2023-12-25 05:20:00 +01:00
meta = with lib; {
description = "A portable GUI library for C";
homepage = "https://github.com/libui-ng/libui-ng";
license = licenses.mit;
2024-04-24 06:20:00 +02:00
maintainers = with maintainers; [ ];
2023-12-25 05:20:00 +01:00
platforms = platforms.all;
};
}