perkeep: 20170505 -> 0.10.1

Also rewrite the derivation to use buildGoPackage

+14 -57
+13 -53
pkgs/applications/misc/perkeep/default.nix
··· 1 - { stdenv, go, fetchzip, git, fetchFromGitHub, fetchgit }: 1 + { buildGo110Package, fetchzip, lib }: 2 2 3 - # When perkeep is updated all deps in the let block should be removed 4 - let 5 - gopherjs = fetchFromGitHub { 6 - owner = "gopherjs"; 7 - repo = "gopherjs"; 8 - # Rev matching https://github.com/perkeep/perkeep/commit/2e46fca5cc1179dbd90bec49fec3870e6eca6c45 9 - rev = "b40cd48c38f9a18eb3db20d163bad78de12cf0b7"; 10 - sha256 = "0kniz8dg5bymb03qriizza1h3gpymf97vsgq9vd222282pdj0vyc"; 11 - }; 12 - 13 - gotool = fetchFromGitHub { 14 - owner = "kisielk"; 15 - repo = "gotool"; 16 - rev = "80517062f582ea3340cd4baf70e86d539ae7d84d"; 17 - sha256 = "14af2pa0ssyp8bp2mvdw184s5wcysk6akil3wzxmr05wwy951iwn"; 18 - }; 19 - 20 - gcimporter15 = fetchgit { 21 - url = "https://go.googlesource.com/tools"; 22 - rev = "f8f2f88271bf2c23f28a09d288d26507a9503c97"; 23 - sha256 = "1pchwizx1sdli59g8r0p4djfjkchcvh8msfpp3ibvz3xl250jh0n"; 24 - }; 25 - 26 - in 27 - stdenv.mkDerivation rec { 3 + buildGo110Package rec { 28 4 name = "perkeep-${version}"; 29 - version = "20170505"; 5 + version = "0.10.1"; 30 6 31 7 src = fetchzip { 32 - url = "https://perkeep.org/dl/monthly/camlistore-${version}-src.zip"; 33 - sha256 = "1vliyvkyzmhdi6knbh8rdsswmz3h0rpxdpq037jwbdbkjccxjdwa"; 8 + url = "https://perkeep.org/dl/perkeep-${version}-src.zip"; 9 + sha256 = "0rqibc6w4m1r50i2pjcgz1k9dxh18v7jwj4s29y470bc526wv422"; 34 10 }; 35 11 36 - # When perkeep is updated postPatch should be removed 37 - postPatch = '' 38 - rm -r ./vendor/github.com/gopherjs/gopherjs/ 39 - cp -a ${gopherjs} ./vendor/github.com/gopherjs/gopherjs 40 - mkdir -p ./vendor/github.com/kisielk/ 41 - cp -a ${gotool} ./vendor/github.com/kisielk/gotool 42 - mkdir -p ./vendor/golang.org/x/tools/go 43 - cp -a ${gcimporter15}/go/gcimporter15 ./vendor/golang.org/x/tools/go/gcimporter15 12 + goPackagePath = "perkeep.org"; 44 13 45 - substituteInPlace vendor/github.com/gopherjs/gopherjs/build/build.go \ 46 - --replace '"github.com/fsnotify/fsnotify"' 'fsnotify "camlistore.org/pkg/misc/fakefsnotify"' 47 - 48 - substituteInPlace ./make.go \ 49 - --replace "goVersionMinor = '8'" "goVersionMinor = '9'" \ 50 - --replace "gopherJSGoMinor = '8'" "gopherJSGoMinor = '9'" 51 - ''; 52 - 53 - buildInputs = [ git go ]; 54 - 55 - goPackagePath = ""; 56 14 buildPhase = '' 15 + cd "$NIX_BUILD_TOP/go/src/$goPackagePath" 57 16 go run make.go 58 17 ''; 59 18 60 - installPhase = '' 61 - mkdir -p $out/bin 62 - cp bin/* $out/bin 19 + # devcam is only useful when developing perkeep, we should not install it as 20 + # part of this derivation. 21 + postInstall = '' 22 + rm -f $out/bin/devcam 63 23 ''; 64 24 65 - meta = with stdenv.lib; { 25 + meta = with lib; { 66 26 description = "A way of storing, syncing, sharing, modelling and backing up content (née Camlistore)"; 67 27 homepage = https://perkeep.org; 68 28 license = licenses.asl20; 69 - maintainers = with maintainers; [ cstrahan ]; 29 + maintainers = with maintainers; [ cstrahan kalbasit ]; 70 30 platforms = platforms.unix; 71 31 }; 72 32 }
+1 -4
pkgs/top-level/all-packages.nix
··· 15399 15399 openjpeg = openjpeg_1; 15400 15400 }; 15401 15401 15402 - perkeep = callPackage ../applications/misc/perkeep { 15403 - # Perkeep is very particular about which go version to build with. 15404 - go = go_1_9; 15405 - }; 15402 + perkeep = callPackage ../applications/misc/perkeep { }; 15406 15403 15407 15404 canto-curses = callPackage ../applications/networking/feedreaders/canto-curses { }; 15408 15405