about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/udiskie/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/udiskie/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/udiskie/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/udiskie/default.nix b/nixpkgs/pkgs/applications/misc/udiskie/default.nix
new file mode 100644
index 000000000000..87c49a19a196
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/udiskie/default.nix
@@ -0,0 +1,62 @@
+{ lib, fetchFromGitHub, asciidoc-full, gettext
+, gobject-introspection, gtk3, libappindicator-gtk3, libnotify, librsvg
+, udisks2, wrapGAppsHook
+, python3Packages
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "udiskie";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "coldfix";
+    repo = "udiskie";
+    rev = version;
+    sha256 = "0kn5w6bm3rmbszphzbxpjfnkawb2naa230svzkpmh3n6dcdvk4qa";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    asciidoc-full        # For building man page.
+    gobject-introspection
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    librsvg              # required for loading svg icons (udiskie uses svg icons)
+    gobject-introspection
+    libnotify
+    gtk3
+    udisks2
+    libappindicator-gtk3
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
+    docopt
+    pygobject3
+    pyyaml
+  ];
+
+  postBuild = "make -C doc";
+
+  postInstall = ''
+    mkdir -p $out/share/man/man8
+    cp -v doc/udiskie.8 $out/share/man/man8/
+  '';
+
+  checkInputs = with python3Packages; [
+    nose
+    keyutils
+  ];
+
+  checkPhase = ''
+    nosetests
+  '';
+
+  meta = with lib; {
+    description = "Removable disk automounter for udisks";
+    license = licenses.mit;
+    homepage = "https://github.com/coldfix/udiskie";
+    maintainers = with maintainers; [ AndersonTorres ];
+  };
+}