mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-26 17:54:14 +00:00
Add a nix-shell file to create a build environment
This commit is contained in:
parent
4bf2923f4e
commit
6c3d590d26
@ -41,6 +41,12 @@ dwl has only two dependencies: wlroots-git and wayland-protocols. Simply install
|
||||
|
||||
To enable XWayland, you should also install xorg-xwayland and uncomment its flag in `config.mk`.
|
||||
|
||||
### Nix
|
||||
|
||||
If `config.mk` has the xwayland flag, set `enableXWayland` to `true` in `default.nix`.
|
||||
|
||||
Run `nix-shell --pure` to enter the shell, and then `make` to build dwl.
|
||||
|
||||
## Configuration
|
||||
|
||||
All configuration is done by editing `config.h` and recompiling, in the same manner as dwm. There is no way to separately restart the window manager in Wayland without restarting the entire display server, so any changes will take effect the next time dwl is executed.
|
||||
|
||||
31
default.nix
Normal file
31
default.nix
Normal 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 ];
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user