Unverified Commit 540fb7a2 authored by Luflosi's avatar Luflosi
Browse files

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.
parent 40dbea78
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;