2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, cmocka
|
|
|
|
, darwin
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gtk3
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2024-02-29 20:09:43 +00:00
|
|
|
, unstableGitUpdater
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libui-ng";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "4.1-unstable-2024-05-19";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libui-ng";
|
|
|
|
repo = "libui-ng";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "49b04c4cf8ae4d3e38e389f446ef75170eb62762";
|
|
|
|
hash = "sha256-W9LnUBUKwx1x3+BEeUanisBGR2Q4dnbcMM5k8mCondM=";
|
2024-01-02 11:29:13 +00: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))
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
tagPrefix = "alpha";
|
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Portable GUI library for C";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://github.com/libui-ng/libui-ng";
|
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|