From 3d77c18c645f6b3e9f8de54d571ab5d616a51bd4 Mon Sep 17 00:00:00 2001 From: speckitor Date: Tue, 20 Jan 2026 23:55:27 +0700 Subject: [PATCH] flake.nix --- Makefile | 2 +- flake.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 flake.nix diff --git a/Makefile b/Makefile index c26363e..f600050 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: compile proto: - wayland-scanner server-header /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h + wayland-scanner server-header $(shell pkg-config --variable=pkgdatadir wayland-protocols)/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h compile: proto gcc -o absinthe src/* \ diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2a22f19 --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + description = "Absinthe wayland compositor"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + system = "x86_64_linux"; + pkgs = import nixpkgs { inherit system; }; + in + { + devShells.${system}.default = pkgs.mkShell { + packages = with pkgs; [ + pkg-config + gnumake + gcc + wayland + wayland-protocols + wayland-scanner + wlroots_0_19 + pixman + libxkbcommon + ]; + }; + }; +}