2016-07-27 17:27:14 +03:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "syncthing-inotify-${version}";
|
2017-06-16 03:01:27 +03:00
|
|
|
version = "0.8.6";
|
2016-07-27 17:27:14 +03:00
|
|
|
|
|
|
|
goPackagePath = "github.com/syncthing/syncthing-inotify";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-02-11 10:21:03 +03:00
|
|
|
owner = "syncthing";
|
|
|
|
repo = "syncthing-inotify";
|
|
|
|
rev = "v${version}";
|
2017-06-16 03:01:27 +03:00
|
|
|
sha256 = "0z1zpb7av4q5nj2d4yda9jcbjdz4yj3823c29y73yf0gfp26lppl";
|
2016-07-27 17:27:14 +03:00
|
|
|
};
|
|
|
|
|
2016-09-10 13:04:13 +03:00
|
|
|
goDeps = ./inotify-deps.nix;
|
2016-07-27 17:27:14 +03:00
|
|
|
|
2016-09-26 10:40:21 +03:00
|
|
|
postInstall = ''
|
2017-05-09 15:58:17 +03:00
|
|
|
mkdir -p $bin/lib/systemd/{system,user}
|
2016-09-26 10:40:21 +03:00
|
|
|
|
|
|
|
substitute $src/etc/linux-systemd/system/syncthing-inotify@.service \
|
2017-05-09 15:58:17 +03:00
|
|
|
$bin/lib/systemd/system/syncthing-inotify@.service \
|
2016-09-26 10:40:21 +03:00
|
|
|
--replace /usr/bin/syncthing-inotify $bin/bin/syncthing-inotify
|
|
|
|
|
|
|
|
substitute $src/etc/linux-systemd/user/syncthing-inotify.service \
|
2017-05-09 15:58:17 +03:00
|
|
|
$bin/lib/systemd/user/syncthing-inotify.service \
|
2016-09-26 10:40:21 +03:00
|
|
|
--replace /usr/bin/syncthing-inotify $bin/bin/syncthing-inotify
|
2016-11-01 15:54:21 +03:00
|
|
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
install_name_tool -delete_rpath $out/lib -add_rpath $bin $bin/bin/syncthing-inotify
|
2016-09-26 10:40:21 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2016-07-27 17:27:14 +03:00
|
|
|
homepage = https://github.com/syncthing/syncthing-inotify;
|
|
|
|
description = "File watcher intended for use with Syncthing";
|
2016-09-26 10:40:21 +03:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ joko peterhoeg ];
|
|
|
|
platforms = platforms.unix;
|
2016-07-27 17:27:14 +03:00
|
|
|
};
|
|
|
|
}
|