diff options
author | Lassulus <github@lassul.us> | 2020-06-17 18:30:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 18:30:51 +0200 |
commit | 33bc279247797b88817d5ed83c8514b985c05622 (patch) | |
tree | 2b424f85766a56930dcdae1f230ee8a308950f27 | |
parent | 02c64a4b6342e9bacc4bd258be147dd96c1f9e27 (diff) | |
parent | 2643082af4edab6d76dc1400312105f5735a348e (diff) | |
download | nixlib-33bc279247797b88817d5ed83c8514b985c05622.tar nixlib-33bc279247797b88817d5ed83c8514b985c05622.tar.gz nixlib-33bc279247797b88817d5ed83c8514b985c05622.tar.bz2 nixlib-33bc279247797b88817d5ed83c8514b985c05622.tar.lz nixlib-33bc279247797b88817d5ed83c8514b985c05622.tar.xz nixlib-33bc279247797b88817d5ed83c8514b985c05622.tar.zst nixlib-33bc279247797b88817d5ed83c8514b985c05622.zip |
Merge pull request #89414 from jpotier/add-hikari
hikari: init at 2.0.2
-rw-r--r-- | pkgs/applications/window-managers/hikari/default.nix | 75 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 77 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 000000000000..274c75a3c13c --- /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.0.2"; +in + +stdenv.mkDerivation { + inherit pname version; + + src = fetchzip { + url = "https://hikari.acmelabs.space/releases/${pname}-${version}.tar.gz"; + sha256 = "1a3i01936pw11hrmjmrhzzwpndl1jqjgx376m5m724wd1j9awm68"; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c425032583b8..67ad4717dbfc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20234,6 +20234,8 @@ in pulseSupport = config.pulseaudio or false; }; + hikari = callPackage ../applications/window-managers/hikari { }; + i3 = callPackage ../applications/window-managers/i3 { xcb-util-cursor = if stdenv.isDarwin then xcb-util-cursor-HEAD else xcb-util-cursor; }; |