mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:45:58 +01:00
add xwayland disabling support to flake.nix
This commit is contained in:
parent
2342b6a10f
commit
7c6fc3c6ad
3 changed files with 33 additions and 15 deletions
1
Makefile
1
Makefile
|
@ -99,6 +99,7 @@ install:
|
||||||
make all
|
make all
|
||||||
mkdir -p ${PREFIX}/share/wayland-sessions
|
mkdir -p ${PREFIX}/share/wayland-sessions
|
||||||
cp ./example/hyprland.desktop ${PREFIX}/share/wayland-sessions/
|
cp ./example/hyprland.desktop ${PREFIX}/share/wayland-sessions/
|
||||||
|
mkdir -p ${PREFIX}/bin
|
||||||
cp ./build/Hyprland ${PREFIX}/bin
|
cp ./build/Hyprland ${PREFIX}/bin
|
||||||
cp ./hyprctl/hyprctl ${PREFIX}/bin
|
cp ./hyprctl/hyprctl ${PREFIX}/bin
|
||||||
mkdir -p ${PREFIX}/share/hyprland
|
mkdir -p ${PREFIX}/share/hyprland
|
||||||
|
|
42
default.nix
42
default.nix
|
@ -1,13 +1,13 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, src, version, pkg-config, cmake, ninja, libdrm
|
{ lib, stdenv, fetchFromGitHub, src, pkg-config, cmake, ninja, libdrm, libinput
|
||||||
, libinput, libxcb, libxkbcommon, mesa, mount, pango, wayland, wayland-protocols
|
, libxcb, libxkbcommon, mesa, mount, pango, wayland, wayland-protocols
|
||||||
, wayland-scanner, wlroots, xcbutilwm, xwayland, xwaylandSupport ? true }:
|
, wayland-scanner, wlroots, xcbutilwm, xwayland, enableXWayland ? true }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "hyprland";
|
pname = "hyprland";
|
||||||
inherit src version;
|
version = "git";
|
||||||
|
inherit src;
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja pkg-config wayland ]
|
nativeBuildInputs = [ cmake ninja pkg-config wayland xwayland ];
|
||||||
++ lib.optional xwaylandSupport xwayland;
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libdrm
|
libdrm
|
||||||
|
@ -19,14 +19,34 @@ stdenv.mkDerivation {
|
||||||
wayland-protocols
|
wayland-protocols
|
||||||
wayland-scanner
|
wayland-scanner
|
||||||
wlroots
|
wlroots
|
||||||
|
(wlroots.override { inherit enableXWayland; })
|
||||||
xcbutilwm
|
xcbutilwm
|
||||||
];
|
];
|
||||||
|
|
||||||
dontBuild = true;
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]
|
||||||
dontInstall = true;
|
++ lib.optional (!enableXWayland) "-DNO_XWAYLAND=true";
|
||||||
|
|
||||||
postPatch = ''
|
prePatch = ''
|
||||||
make install PREFIX=$out
|
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; {
|
meta = with lib; {
|
||||||
|
|
|
@ -10,13 +10,10 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs, utils, nixpkgs-wayland }:
|
outputs = { self, nixpkgs, utils, nixpkgs-wayland }:
|
||||||
utils.lib.eachDefaultSystem (system:
|
utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
version = "git";
|
|
||||||
in rec {
|
in rec {
|
||||||
packages = {
|
packages = {
|
||||||
hyprland = pkgs.callPackage self {
|
hyprland = pkgs.callPackage self {
|
||||||
inherit version;
|
|
||||||
src = self;
|
src = self;
|
||||||
inherit (nixpkgs-wayland.packages.${system}) wlroots;
|
inherit (nixpkgs-wayland.packages.${system}) wlroots;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue