Files
dwl/flake.nix
Vegard Bieker Matthey e5cf8e2e3e overlays
Reviewed-on: #1
Co-authored-by: Vegard Bieker Matthey <VegardMatthey@protonmail.com>
Co-committed-by: Vegard Bieker Matthey <VegardMatthey@protonmail.com>
2026-03-11 05:42:36 +01:00

69 lines
1.4 KiB
Nix

{
description = "A flake for dwl";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{
self,
nixpkgs,
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
nativeBuildInputs = with pkgs; [
tinycc
gnumake
pkg-config
wayland-protocols
];
buildInputs = with pkgs; [
wayland-scanner
wlroots
libinput
wayland
libxkbcommon
pixman
];
inherit (pkgs) lib;
in
{
devShells.${system}.default =
with pkgs;
mkShell {
inherit buildInputs nativeBuildInputs;
};
packages.${system} =
let
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./Makefile
./client.h
./config.def.h
./config.mk
./dwl.c
./dwl.1
./dwl.desktop
./protocols
./util.c
./util.h
];
};
in
{
default = pkgs.callPackage ./package.nix { inherit src buildInputs nativeBuildInputs; };
};
overlays = {
default = self.overlays.dwl;
dwl = final: prev: {
inherit (self.packages.${prev.stdenv.hostPlatform.system}) default;
};
};
};
}