Add Nix dev env instructions

Abílio Costa 2024-10-03 23:14:59 +01:00
parent a701f3fc09
commit 807cde6533

@ -47,6 +47,13 @@ dnf install -y git gcc meson ninja-build wayland-devel mesa-libEGL-devel mesa-li
Look at the package list in [Sway CI manifest](https://github.com/swaywm/sway/blob/master/.builds/freebsd.yml). Look at the package list in [Sway CI manifest](https://github.com/swaywm/sway/blob/master/.builds/freebsd.yml).
## Nix
A simple way to get all the needed packages is to use `nix-shell`. Note that packages should come from `nixpkgs-unstable`, and nix default hardening should be disabled:
```sh
nix-shell -p cairo gdk-pixbuf glslang hwdata json_c lcms libGL mesa libcap libdisplay-info libdrm libevdev libinput libliftoff libxkbcommon meson ninja pango pcre2 pixman pkg-config scdoc seatd tree vulkan-loader wayland wayland-protocols wayland-scanner xorg.xcbutilerrors xorg.xcbutilrenderutil xorg.xcbutilwm xwayland -I nixpkgs=http://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz --command "export NIX_HARDENING_ENABLE=; return"
```
# Compiling as a subproject # Compiling as a subproject
You can build and run sway directly without installing it. A subproject allows to easily work on wlroots and sway at the same time. You can build and run sway directly without installing it. A subproject allows to easily work on wlroots and sway at the same time.