git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #5599 from brendanlong/syncthing-0.10.17

syncthing: Update to 0.10.17

commitc8d5a73f67776f71ea5e44bfd031d1d90f771862 authorDomen Kožar <domen@dev.si> dateTue 6 Jan 2015, 11:23 (12 years ago) parentfb508b69d23d09
2 files changed+28−12
pkgs/applications/networking/syncthing/default.nix+14−12 pkgs/applications/networking/syncthing/fix-go-1.4-range.patch+14
pkgs/applications/networking/syncthing/default.nix+14−12
@@ -1,33 +1,35 @@
1−{ stdenv, fetchurl, fetchgit, go }:
1+{ stdenv, fetchgit, go }:
22
33stdenv.mkDerivation rec {
44 name = "syncthing-${version}";
5− version = "0.8.15";
5+ version = "0.10.17";
66
77 src = fetchgit {
8− url = "git://github.com/calmh/syncthing.git";
8+ url = "git://github.com/syncthing/syncthing.git";
99 rev = "refs/tags/v${version}";
10− sha256 = "0xv8kaji60zqxws72srh5hdi9fyvaipdcsawp6gcyahhr3cz0ddq";
10+ sha256 = "1hv0va7234rgyahn8xvpyj1bsbmn7ifsyqm7b3ghhybinclghp1w";
1111 };
1212
1313 buildInputs = [ go ];
1414
15− buildPhase = ''
16− mkdir -p "./dependencies/src/github.com/calmh/syncthing"
15+ patches = [
16+ # Remove when Go 1.4 is available in Nix, or when this pull request is released:
17+ # https://github.com/syncthing/syncthing/pull/1183
18+ ./fix-go-1.4-range.patch
19+ ];
1720
18− for a in auto buffers cid discover files lamport protocol scanner \
19− logger beacon config xdr upnp model osutil versioner; do
20− cp -r "./$a" "./dependencies/src/github.com/calmh/syncthing"
21− done
21+ buildPhase = ''
22+ mkdir -p "./dependencies/src/github.com/syncthing/syncthing"
23+ cp -r internal "./dependencies/src/github.com/syncthing/syncthing"
2224
2325 export GOPATH="`pwd`/Godeps/_workspace:`pwd`/dependencies"
2426
25− go test -cpu=1,2,4 ./...
27+ # Tests can't be run in parallel because TestPredictableRandom relies on global state
28+ go run build.go test
2629
2730 mkdir ./bin
2831
2932 go build -o ./bin/syncthing -ldflags "-w -X main.Version v${version}" ./cmd/syncthing
30− go build -o ./bin/stcli -ldflags "-w -X main.Version v${version}" ./cmd/stcli
3133 '';
3234
3335 installPhase = ''
pkgs/applications/networking/syncthing/fix-go-1.4-range.patchnew file+14
@@ -0,0 +1,14 @@
1+diff --git a/internal/model/queue_test.go b/internal/model/queue_test.go
2+index 3745664..96aaf38 100644
3+--- a/internal/model/queue_test.go
4++++ b/internal/model/queue_test.go
5+@@ -191,7 +191,7 @@ func BenchmarkJobQueuePushPopDone10k(b *testing.B) {
6+ for _, f := range files {
7+ q.Push(f.Name)
8+ }
9+- for range files {
10++ for _ = range files {
11+ n, _ := q.Pop()
12+ q.Done(n)
13+ }
14+--