diff options
author | Tanish2002 <[email protected]> | 2022-05-08 23:48:13 +0530 |
---|---|---|
committer | Tanish2002 <[email protected]> | 2022-05-08 23:48:13 +0530 |
commit | 7c6fc3c6ad0537888265fb2e3a4e1455d90a68d2 (patch) | |
tree | d26d2a68cd95bca3686709465386842b4c456022 | |
parent | 2342b6a10f1f7d238e60a4ff1c33a0ab0dee0e39 (diff) | |
download | Hyprland-7c6fc3c6ad0537888265fb2e3a4e1455d90a68d2.tar.gz Hyprland-7c6fc3c6ad0537888265fb2e3a4e1455d90a68d2.zip |
add xwayland disabling support to flake.nix
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | default.nix | 42 | ||||
-rw-r--r-- | flake.nix | 5 |
3 files changed, 33 insertions, 15 deletions
@@ -99,6 +99,7 @@ install: make all mkdir -p ${PREFIX}/share/wayland-sessions cp ./example/hyprland.desktop ${PREFIX}/share/wayland-sessions/ + mkdir -p ${PREFIX}/bin cp ./build/Hyprland ${PREFIX}/bin cp ./hyprctl/hyprctl ${PREFIX}/bin mkdir -p ${PREFIX}/share/hyprland diff --git a/default.nix b/default.nix index b958c3e2..6b08017c 100644 --- a/default.nix +++ b/default.nix @@ -1,13 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, src, version, pkg-config, cmake, ninja, libdrm -, libinput, libxcb, libxkbcommon, mesa, mount, pango, wayland, wayland-protocols -, wayland-scanner, wlroots, xcbutilwm, xwayland, xwaylandSupport ? true }: +{ lib, stdenv, fetchFromGitHub, src, pkg-config, cmake, ninja, libdrm, libinput +, libxcb, libxkbcommon, mesa, mount, pango, wayland, wayland-protocols +, wayland-scanner, wlroots, xcbutilwm, xwayland, enableXWayland ? true }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "hyprland"; - inherit src version; + version = "git"; + inherit src; - nativeBuildInputs = [ cmake ninja pkg-config wayland ] - ++ lib.optional xwaylandSupport xwayland; + nativeBuildInputs = [ cmake ninja pkg-config wayland xwayland ]; buildInputs = [ libdrm @@ -19,14 +19,34 @@ stdenv.mkDerivation { wayland-protocols wayland-scanner wlroots + (wlroots.override { inherit enableXWayland; }) xcbutilwm ]; - dontBuild = true; - dontInstall = true; + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ] + ++ lib.optional (!enableXWayland) "-DNO_XWAYLAND=true"; - postPatch = '' - make install PREFIX=$out + prePatch = '' + make config + ''; + + postBuild = '' + pushd ../hyprctl + make all + popd + ''; + + installPhase = '' + cd ../ + mkdir -p $out/share/wayland-sessions + cp ./example/hyprland.desktop $out/share/wayland-sessions/ + mkdir -p $out/bin + cp ./build/Hyprland $out/bin + cp ./hyprctl/hyprctl $out/bin + mkdir -p $out/share/hyprland + cp ./assets/wall_2K.png $out/share/hyprland + cp ./assets/wall_4K.png $out/share/hyprland + cp ./assets/wall_8K.png $out/share/hyprland ''; meta = with lib; { @@ -10,13 +10,10 @@ outputs = { self, nixpkgs, utils, nixpkgs-wayland }: utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - version = "git"; + let pkgs = nixpkgs.legacyPackages.${system}; in rec { packages = { hyprland = pkgs.callPackage self { - inherit version; src = self; inherit (nixpkgs-wayland.packages.${system}) wlroots; }; |