Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions nix/blueprint-compiler.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
dbus,
fetchFromGitLab,
gobject-introspection,
lib,
libadwaita,
meson,
ninja,
python3,
stdenv,
testers,
xvfb-run,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blueprint-compiler";
version = "0.16.0";

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "jwestman";
repo = "blueprint-compiler";
rev = "v${finalAttrs.version}";
hash = "sha256-FnMQtqy+uejWn3tDeaj92h2x9TzyiK5KdlRm55ObgPg=";
};

nativeBuildInputs = [
meson
ninja
];

postPatch = ''
patchShebangs docs/collect-sections.py
'';

buildInputs = [
libadwaita
(python3.withPackages (
ps:
with ps; [
pygobject3
]
))
];

propagatedBuildInputs = [
# For setup hook, so that the compiler can find typelib files
gobject-introspection
];

nativeCheckInputs = [
dbus
xvfb-run
];

# requires xvfb-run
doCheck = !stdenv.hostPlatform.isDarwin && false; # tests time out

checkPhase = ''
runHook preCheck

xvfb-run dbus-run-session \
--config-file=${dbus}/share/dbus-1/session.conf \
meson test --no-rebuild --print-errorlogs

runHook postCheck
'';

passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};

meta = with lib; {
description = "Markup language for GTK user interface files";
mainProgram = "blueprint-compiler";
homepage = "https://gitlab.gnome.org/jwestman/blueprint-compiler";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [
benediktbroich
ranfdev
];
platforms = platforms.unix;
};
})
4 changes: 3 additions & 1 deletion nix/devShell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
mkShell,
lib,
stdenv,
callPackage,
bashInteractive,
gdb,
#, glxinfo # unused
Expand Down Expand Up @@ -34,7 +35,7 @@
gtk4-layer-shell,
gobject-introspection,
libadwaita,
blueprint-compiler,
# blueprint-compiler,
adwaita-icon-theme,
hicolor-icon-theme,
harfbuzz,
Expand Down Expand Up @@ -62,6 +63,7 @@
zig2nix,
system,
}: let
blueprint-compiler = callPackage ./blueprint-compiler.nix {};
# See package.nix. Keep in sync.
rpathLibs =
[
Expand Down
3 changes: 2 additions & 1 deletion nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
gtk4-layer-shell,
gobject-introspection,
libadwaita,
blueprint-compiler,
# blueprint-compiler,
libxml2,
wrapGAppsHook4,
gsettings-desktop-schemas,
Expand Down Expand Up @@ -47,6 +47,7 @@
zig_hook = zig_0_13.hook.overrideAttrs {
zig_default_flags = "-Dcpu=baseline -Doptimize=${optimize} --color off";
};
blueprint-compiler = callPackage ./blueprint-compiler.nix {};
in
stdenv.mkDerivation (finalAttrs: {
pname = "ghostty";
Expand Down