about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-05-08 14:38:42 +0100
committerGitHub <noreply@github.com>2020-05-08 14:38:42 +0100
commitc0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70 (patch)
treeedd8daa7d78a622e548452415cbb652cf33a8952
parent3d450fca5f938a55e44b503caad693cdcd9f57ea (diff)
parentec70d7cbc3c58c8db8bc45a810968b90a5c4ccc7 (diff)
downloadnixlib-c0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70.tar
nixlib-c0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70.tar.gz
nixlib-c0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70.tar.bz2
nixlib-c0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70.tar.lz
nixlib-c0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70.tar.xz
nixlib-c0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70.tar.zst
nixlib-c0923d1b2e31f53f3a4eeb3cd50f7dea0aae4e70.zip
Merge pull request #87265 from priegger/fix/ipfs-migrator-update
-rw-r--r--pkgs/applications/networking/ipfs-migrator/default.nix22
-rw-r--r--pkgs/applications/networking/ipfs-migrator/deps.nix47
-rw-r--r--pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch13
3 files changed, 10 insertions, 72 deletions
diff --git a/pkgs/applications/networking/ipfs-migrator/default.nix b/pkgs/applications/networking/ipfs-migrator/default.nix
index 578ac9b04797..727f89da9a2b 100644
--- a/pkgs/applications/networking/ipfs-migrator/default.nix
+++ b/pkgs/applications/networking/ipfs-migrator/default.nix
@@ -1,24 +1,22 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub }:
 
-buildGoPackage {
+buildGoModule rec {
   pname = "ipfs-migrator";
-  version = "7";
-
-  goPackagePath = "github.com/ipfs/fs-repo-migrations";
-
-  goDeps = ./deps.nix;
+  version = "1.5.1";
 
   src = fetchFromGitHub {
     owner = "ipfs";
     repo = "fs-repo-migrations";
-    rev = "4e8e0b41d7348646c719d572c678c3d0677e541a";
-    sha256 = "1i6izncgc3wgabppglnnrslffvwrv3cazbdhsk4vjfsd66hb4d37";
+    rev = "v${version}";
+    sha256 = "18pjxkxfbsbbj4hs4xyzfmmz991h31785ldx41dll6wa9zx4lsnm";
   };
 
-  patches = [ ./lru-repo-path-fix.patch ];
+  modSha256 = "1magqgbb6prnihr8lr6jc2fcgsbqqc9y317mkdnvq9qs6bj0a6qj";
+
+  subPackages = [ "." ];
 
-  meta = with stdenv.lib; {
-    description = "Migration tool for ipfs repositories";
+  meta = with lib; {
+    description = "Migrations for the filesystem repository of ipfs clients";
     homepage = "https://ipfs.io/";
     license = licenses.mit;
     platforms = platforms.unix;
diff --git a/pkgs/applications/networking/ipfs-migrator/deps.nix b/pkgs/applications/networking/ipfs-migrator/deps.nix
deleted file mode 100644
index b4ae5ef827ec..000000000000
--- a/pkgs/applications/networking/ipfs-migrator/deps.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-[
-  {
-    goPackagePath = "github.com/jbenet/goprocess";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jbenet/goprocess";
-      rev = "b497e2f366b8624394fb2e89c10ab607bebdde0b";
-      sha256 = "1lnvkzki7vnqn5c4m6bigk0k85haicmg27w903kwg30rdvblm82s";
-    };
-  }
-  {
-    goPackagePath = "github.com/jbenet/go-random";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jbenet/go-random";
-      rev = "384f606e91f542a98e779e652eed88051618f0f7";
-      sha256 = "0gcshzl9n3apzc0jaxqrjsc038yfrzfyhpdqgbpcnajin83l2msa";
-    };
-  }
-  {
-    goPackagePath = "github.com/jbenet/go-random-files";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jbenet/go-random-files";
-      rev = "737479700b40b4b50e914e963ce8d9d44603e3c8";
-      sha256 = "1klpdc4qkrfy31r7qh00fcz42blswzabmcnry9byd5adhszxj9bw";
-    };
-  }
-  {
-    goPackagePath = "github.com/hashicorp/golang-lru";
-    fetch = {
-      type = "git";
-      url = "https://github.com/hashicorp/golang-lru";
-      rev = "20f1fb78b0740ba8c3cb143a61e86ba5c8669768";
-      sha256 = "12k2cp2k615fjvfa5hyb9k2alian77wivds8s65diwshwv41939f";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/net";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/net";
-      rev = "26e67e76b6c3f6ce91f7c52def5af501b4e0f3a2";
-      sha256 = "17bqkd64zksi1578lb10ls4qf5lbqs7shfjcc6bi97y1qz5k31c4";
-    };
-  }
-]
diff --git a/pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch b/pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch
deleted file mode 100644
index a933a7b5358b..000000000000
--- a/pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/ipfs-1-to-2/go-datastore/lru/datastore.go b/ipfs-1-to-2/go-datastore/lru/datastore.go
-index 7eb18eb..cd8dcb7 100644
---- a/ipfs-1-to-2/go-datastore/lru/datastore.go
-+++ b/ipfs-1-to-2/go-datastore/lru/datastore.go
-@@ -3,7 +3,7 @@ package lru
- import (
- 	"errors"
- 
--	lru "github.com/ipfs/fs-repo-migrations/ipfs-1-to-2/golang-lru"
-+	lru "github.com/hashicorp/golang-lru"
- 
- 	ds "github.com/ipfs/fs-repo-migrations/ipfs-1-to-2/go-datastore"
- 	dsq "github.com/ipfs/fs-repo-migrations/ipfs-1-to-2/go-datastore/query"