From 10891bb3294f6d5e60f9f0db6bfeef91a0c41648 Mon Sep 17 00:00:00 2001 From: Ottatop Date: Sat, 13 Apr 2024 14:41:23 -0500 Subject: [PATCH] nix: add some flake dependencies ayo hope i didn't break anything --- README.md | 3 +++ flake.nix | 42 +++++++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 68f4855..c6e0b80 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,9 @@ You will need: - NixOS: There is flake [`flake.nix`](flake.nix) with a devShell. It also includes the other tools needed for the build and sets up the `LD_LIBRARY_PATH` so the dynamically loaded libraries are found. + > [!NOTE] + > The Lua API currently does not work due to some shenanigans with Luarocks and openssl directories. + > Fix soon, hopefully. In the meantime you can use the Rust API. - [protoc](https://grpc.io/docs/protoc-installation/), the Protocol Buffer Compiler, for configuration - Arch: ```sh diff --git a/flake.nix b/flake.nix index 85320a1..ef001ce 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = " A WIP Smithay-based Wayland compositor, inspired by AwesomeWM and configured in Lua or Rust"; + description = "A WIP Smithay-based Wayland compositor, inspired by AwesomeWM and configured in Lua or Rust"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; @@ -34,25 +34,41 @@ in { devShell = pkgs.mkShell { - buildInputs = [ + nativeBuildInputs = [ + pkgs.pkg-config + ]; + buildInputs = with pkgs; [ # rust devel tools combinedToolchain - pkgs.rust-analyzer - pkgs.cargo-outdated + rust-analyzer + cargo-outdated + + wayland # build time stuff - pkgs.pkg-config - pkgs.protobuf - pkgs.luarocks + protobuf + lua54Packages.luarocks # libs - pkgs.seatd.dev - pkgs.systemdLibs.dev - pkgs.libxkbcommon - pkgs.libinput - pkgs.mesa + seatd.dev + systemdLibs.dev + libxkbcommon + libinput + mesa + + # winit on x11 + xorg.libXcursor + xorg.libXrandr + xorg.libXi + xorg.libX11 ]; - LD_LIBRARY_PATH = "${pkgs.wayland}/lib:${pkgs.libGL}/lib"; + runtimeDependencies = with pkgs; [ + wayland + mesa + libglvnd # libEGL + xwayland + ]; + LD_LIBRARY_PATH = "${pkgs.wayland}/lib:${pkgs.libGL}/lib:${pkgs.libxkbcommon}/lib"; }; } );