Add a nix-shell file to create a build environment

This commit is contained in:
meutraa 2021-01-13 13:16:18 +00:00
parent 4bf2923f4e
commit 6c3d590d26
No known key found for this signature in database
GPG key ID: 82664A5F8DAC3400
2 changed files with 37 additions and 0 deletions

31
default.nix Normal file
View file

@ -0,0 +1,31 @@
{ pkgs ? import <nixpkgs> { } }:
let
enableXWayland = false;
version = "4f80fab337f10b4ad2043b834606540895b8df36";
sha256 = "0zsfglyfmzsxf6vkdv999z49v66pwcyffb0pn824ciafwna2408r";
wlroots-git = pkgs.wlroots.overrideAttrs (old: {
version = version;
src = pkgs.fetchFromGitHub {
owner = "swaywm";
repo = "wlroots";
rev = version;
sha256 = sha256;
};
buildInputs = old.buildInputs ++ [ pkgs.libuuid ];
});
in pkgs.mkShell {
name = "dwl-env";
nativeBuildInputs = with pkgs; [ cmake pkg-config ];
buildInputs = with pkgs;
[
libGL
libinput
libxkbcommon
pixman
wayland
wayland-protocols
wlroots-git
xorg.libxcb
] ++ pkgs.lib.optional enableXWayland [ x11 ];
}