Merge pull request #5599 from brendanlong/syncthing-0.10.17
syncthing: Update to 0.10.17
This commit is contained in:
commit
c8d5a73f67
@ -1,33 +1,35 @@
|
|||||||
{ stdenv, fetchurl, fetchgit, go }:
|
{ stdenv, fetchgit, go }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "syncthing-${version}";
|
name = "syncthing-${version}";
|
||||||
version = "0.8.15";
|
version = "0.10.17";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "git://github.com/calmh/syncthing.git";
|
url = "git://github.com/syncthing/syncthing.git";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
sha256 = "0xv8kaji60zqxws72srh5hdi9fyvaipdcsawp6gcyahhr3cz0ddq";
|
sha256 = "1hv0va7234rgyahn8xvpyj1bsbmn7ifsyqm7b3ghhybinclghp1w";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ go ];
|
buildInputs = [ go ];
|
||||||
|
|
||||||
buildPhase = ''
|
patches = [
|
||||||
mkdir -p "./dependencies/src/github.com/calmh/syncthing"
|
# Remove when Go 1.4 is available in Nix, or when this pull request is released:
|
||||||
|
# https://github.com/syncthing/syncthing/pull/1183
|
||||||
|
./fix-go-1.4-range.patch
|
||||||
|
];
|
||||||
|
|
||||||
for a in auto buffers cid discover files lamport protocol scanner \
|
buildPhase = ''
|
||||||
logger beacon config xdr upnp model osutil versioner; do
|
mkdir -p "./dependencies/src/github.com/syncthing/syncthing"
|
||||||
cp -r "./$a" "./dependencies/src/github.com/calmh/syncthing"
|
cp -r internal "./dependencies/src/github.com/syncthing/syncthing"
|
||||||
done
|
|
||||||
|
|
||||||
export GOPATH="`pwd`/Godeps/_workspace:`pwd`/dependencies"
|
export GOPATH="`pwd`/Godeps/_workspace:`pwd`/dependencies"
|
||||||
|
|
||||||
go test -cpu=1,2,4 ./...
|
# Tests can't be run in parallel because TestPredictableRandom relies on global state
|
||||||
|
go run build.go test
|
||||||
|
|
||||||
mkdir ./bin
|
mkdir ./bin
|
||||||
|
|
||||||
go build -o ./bin/syncthing -ldflags "-w -X main.Version v${version}" ./cmd/syncthing
|
go build -o ./bin/syncthing -ldflags "-w -X main.Version v${version}" ./cmd/syncthing
|
||||||
go build -o ./bin/stcli -ldflags "-w -X main.Version v${version}" ./cmd/stcli
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/internal/model/queue_test.go b/internal/model/queue_test.go
|
||||||
|
index 3745664..96aaf38 100644
|
||||||
|
--- a/internal/model/queue_test.go
|
||||||
|
+++ b/internal/model/queue_test.go
|
||||||
|
@@ -191,7 +191,7 @@ func BenchmarkJobQueuePushPopDone10k(b *testing.B) {
|
||||||
|
for _, f := range files {
|
||||||
|
q.Push(f.Name)
|
||||||
|
}
|
||||||
|
- for range files {
|
||||||
|
+ for _ = range files {
|
||||||
|
n, _ := q.Pop()
|
||||||
|
q.Done(n)
|
||||||
|
}
|
||||||
|
--
|
Loading…
x
Reference in New Issue
Block a user