From 807cde6533659d8ede806345bfc3803245a75512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ab=C3=ADlio=20Costa?= Date: Thu, 3 Oct 2024 23:14:59 +0100 Subject: [PATCH] Add Nix dev env instructions --- Development-Setup.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Development-Setup.md b/Development-Setup.md index a50a58e..5c99587 100644 --- a/Development-Setup.md +++ b/Development-Setup.md @@ -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). +## 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 You can build and run sway directly without installing it. A subproject allows to easily work on wlroots and sway at the same time.