nixpkgs/pkgs/applications/terminal-emulators/blackbox-terminal/default.nix

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

103 lines
2.3 KiB
Nix
Raw Normal View History

2022-09-27 04:37:07 +00:00
{ lib
, stdenv
, fetchFromGitLab
, fetchpatch
2022-09-27 04:37:07 +00:00
, meson
, ninja
, pkg-config
, vala
, gtk4
, vte-gtk4
, json-glib
, sassc
, libadwaita
, pcre2
2023-08-12 08:35:23 +00:00
, libsixel
2022-09-27 04:37:07 +00:00
, libxml2
, librsvg
2023-01-18 09:46:52 +00:00
, libgee
2022-09-27 04:37:07 +00:00
, callPackage
, python3
, desktop-file-utils
, wrapGAppsHook4
2023-08-12 08:35:23 +00:00
, sixelSupport ? false
2022-09-27 04:37:07 +00:00
}:
let
marble = callPackage ./marble.nix { };
in
stdenv.mkDerivation rec {
pname = "blackbox";
2023-07-19 19:25:33 +00:00
version = "0.14.0";
2022-09-27 04:37:07 +00:00
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "raggesilver";
repo = "blackbox";
rev = "v${version}";
2023-07-19 19:25:33 +00:00
hash = "sha256-ebwh9WTooJuvYFIygDBn9lYC7+lx9P1HskvKU8EX9jw=";
2022-09-27 04:37:07 +00:00
};
patches = [
# Fix closing confirmation dialogs not showing
(fetchpatch {
url = "https://gitlab.gnome.org/raggesilver/blackbox/-/commit/3978c9b666d27adba835dd47cf55e21515b6d6d9.patch";
hash = "sha256-L/Ci4YqYNzb3F49bUwEWSjzr03MIPK9A5FEJCCct+7A=";
})
];
2022-09-27 04:37:07 +00:00
postPatch = ''
substituteInPlace build-aux/meson/postinstall.py \
--replace-fail 'gtk-update-icon-cache' 'gtk4-update-icon-cache'
2022-09-27 04:37:07 +00:00
patchShebangs build-aux/meson/postinstall.py
'';
nativeBuildInputs = [
meson
ninja
pkg-config
vala
sassc
wrapGAppsHook4
2022-09-27 04:37:07 +00:00
python3
desktop-file-utils # For update-desktop-database
];
buildInputs = [
gtk4
2023-08-12 08:35:23 +00:00
(vte-gtk4.overrideAttrs (old: {
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "vte";
rev = "3c8f66be867aca6656e4109ce880b6ea7431b895";
hash = "sha256-vz9ircmPy2Q4fxNnjurkgJtuTSS49rBq/m61p1B43eU=";
};
postPatch = (old.postPatch or "") + ''
patchShebangs src/box_drawing_generate.sh
'';
2023-08-12 08:35:23 +00:00
} // lib.optionalAttrs sixelSupport {
buildInputs = old.buildInputs ++ [ libsixel ];
mesonFlags = old.mesonFlags ++ [ "-Dsixel=true" ];
}))
2022-09-27 04:37:07 +00:00
json-glib
marble
libadwaita
pcre2
libxml2
librsvg
2023-01-18 09:46:52 +00:00
libgee
2022-09-27 04:37:07 +00:00
];
2023-07-19 19:25:33 +00:00
mesonFlags = [ "-Dblackbox_is_flatpak=false" ];
2022-09-27 04:37:07 +00:00
meta = with lib; {
description = "Beautiful GTK 4 terminal";
2023-08-06 17:40:21 +00:00
mainProgram = "blackbox";
2022-09-27 04:37:07 +00:00
homepage = "https://gitlab.gnome.org/raggesilver/blackbox";
2022-11-10 09:25:31 +00:00
changelog = "https://gitlab.gnome.org/raggesilver/blackbox/-/raw/v${version}/CHANGELOG.md";
2022-09-27 04:37:07 +00:00
license = licenses.gpl3Plus;
maintainers = with maintainers; [ chuangzhu linsui ];
2022-09-27 04:37:07 +00:00
platforms = platforms.linux;
};
}