about summary refs log tree commit diff
path: root/pkgs/dockd/default.nix
blob: 6e14a89914500945397e7c79c5a957ecd1452f23 (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, callPackage, cmake, libXrandr }:
let
  libthinkpad = callPackage ../libthinkpad {};
in

stdenv.mkDerivation rec {
  pname = "dockd";
  version = "1.21";

  src = fetchgit {
    url = "https://github.com/libthinkpad/dockd";
    rev = version;
    sha256 = "1fr9r19b04ac92ynz62rnzgc6jfzxrf76k3m6szspgw7sx9rhjc2";
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [ libthinkpad libXrandr ];

  postPatch = ''
    sed -i '/etc/d' CMakeLists.txt
  '';

  buildPhase = ''
    cmake . -DCMAKE_INSTALL_PREFIX=$out
    make
  '';

  meta = {
    homepage = "https://github.com/libthinkpad/dockd";
    description = "Lenovo ThinkPad Dock Management Daemon.";
  };
}