summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPaul Hendry <paul@pshendry.com>2016-05-30 01:15:58 -0700
committerFranz Pletz <fpletz@fnordicwalking.de>2016-05-30 10:15:58 +0200
commit8ea1f2d36cef8060e66f2d8a8d367672d2e3c027 (patch)
tree414426f7e42a3bf57c67ea2efe9590ef9b0868e7 /pkgs
parentdd2bb96dbe44a98f247bdd4a2effebe6560522b7 (diff)
downloadnixpkgs-8ea1f2d36cef8060e66f2d8a8d367672d2e3c027.tar
nixpkgs-8ea1f2d36cef8060e66f2d8a8d367672d2e3c027.tar.gz
nixpkgs-8ea1f2d36cef8060e66f2d8a8d367672d2e3c027.tar.bz2
nixpkgs-8ea1f2d36cef8060e66f2d8a8d367672d2e3c027.tar.lz
nixpkgs-8ea1f2d36cef8060e66f2d8a8d367672d2e3c027.tar.xz
nixpkgs-8ea1f2d36cef8060e66f2d8a8d367672d2e3c027.tar.zst
nixpkgs-8ea1f2d36cef8060e66f2d8a8d367672d2e3c027.zip
syncthing: 0.12.25 -> 0.13.4 (#15730)
* Rename v0.12.25 package from 'syncthing' to 'syncthing012'
* Remove syncthing011
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/syncthing/default.nix40
-rw-r--r--pkgs/top-level/all-packages.nix5
-rw-r--r--pkgs/top-level/go-packages.nix33
3 files changed, 47 insertions, 31 deletions
diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix
new file mode 100644
index 00000000000..3de4133e794
--- /dev/null
+++ b/pkgs/applications/networking/syncthing/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchgit, go }:
+
+stdenv.mkDerivation rec {
+  version = "0.13.4";
+  name = "syncthing-${version}";
+
+  src = fetchgit {
+    url = https://github.com/syncthing/syncthing;
+    rev = "refs/tags/v${version}";
+    sha256 = "0aa0nqi0gmka5r5dzph4g51jlsy7w5q4ri8f4gy3qnma4pgp7pg2";
+  };
+
+  buildInputs = [ go ];
+
+  buildPhase = ''
+    mkdir -p src/github.com/syncthing
+    ln -s $(pwd) src/github.com/syncthing/syncthing
+    export GOPATH=$(pwd)
+    # Required for Go 1.5, can be removed for Go 1.6+
+    export GO15VENDOREXPERIMENT=1
+
+    # Syncthing's build.go script expects this working directory
+    cd src/github.com/syncthing/syncthing
+
+    go run build.go -no-upgrade -version v${version} install all
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp bin/* $out/bin
+  '';
+
+  meta = {
+    homepage = https://www.syncthing.net/;
+    description = "Open Source Continuous File Synchronization";
+    license = stdenv.lib.licenses.mpl20;
+    maintainers = with stdenv.lib.maintainers; [pshendry];
+    platforms = with stdenv.lib.platforms; linux ++ freebsd ++ openbsd ++ netbsd;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f721fdfdf88..29f1b0c529a 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14229,8 +14229,9 @@ in
 
   symlinks = callPackage ../tools/system/symlinks { };
 
-  syncthing = go15Packages.syncthing.bin // { outputs = [ "bin" ]; };
-  syncthing011 = go15Packages.syncthing011.bin // { outputs = [ "bin" ]; };
+  syncthing = callPackage ../applications/networking/syncthing { };
+
+  syncthing012 = go15Packages.syncthing012.bin // { outputs = [ "bin" ]; };
 
   # linux only by now
   synergy = callPackage ../applications/misc/synergy { };
diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix
index 98d4debbf11..e95622c053d 100644
--- a/pkgs/top-level/go-packages.nix
+++ b/pkgs/top-level/go-packages.nix
@@ -3716,7 +3716,7 @@ let
     sha256 = "094ksr2nlxhvxr58nbnzzk0prjskb21r86jmxqjr3rwg4rkwn6d4";
   };
 
-  syncthing = buildFromGitHub rec {
+  syncthing012 = buildFromGitHub rec {
     version = "0.12.25";
     rev = "v${version}";
     owner = "syncthing";
@@ -3734,30 +3734,14 @@ let
     '';
   };
 
-  syncthing011 = buildFromGitHub rec {
-    version = "0.11.26";
-    rev = "v${version}";
-    owner = "syncthing";
-    repo = "syncthing";
-    sha256 = "0c0dcvxrvjc84dvrsv90790aawkmavsj9bwp8c6cd6wrwj3cp9lq";
-    buildInputs = [
-      go-lz4 du luhn xdr snappy ratelimit osext syncthing-protocol011
-      goleveldb suture qart crypto net text
-    ];
-    postPatch = ''
-      # Mostly a cosmetic change
-      sed -i 's,unknown-dev,${version},g' cmd/syncthing/main.go
-    '';
-  };
-
   syncthing-lib = buildFromGitHub {
-    inherit (syncthing) rev owner repo sha256;
+    inherit (syncthing012) rev owner repo sha256;
     subPackages = [ "lib/sync" ];
-    propagatedBuildInputs = syncthing.buildInputs;
+    propagatedBuildInputs = syncthing012.buildInputs;
   };
 
   syncthing-protocol = buildFromGitHub {
-    inherit (syncthing) rev owner repo sha256;
+    inherit (syncthing012) rev owner repo sha256;
     subPackages = [ "lib/protocol" ];
     propagatedBuildInputs = [
       go-lz4
@@ -3767,15 +3751,6 @@ let
       text ];
   };
 
-  syncthing-protocol011 = buildFromGitHub {
-    rev = "84365882de255d2204d0eeda8dee288082a27f98";
-    version = "2015-08-28";
-    owner = "syncthing";
-    repo = "protocol";
-    sha256 = "07xjs43lpd51pc339f8x487yhs39riysj3ifbjxsx329kljbflwx";
-    propagatedBuildInputs = [ go-lz4 logger luhn xdr text ];
-  };
-
   tablewriter = buildFromGitHub {
     rev    = "cca8bbc0798408af109aaaa239cbd2634846b340";
     version = "2016-01-15";