evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / dw / dwmblocks / package.nix
blob91e08995c9af03c8c2e13fd37ca658923d8fe376
1 { lib, stdenv, fetchFromGitHub, libX11, patches ? [ ], writeText, conf ? null }:
3 stdenv.mkDerivation {
4   pname = "dwmblocks";
5   version = "0-unstable-2024-08-24";
7   src = fetchFromGitHub {
8     owner = "torrinfail";
9     repo = "dwmblocks";
10     rev = "8cedd220684064f1433749ed2a19a6184c22cf07";
11     hash = "sha256-QtYQB2mvw1k2LA8D+/cVnA8+GRDWjhIM6rxfi/IGjEw=";
12   };
14   buildInputs = [ libX11 ];
16   inherit patches;
18   postPatch =
19     let
20       configFile =
21         if lib.isDerivation conf || builtins.isPath conf
22         then conf else writeText "blocks.def.h" conf;
23     in
24       lib.optionalString (conf != null) "cp ${configFile} blocks.def.h";
26   makeFlags = [ "PREFIX=$(out)" ];
28   meta = with lib; {
29     description = "Modular status bar for dwm written in c";
30     homepage = "https://github.com/torrinfail/dwmblocks";
31     license = licenses.isc;
32     maintainers = with maintainers; [ sophrosyne ];
33     platforms = platforms.linux;
34     mainProgram = "dwmblocks";
35   };