about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-09-11 09:08:35 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-09-11 09:08:35 +0200
commit08791bd26b86a0f3017b6db5d4f3ad7d9b4a83a8 (patch)
tree1c326f97537b7fbaa7042642f287244f93bf760b
parent886c700429684ecb56846314494c5d995d60b6f4 (diff)
downloadpnpkgs-08791bd26b86a0f3017b6db5d4f3ad7d9b4a83a8.tar.gz
pnpkgs-08791bd26b86a0f3017b6db5d4f3ad7d9b4a83a8.zip
Add dockd
-rw-r--r--default.nix1
-rw-r--r--pkgs/dockd/default.nix32
2 files changed, 33 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 2d37a58..0e41fac 100644
--- a/default.nix
+++ b/default.nix
@@ -22,6 +22,7 @@
   mutt-wizard = pkgs.callPackage ./pkgs/mutt-wizard { };
   xwallpaper = pkgs.callPackage ./pkgs/xwallpaper { };
   libthinkpad = pkgs.callPackage ./pkgs/libthinkpad { };
+  dockd = pkgs.callPackage ./pkgs/dockd { };
   # xcb-util = pkgs.callPackage ./pkgs/xcb-util { }; #unknown error
   # amfora = pkgs.callPackage ./pkgs/amfora { };
   # ...
diff --git a/pkgs/dockd/default.nix b/pkgs/dockd/default.nix
new file mode 100644
index 0000000..6e14a89
--- /dev/null
+++ b/pkgs/dockd/default.nix
@@ -0,0 +1,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.";
+  };
+}