summaryrefslogtreecommitdiff
path: root/pkgs/hikari.nix
diff options
context:
space:
mode:
authorstuebinm2024-06-04 21:14:49 +0200
committerstuebinm2024-06-04 21:14:49 +0200
commitd27e67743931d352e5857b605d44657668fa9013 (patch)
treebad8f97e5f47e791f7f6a3e0b94ef45b5ff0e131 /pkgs/hikari.nix
parent9bf026e55b72af7aa14096440537fefddc56c212 (diff)
all: jump to nixpkgs 24.05
this does a lot of things, most of which are maintenance: - sources update - adjust newly-renamed options - swap some packages that were removed / renamed - update nomsring to newer default ghc - remove the deprecated lib.mdDoc from modules/*.nix - disable the nixpkgs mollysocket module so my own keeps evaluating - bundle the package definition of hikari & wlroots 0.15, which nixpkgs has removed as unmaintained (in fairness, they are unmaintained)
Diffstat (limited to 'pkgs/hikari.nix')
-rw-r--r--pkgs/hikari.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/hikari.nix b/pkgs/hikari.nix
new file mode 100644
index 0000000..2adebe9
--- /dev/null
+++ b/pkgs/hikari.nix
@@ -0,0 +1,66 @@
+{ lib, stdenv, fetchzip
+, pkg-config, bmake
+, cairo, glib, libevdev, libinput, libxkbcommon, linux-pam, pango, pixman
+, libucl, wayland, wayland-protocols, wlroots, mesa
+, features ? {
+ gammacontrol = true;
+ layershell = true;
+ screencopy = true;
+ xwayland = true;
+ }
+}:
+
+stdenv.mkDerivation rec {
+ pname = "hikari";
+ version = "2.3.3";
+
+ src = fetchzip {
+ url = "https://hikari.acmelabs.space/releases/${pname}-${version}.tar.gz";
+ sha256 = "sha256-5Ug0U3ESC5F/gj7bahnLYkeY/weSCj0QASwdFuWwdMI=";
+ };
+
+ nativeBuildInputs = [ pkg-config bmake ];
+
+ buildInputs = [
+ cairo
+ glib
+ libevdev
+ libinput
+ libxkbcommon
+ linux-pam
+ pango
+ pixman
+ libucl
+ mesa # for libEGL
+ wayland
+ wayland-protocols
+ wlroots
+ ];
+
+ patches = [ ./patches/hikari-gtk4.patch ];
+
+ enableParallelBuilding = true;
+
+ makeFlags = with lib; [ "PREFIX=$(out)" "DEBUG=YES" ]
+ ++ optional stdenv.isLinux "WITH_POSIX_C_SOURCE=YES"
+ ++ mapAttrsToList (feat: enabled:
+ optionalString enabled "WITH_${toUpper feat}=YES"
+ ) features;
+
+ postPatch = ''
+ # Can't suid in nix store
+ # Run hikari as root (it will drop privileges as early as possible), or create
+ # a systemd unit to give it the necessary permissions/capabilities.
+ substituteInPlace Makefile --replace '4555' '555'
+
+ sed -i 's@<drm_fourcc.h>@<libdrm/drm_fourcc.h>@' src/*.c
+ '';
+
+ meta = with lib; {
+ description = "package definition kept around since it was removed in nixpkgs";
+ homepage = "https://hikari.acmelabs.space";
+ license = licenses.bsd2;
+ platforms = platforms.linux ++ platforms.freebsd;
+ maintainers = with maintainers; [ jpotier ];
+ };
+}