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