diff options
author | Luflosi <luflosi@luflosi.de> | 2023-01-24 20:43:54 +0100 |
---|---|---|
committer | Luflosi <luflosi@luflosi.de> | 2023-02-22 01:56:53 +0100 |
commit | 540fb7a27074eec677266b218e8bbe9a385cbfa5 (patch) | |
tree | 468b970f1277467a791236ec435e9963ab8eebc3 | |
parent | 40dbea7885f2aa3c996fa5681df00bd24ea67097 (diff) |
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: https://github.com/ipfs/fs-repo-migrations/pull/163#issuecomment-1397311134.
-rw-r--r-- | pkgs/applications/networking/kubo-migrator/all-migrations.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/applications/networking/kubo-migrator/all-migrations.nix b/pkgs/applications/networking/kubo-migrator/all-migrations.nix index a9197c9db5fb..95b3386ed1f1 100644 --- a/pkgs/applications/networking/kubo-migrator/all-migrations.nix +++ b/pkgs/applications/networking/kubo-migrator/all-migrations.nix @@ -15,6 +15,19 @@ let inherit (kubo-migrator-unwrapped) src; sourceRoot = "source/${pname}"; vendorSha256 = null; + # Fix build on Go 1.17 and later: panic: qtls.ClientHelloInfo doesn't match + # See https://github.com/ipfs/fs-repo-migrations/pull/163 + postPatch = lib.optionalString (lib.elem pname [ "fs-repo-10-to-11" "fs-repo-11-to-12" ]) '' + substituteInPlace 'vendor/github.com/marten-seemann/qtls-go1-15/common.go' \ + --replace \ + '"container/list"' \ + '"container/list" + "context"' \ + --replace \ + 'config *Config' \ + 'config *Config + ctx context.Context' + ''; doCheck = false; meta = kubo-migrator-unwrapped.meta // { mainProgram = pname; |