ipfs-migrator: init
This commit is contained in:
parent
3db9841d34
commit
b76f9d7a44
27
pkgs/applications/networking/ipfs-migrator/default.nix
Normal file
27
pkgs/applications/networking/ipfs-migrator/default.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "ipfs-migrator-${version}";
|
||||
version = "6";
|
||||
|
||||
goPackagePath = "github.com/ipfs/fs-repo-migrations";
|
||||
|
||||
goDeps = ./deps.nix;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ipfs";
|
||||
repo = "fs-repo-migrations";
|
||||
rev = "a89e9769b9cac25ad9ca31c7e9a4445c7966d35b";
|
||||
sha256 = "0x4mbkx7wlqjmkg6852hljq947v9y9k3hjd5yfj7kka1hpvxd7bn";
|
||||
};
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
56
pkgs/applications/networking/ipfs-migrator/deps.nix
Normal file
56
pkgs/applications/networking/ipfs-migrator/deps.nix
Normal file
@ -0,0 +1,56 @@
|
||||
[
|
||||
{
|
||||
goPackagePath = "github.com/dustin/go-humanize";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = https://github.com/dustin/go-humanize;
|
||||
rev = "79e699ccd02f240a1f1fbbdcee7e64c1c12e41aa";
|
||||
sha256 = "0awfqszgjw8qrdw31v74jnvj1jbp7czhd8aq59j57yyj4hy50fzj";
|
||||
};
|
||||
}
|
||||
{
|
||||
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 = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6";
|
||||
sha256 = "1iq7lbpsz7ks052mpznmkf8s4k43p51z4dik2n9ivrxk666q2wxi";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "golang.org/x/net";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/net";
|
||||
rev = "71a035914f99bb58fe82eac0f1289f10963d876c";
|
||||
sha256 = "06m16c9vkwc8m2mcxcxa7p8mb26ikc810lgzd5m8k1r6lp3hc8wm";
|
||||
};
|
||||
}
|
||||
]
|
@ -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"
|
@ -2690,6 +2690,7 @@ with pkgs;
|
||||
iperf = iperf3;
|
||||
|
||||
ipfs = callPackage ../applications/networking/ipfs { };
|
||||
ipfs-migrator = callPackage ../applications/networking/ipfs-migrator { };
|
||||
|
||||
ipmitool = callPackage ../tools/system/ipmitool {
|
||||
static = false;
|
||||
|
Loading…
Reference in New Issue
Block a user