nixpkgs/pkgs/applications/networking/syncthing/default.nix

33 lines
915 B
Nix
Raw Normal View History

2015-02-05 13:12:10 +01:00
{ lib, fetchgit, goPackages }:
2015-02-05 13:12:10 +01:00
with goPackages;
buildGoPackage rec {
name = "syncthing-${version}";
2015-08-18 08:15:37 +02:00
version = "0.11.20";
2015-02-05 13:12:10 +01:00
goPackagePath = "github.com/syncthing/syncthing";
src = fetchgit {
2015-01-06 09:24:48 +01:00
url = "git://github.com/syncthing/syncthing.git";
rev = "refs/tags/v${version}";
2015-08-18 08:15:37 +02:00
sha256 = "72092f2bfaaeb8c7c9264200f7d08c5e78f670f80a018dd70477c23c0fd88619";
};
2015-02-05 13:12:10 +01:00
subPackages = [ "cmd/syncthing" ];
2015-02-05 13:12:10 +01:00
buildFlagsArray = "-ldflags=-w -X main.Version v${version}";
2015-02-05 13:12:10 +01:00
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
2015-02-05 13:12:10 +01:00
doCheck = true;
dontInstallSrc = true;
meta = {
homepage = http://syncthing.net/;
description = "Replaces Dropbox and BitTorrent Sync with something open, trustworthy and decentralized";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ matejc theuni ];
platforms = with lib.platforms; unix;
};
}