ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / dw / dwlb / package.nix
blob1c3354d54f0254adc54e162937bc92d9761101e1
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   pkg-config,
6   wayland,
7   wayland-scanner,
8   wayland-protocols,
9   unstableGitUpdater,
10   pixman,
11   fcft,
12   writeText,
13   # Boolean flags
14   withCustomConfigH ? (configH != null),
15   # Configurable options
16   configH ? null,
19 stdenv.mkDerivation {
20   pname = "dwlb";
21   version = "0-unstable-2024-05-16";
23   src = fetchFromGitHub {
24     owner = "kolunmi";
25     repo = "dwlb";
26     rev = "0daa1c1fdd82c4d790e477bf171e23ca2fdfa0cb";
27     hash = "sha256-Bu20IqRwBP1WRBgbcEQU4Q2BZ2FBnVaySOTsCn0iSSE=";
28   };
30   nativeBuildInputs = [
31     pkg-config
32   ];
34   buildInputs = [
35     wayland-scanner
36     wayland-protocols
37     pixman
38     fcft
39     wayland
40   ];
42   # Allow alternative config.def.h usage. Taken from dwl.nix.
43   postPatch =
44     let
45       configFile =
46         if lib.isDerivation configH || builtins.isPath configH then
47           configH
48         else
49           writeText "config.h" configH;
50     in
51     lib.optionalString withCustomConfigH "cp ${configFile} config.h";
53   env = {
54     PREFIX = placeholder "out";
55   };
57   outputs = [
58     "out"
59     "man"
60   ];
62   passthru.updateScript = unstableGitUpdater { };
64   meta = {
65     description = "Fast, feature-complete bar for dwl";
66     homepage = "https://github.com/kolunmi/dwlb";
67     license = lib.licenses.gpl3Plus;
68     mainProgram = "dwlb";
69     maintainers = with lib.maintainers; [
70       bot-wxt1221
71       lonyelon
72     ];
73     platforms = wayland.meta.platforms;
74   };