From ada7f14219b6cb50d766c28aa64164d17f8bc2d6 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 10 May 2023 19:49:42 +0200 Subject: [PATCH] kubo: 0.19.2 -> 0.20.0 https://github.com/ipfs/kubo/releases/tag/v0.20.0 When creating a repository with `ipfs init`, `--empty-repo=true` is now the default according to the changelog. Modify the NixOS module to reflect this change and fix the `emptyRepo` setting to work with this change. --- nixos/modules/services/network-filesystems/kubo.nix | 6 +++--- pkgs/applications/networking/kubo/default.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/network-filesystems/kubo.nix b/nixos/modules/services/network-filesystems/kubo.nix index 2537bb1b8d8..a5c370b5be8 100644 --- a/nixos/modules/services/network-filesystems/kubo.nix +++ b/nixos/modules/services/network-filesystems/kubo.nix @@ -172,8 +172,8 @@ in emptyRepo = mkOption { type = types.bool; - default = false; - description = lib.mdDoc "If set to true, the repo won't be initialized with help files"; + default = true; + description = lib.mdDoc "If set to false, the repo will be initialized with help files"; }; settings = mkOption { @@ -331,7 +331,7 @@ in preStart = '' if [[ ! -f "$IPFS_PATH/config" ]]; then - ipfs init ${optionalString cfg.emptyRepo "-e"} + ipfs init --empty-repo=${lib.boolToString cfg.emptyRepo} else # After an unclean shutdown this file may exist which will cause the config command to attempt to talk to the daemon. This will hang forever if systemd is holding our sockets open. rm -vf "$IPFS_PATH/api" diff --git a/pkgs/applications/networking/kubo/default.nix b/pkgs/applications/networking/kubo/default.nix index e4b86636322..2c270199f12 100644 --- a/pkgs/applications/networking/kubo/default.nix +++ b/pkgs/applications/networking/kubo/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "kubo"; - version = "0.19.2"; # When updating, also check if the repo version changed and adjust repoVersion below + version = "0.20.0"; # When updating, also check if the repo version changed and adjust repoVersion below rev = "v${version}"; passthru.repoVersion = "13"; # Also update kubo-migrator when changing the repo version @@ -10,7 +10,7 @@ buildGoModule rec { # Kubo makes changes to it's source tarball that don't match the git source. src = fetchurl { url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz"; - hash = "sha256-HPhlKAavINaN0SJHWmeJRx43jfeHeYDZb3/dZ55kMLI="; + hash = "sha256-3Oj/x3EkceNO8/Ik7+U43wi1aL0lYJi1FA0AjtdJRDI="; }; # tarball contains multiple files/directories