about summary refs log tree commit diff
path: root/pkgs/larbs/dwmblocks/default.nix
blob: 3277cc05360600e740f8a844a3d797078a469db7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchgit, libX11, config_h ? null, patches ? [] }:

with stdenv.lib;

stdenv.mkDerivation rec {
  name = "dwmblocks";

  src = fetchgit {
    url = "https://github.com/LukeSmithXYZ/dwmblocks";
    rev = "78925115014bea2f4ead26f0dd7f833ff301ad11";
    sha256 = "0239wzydn63964yp69sqdb4q71jcjbvl5gd4y4l46nz8ckk6xnng";
  };

  inherit patches;

  buildInputs = [ libX11 ];

  prePatch = ''
    ${stdenv.lib.optionalString (config_h) "cp ${config_h} config.h"}
  '';

  installPhase = ''
    make install PREFIX=$out
  '';

  meta = {
    homepage = "https://github.com/LukeSmithXYZ/dwmblocks";
    description = "Luke's build of dwmblocks";
    license = licenses.mit;
    platforms = platforms.linux;
  };
}