ipfs-migrator: init

+97
+27
pkgs/applications/networking/ipfs-migrator/default.nix
··· 1 + { stdenv, buildGoPackage, fetchFromGitHub }: 2 + 3 + buildGoPackage rec { 4 + name = "ipfs-migrator-${version}"; 5 + version = "6"; 6 + 7 + goPackagePath = "github.com/ipfs/fs-repo-migrations"; 8 + 9 + goDeps = ./deps.nix; 10 + 11 + src = fetchFromGitHub { 12 + owner = "ipfs"; 13 + repo = "fs-repo-migrations"; 14 + rev = "a89e9769b9cac25ad9ca31c7e9a4445c7966d35b"; 15 + sha256 = "0x4mbkx7wlqjmkg6852hljq947v9y9k3hjd5yfj7kka1hpvxd7bn"; 16 + }; 17 + 18 + patches = [ ./lru-repo-path-fix.patch ]; 19 + 20 + meta = with stdenv.lib; { 21 + description = "Migration tool for ipfs repositories"; 22 + homepage = https://ipfs.io/; 23 + license = licenses.mit; 24 + platforms = platforms.unix; 25 + maintainers = with maintainers; [ elitak ]; 26 + }; 27 + }
+56
pkgs/applications/networking/ipfs-migrator/deps.nix
··· 1 + [ 2 + { 3 + goPackagePath = "github.com/dustin/go-humanize"; 4 + fetch = { 5 + type = "git"; 6 + url = https://github.com/dustin/go-humanize; 7 + rev = "79e699ccd02f240a1f1fbbdcee7e64c1c12e41aa"; 8 + sha256 = "0awfqszgjw8qrdw31v74jnvj1jbp7czhd8aq59j57yyj4hy50fzj"; 9 + }; 10 + } 11 + { 12 + goPackagePath = "github.com/jbenet/goprocess"; 13 + fetch = { 14 + type = "git"; 15 + url = https://github.com/jbenet/goprocess; 16 + rev = "b497e2f366b8624394fb2e89c10ab607bebdde0b"; 17 + sha256 = "1lnvkzki7vnqn5c4m6bigk0k85haicmg27w903kwg30rdvblm82s"; 18 + }; 19 + } 20 + { 21 + goPackagePath = "github.com/jbenet/go-random"; 22 + fetch = { 23 + type = "git"; 24 + url = https://github.com/jbenet/go-random; 25 + rev = "384f606e91f542a98e779e652eed88051618f0f7"; 26 + sha256 = "0gcshzl9n3apzc0jaxqrjsc038yfrzfyhpdqgbpcnajin83l2msa"; 27 + }; 28 + } 29 + { 30 + goPackagePath = "github.com/jbenet/go-random-files"; 31 + fetch = { 32 + type = "git"; 33 + url = https://github.com/jbenet/go-random-files; 34 + rev = "737479700b40b4b50e914e963ce8d9d44603e3c8"; 35 + sha256 = "1klpdc4qkrfy31r7qh00fcz42blswzabmcnry9byd5adhszxj9bw"; 36 + }; 37 + } 38 + { 39 + goPackagePath = "github.com/hashicorp/golang-lru"; 40 + fetch = { 41 + type = "git"; 42 + url = https://github.com/hashicorp/golang-lru; 43 + rev = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6"; 44 + sha256 = "1iq7lbpsz7ks052mpznmkf8s4k43p51z4dik2n9ivrxk666q2wxi"; 45 + }; 46 + } 47 + { 48 + goPackagePath = "golang.org/x/net"; 49 + fetch = { 50 + type = "git"; 51 + url = "https://go.googlesource.com/net"; 52 + rev = "71a035914f99bb58fe82eac0f1289f10963d876c"; 53 + sha256 = "06m16c9vkwc8m2mcxcxa7p8mb26ikc810lgzd5m8k1r6lp3hc8wm"; 54 + }; 55 + } 56 + ]
+13
pkgs/applications/networking/ipfs-migrator/lru-repo-path-fix.patch
··· 1 + diff --git a/ipfs-1-to-2/go-datastore/lru/datastore.go b/ipfs-1-to-2/go-datastore/lru/datastore.go 2 + index 7eb18eb..cd8dcb7 100644 3 + --- a/ipfs-1-to-2/go-datastore/lru/datastore.go 4 + +++ b/ipfs-1-to-2/go-datastore/lru/datastore.go 5 + @@ -3,7 +3,7 @@ package lru 6 + import ( 7 + "errors" 8 + 9 + - lru "github.com/ipfs/fs-repo-migrations/ipfs-1-to-2/golang-lru" 10 + + lru "github.com/hashicorp/golang-lru" 11 + 12 + ds "github.com/ipfs/fs-repo-migrations/ipfs-1-to-2/go-datastore" 13 + dsq "github.com/ipfs/fs-repo-migrations/ipfs-1-to-2/go-datastore/query"
+1
pkgs/top-level/all-packages.nix
··· 2690 2690 iperf = iperf3; 2691 2691 2692 2692 ipfs = callPackage ../applications/networking/ipfs { }; 2693 + ipfs-migrator = callPackage ../applications/networking/ipfs-migrator { }; 2693 2694 2694 2695 ipmitool = callPackage ../tools/system/ipmitool { 2695 2696 static = false;