about summary refs log tree commit diff
path: root/pkgs/dockd/default.nix
blob: ada258f430504852e587bbc971045387212bbe56 (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.3";

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

  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.";
  };
}