73 lines
1.5 KiB
Nix
73 lines
1.5 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: {
|
|
pkgs = prev.pkgs ++ [
|
|
(dwl-final: dwl-prev: {
|
|
dwl = dwl-final.callPackage ./package.nix { };
|
|
})
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|