-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubo-migrator: fix broken migrations
Two old migrations were broken since Go 1.16 was removed from Nixpkgs. Upstream is not interested in fixing the migrations to work with newer Go versions: ipfs/fs-repo-migrations#163 (comment).
- Loading branch information
Showing
3 changed files
with
47 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ lib | ||
, stdenvNoCC | ||
, fetchFromGitHub | ||
, fetchpatch | ||
}: | ||
|
||
stdenvNoCC.mkDerivation rec { | ||
name = "kubo-migrator-src"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "ipfs"; | ||
repo = "fs-repo-migrations"; | ||
rev = "fs-repo-11-to-12/v1.0.2"; | ||
hash = "sha256-CG4utwH+/+Igw+SP3imhl39wijlB53UGtkJG5Mwh+Ik="; | ||
}; | ||
|
||
patches = [ | ||
# Make the migrations compatible with Go 1.17 and newer | ||
(fetchpatch { | ||
name = "fix-fs-repo-10-to-11.patch"; | ||
url = "https://github.com/ipfs/fs-repo-migrations/pull/163/commits/c3b39a3ccd51e65e1039652235cb6930d3304a08.patch"; | ||
hash = "sha256-YkFtFsYueCd24WsRINq7Q5wvFjoIVAqlN9yy9y6kNrw="; | ||
}) | ||
(fetchpatch { | ||
name = "fix-fs-repo-11-to-12.patch"; | ||
url = "https://github.com/ipfs/fs-repo-migrations/pull/163/commits/408f58ffdf9869bcb51cd4d8d99d5aefd65df593.patch"; | ||
hash = "sha256-IkRkwNVDLSU8wWmtFuxM5H0g6Jkkso/i8k5XmjMrLA8="; | ||
}) | ||
]; | ||
|
||
dontConfigure = true; | ||
dontBuild = true; | ||
doCheck = false; | ||
dontFixup = true; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p "$out" | ||
cp -r * .* "$out" | ||
runHook postInstall | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters