1{ lib, stdenv, fetchFromGitHub, pkg-config, dbus, libnotify, udisks2, gdk-pixbuf }:
2
3stdenv.mkDerivation {
4 pname = "usermount";
5 version = "0.1";
6
7 src = fetchFromGitHub {
8 owner = "tom5760";
9 repo = "usermount";
10 rev = "0d6aba3c1f8fec80de502f5b92fd8b28041cc8e4";
11 sha256 = "sha256-giMHUVYdAygiemYru20VxpQixr5aGgHhevNkHvkG9z4=";
12 };
13
14 nativeBuildInputs = [ pkg-config ];
15 buildInputs = [ dbus libnotify udisks2 gdk-pixbuf ];
16
17 env.NIX_CFLAGS_COMPILE = "-DENABLE_NOTIFICATIONS";
18
19 installPhase = ''
20 mkdir -p $out/bin
21 mv usermount $out/bin/
22 '';
23
24 meta = {
25 homepage = "https://github.com/tom5760/usermount";
26 description = "A simple tool to automatically mount removable drives using UDisks2 and D-Bus";
27 license = lib.licenses.mit;
28 platforms = lib.platforms.linux;
29 };
30}