summary refs log tree commit diff
path: root/pkgs/applications/misc/perkeep/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/perkeep/default.nix')
-rw-r--r--pkgs/applications/misc/perkeep/default.nix66
1 files changed, 13 insertions, 53 deletions
diff --git a/pkgs/applications/misc/perkeep/default.nix b/pkgs/applications/misc/perkeep/default.nix
index 9ecf0da5806..8804e438b7e 100644
--- a/pkgs/applications/misc/perkeep/default.nix
+++ b/pkgs/applications/misc/perkeep/default.nix
@@ -1,72 +1,32 @@
-{ stdenv, go, fetchzip, git, fetchFromGitHub, fetchgit }:
+{ buildGo110Package, fetchzip, lib }:
 
-# When perkeep is updated all deps in the let block should be removed
-let
-  gopherjs = fetchFromGitHub {
-    owner = "gopherjs";
-    repo = "gopherjs";
-    # Rev matching https://github.com/perkeep/perkeep/commit/2e46fca5cc1179dbd90bec49fec3870e6eca6c45
-    rev = "b40cd48c38f9a18eb3db20d163bad78de12cf0b7";
-    sha256 = "0kniz8dg5bymb03qriizza1h3gpymf97vsgq9vd222282pdj0vyc";
-  };
-
-  gotool = fetchFromGitHub {
-    owner = "kisielk";
-    repo = "gotool";
-    rev = "80517062f582ea3340cd4baf70e86d539ae7d84d";
-    sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn";
-  };
-
-  gcimporter15 = fetchgit {
-    url = "https://go.googlesource.com/tools";
-    rev = "f8f2f88271bf2c23f28a09d288d26507a9503c97";
-    sha256 = "1pchwizx1sdli59g8r0p4djfjkchcvh8msfpp3ibvz3xl250jh0n";
-  };
-
-in
-stdenv.mkDerivation rec {
+buildGo110Package rec {
   name = "perkeep-${version}";
-  version = "20170505";
+  version = "0.10.1";
 
   src = fetchzip {
-    url = "https://perkeep.org/dl/monthly/camlistore-${version}-src.zip";
-    sha256 = "1vliyvkyzmhdi6knbh8rdsswmz3h0rpxdpq037jwbdbkjccxjdwa";
+    url = "https://perkeep.org/dl/perkeep-${version}-src.zip";
+    sha256 = "0rqibc6w4m1r50i2pjcgz1k9dxh18v7jwj4s29y470bc526wv422";
   };
 
-  # When perkeep is updated postPatch should be removed
-  postPatch = ''
-    rm -r ./vendor/github.com/gopherjs/gopherjs/
-    cp -a ${gopherjs} ./vendor/github.com/gopherjs/gopherjs
-    mkdir -p ./vendor/github.com/kisielk/
-    cp -a ${gotool} ./vendor/github.com/kisielk/gotool
-    mkdir -p ./vendor/golang.org/x/tools/go
-    cp -a ${gcimporter15}/go/gcimporter15 ./vendor/golang.org/x/tools/go/gcimporter15
-
-    substituteInPlace vendor/github.com/gopherjs/gopherjs/build/build.go \
-      --replace '"github.com/fsnotify/fsnotify"' 'fsnotify "camlistore.org/pkg/misc/fakefsnotify"'
-
-    substituteInPlace ./make.go \
-      --replace "goVersionMinor  = '8'" "goVersionMinor  = '9'" \
-      --replace "gopherJSGoMinor = '8'" "gopherJSGoMinor = '9'"
-  '';
-
-  buildInputs = [ git go ];
+  goPackagePath = "perkeep.org";
 
-  goPackagePath = "";
   buildPhase = ''
+    cd "$NIX_BUILD_TOP/go/src/$goPackagePath"
     go run make.go
   '';
 
-  installPhase = ''
-    mkdir -p $out/bin
-    cp bin/* $out/bin
+  # devcam is only useful when developing perkeep, we should not install it as
+  # part of this derivation.
+  postInstall = ''
+    rm -f $out/bin/devcam
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
     homepage = https://perkeep.org;
     license = licenses.asl20;
-    maintainers = with maintainers; [ cstrahan ];
+    maintainers = with maintainers; [ cstrahan kalbasit ];
     platforms = platforms.unix;
   };
 }