add flake.nix and other required files for nix build

This commit is contained in:
Tanish2002 2022-05-08 21:57:40 +05:30
parent 434184aa32
commit 857ea43694
6 changed files with 314 additions and 1 deletions

42
default.nix Normal file
View file

@ -0,0 +1,42 @@
{ 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 }:
stdenv.mkDerivation {
pname = "hyprland";
inherit src version;
nativeBuildInputs = [ cmake ninja pkg-config wayland ]
++ lib.optional xwaylandSupport xwayland;
buildInputs = [
libdrm
libinput
libxcb
libxkbcommon
mesa
pango
wayland-protocols
wayland-scanner
wlroots
xcbutilwm
];
dontBuild = true;
dontInstall = true;
patches = [ ./fix-makefile.diff ];
postPatch = ''
mkdir -p $out/bin
make install PREFIX=$out
'';
meta = with lib; {
homepage = "https://github.com/vaxerski/Hyprland";
description =
"A dynamic tiling Wayland compositor that doesn't sacrifice on its looks";
license = licenses.bsd3;
platforms = platforms.linux;
};
}