33 lines
915 B
Nix
33 lines
915 B
Nix
{ lib, fetchgit, goPackages }:
|
|
|
|
with goPackages;
|
|
|
|
buildGoPackage rec {
|
|
name = "syncthing-${version}";
|
|
version = "0.10.22";
|
|
goPackagePath = "github.com/syncthing/syncthing";
|
|
src = fetchgit {
|
|
url = "git://github.com/syncthing/syncthing.git";
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "d96eff0dac5d542388d643f4b9e29ade6f7c52a570a00a48e7b5f81882d719dc";
|
|
};
|
|
|
|
subPackages = [ "cmd/syncthing" ];
|
|
|
|
buildFlagsArray = "-ldflags=-w -X main.Version v${version}";
|
|
|
|
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
|
|
|
|
doCheck = true;
|
|
|
|
dontInstallSrc = true;
|
|
|
|
meta = {
|
|
homepage = http://syncthing.net/;
|
|
description = "Replaces Dropbox and BitTorrent Sync with something open, trustworthy and decentralized";
|
|
license = with lib.licenses; mit;
|
|
maintainers = with lib.maintainers; [ matejc ];
|
|
platforms = with lib.platforms; linux;
|
|
};
|
|
}
|