diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-08-27 14:34:43 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-08-27 14:34:43 +0000 |
commit | 23fa25640d5c67092f50d9f1663f832f8ea70bfe (patch) | |
tree | 67404489680e3006c3f0e5ea8921dd07437c3402 /pkgs/applications/window-managers/hikari | |
parent | c901f337b8fed63ba0bb53674950ce4c7bf94dcd (diff) | |
parent | ea464f4b636ce1667e6e79b9f38707b730d93da3 (diff) | |
download | nixpkgs-23fa25640d5c67092f50d9f1663f832f8ea70bfe.tar nixpkgs-23fa25640d5c67092f50d9f1663f832f8ea70bfe.tar.gz nixpkgs-23fa25640d5c67092f50d9f1663f832f8ea70bfe.tar.bz2 nixpkgs-23fa25640d5c67092f50d9f1663f832f8ea70bfe.tar.lz nixpkgs-23fa25640d5c67092f50d9f1663f832f8ea70bfe.tar.xz nixpkgs-23fa25640d5c67092f50d9f1663f832f8ea70bfe.tar.zst nixpkgs-23fa25640d5c67092f50d9f1663f832f8ea70bfe.zip |
Merge branch 'upstream-merge' into master
Diffstat (limited to 'pkgs/applications/window-managers/hikari')
-rw-r--r-- | pkgs/applications/window-managers/hikari/default.nix | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/hikari/default.nix b/pkgs/applications/window-managers/hikari/default.nix new file mode 100644 index 00000000000..9bf68adaef4 --- /dev/null +++ b/pkgs/applications/window-managers/hikari/default.nix @@ -0,0 +1,75 @@ +{ stdenv, fetchzip, + pkgconfig, bmake, + cairo, glib, libevdev, libinput, libxkbcommon, linux-pam, pango, pixman, + libucl, wayland, wayland-protocols, wlroots, + features ? { + gammacontrol = true; + layershell = true; + screencopy = true; + xwayland = true; + } +}: + +let + pname = "hikari"; + version = "2.1.2"; +in + +stdenv.mkDerivation { + inherit pname version; + + src = fetchzip { + url = "https://hikari.acmelabs.space/releases/${pname}-${version}.tar.gz"; + sha256 = "1qzbwc8dgsvp5jb4faapcrg9npsl11gq8jvhbbk2h7hj52c5lgmv"; + }; + + nativeBuildInputs = [ pkgconfig bmake ]; + + buildInputs = [ + cairo + glib + libevdev + libinput + libxkbcommon + linux-pam + pango + pixman + libucl + wayland + wayland-protocols + wlroots + ]; + + enableParallelBuilding = true; + + # Must replace GNU Make by bmake + buildPhase = with stdenv.lib; concatStringsSep " " ( + [ "bmake" "-j$NIX_BUILD_CORES" "PREFIX=$out" ] + ++ optional stdenv.isLinux "WITH_POSIX_C_SOURCE=YES" + ++ mapAttrsToList (feat: enabled: + optionalString enabled "WITH_${toUpper feat}=YES" + ) features + ); + + # 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. + patchPhase = '' + substituteInPlace Makefile --replace '4555' '555' + ''; + + installPhase = '' + bmake \ + PREFIX=$out \ + install + runHook postInstall + ''; + + meta = with stdenv.lib; { + description = "Stacking Wayland compositor which is actively developed on FreeBSD but also supports Linux"; + homepage = "https://hikari.acmelabs.space"; + license = licenses.bsd2; + platforms = platforms.linux ++ platforms.freebsd; + maintainers = with maintainers; [ jpotier ]; + }; +} |