about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/ipfs-migrator
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/ipfs-migrator
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/ipfs-migrator')
-rw-r--r--nixpkgs/pkgs/applications/networking/ipfs-migrator/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/networking/ipfs-migrator/deps.nix47
-rw-r--r--nixpkgs/pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch13
3 files changed, 87 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/ipfs-migrator/default.nix b/nixpkgs/pkgs/applications/networking/ipfs-migrator/default.nix
new file mode 100644
index 000000000000..f070c5109376
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/ipfs-migrator/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "ipfs-migrator-${version}";
+  version = "7";
+
+  goPackagePath = "github.com/ipfs/fs-repo-migrations";
+
+  goDeps = ./deps.nix;
+
+  src = fetchFromGitHub {
+    owner = "ipfs";
+    repo = "fs-repo-migrations";
+    rev = "4e8e0b41d7348646c719d572c678c3d0677e541a";
+    sha256 = "1i6izncgc3wgabppglnnrslffvwrv3cazbdhsk4vjfsd66hb4d37";
+  };
+
+  patches = [ ./lru-repo-path-fix.patch ];
+
+  meta = with stdenv.lib; {
+    description = "Migration tool for ipfs repositories";
+    homepage = https://ipfs.io/;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ elitak ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/ipfs-migrator/deps.nix b/nixpkgs/pkgs/applications/networking/ipfs-migrator/deps.nix
new file mode 100644
index 000000000000..1ad1c383c8c6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/ipfs-migrator/deps.nix
@@ -0,0 +1,47 @@
+[
+  {
+    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/nixpkgs/pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch b/nixpkgs/pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch
new file mode 100644
index 000000000000..a933a7b5358b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch
@@ -0,0 +1,13 @@
+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"