Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Luflosi committed Jul 6, 2023
1 parent 0305eac commit 878ffa0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let
filter
foldl'
getAttrFromPath
hasAttrByPath
head
id
imap1
Expand Down Expand Up @@ -1203,6 +1204,7 @@ let
doRename = { from, to, visible, warn, use, withPriority ? true }:
{ config, options, ... }:
let
fromOptIsDefined = hasAttrByPath from options;
fromOpt = getAttrFromPath from options;
toOf = attrByPath to
(abort "Renaming error: option `${showOption to}' does not exist.");
Expand All @@ -1218,7 +1220,7 @@ let
});
config = mkMerge [
(optionalAttrs (options ? warnings) {
warnings = optional (warn && fromOpt.isDefined)
warnings = optional (warn && fromOptIsDefined && fromOpt.isDefined)
"The option `${showOption from}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption to}'.";
})
(if withPriority
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/network-filesystems/kubo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -420,5 +420,6 @@ in
(mkRenamedOptionModule [ "services" "kubo" "gatewayAddress" ] [ "services" "kubo" "settings" "Addresses" "Gateway" ])
(mkRenamedOptionModule [ "services" "kubo" "apiAddress" ] [ "services" "kubo" "settings" "Addresses" "API" ])
(mkRenamedOptionModule [ "services" "kubo" "swarmAddress" ] [ "services" "kubo" "settings" "Addresses" "Swarm" ])
(mkRenamedOptionModule [ "services" "kubo" "settings" "Experimental" "AcceleratedDHTClient" ] [ "services" "kubo" "settings" "Routing" "AcceleratedDHTClient" ])
];
}
6 changes: 3 additions & 3 deletions pkgs/applications/networking/kubo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

buildGoModule rec {
pname = "kubo";
version = "0.20.0"; # When updating, also check if the repo version changed and adjust repoVersion below
version = "0.21.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
passthru.repoVersion = "14"; # Also update kubo-migrator when changing the repo version

# 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-3Oj/x3EkceNO8/Ik7+U43wi1aL0lYJi1FA0AjtdJRDI=";
hash = "sha256-tS7hiv7KnALR+hCn/TPUwqp/xIOLnQ3ReSb1bNBnwUY=";
};

# tarball contains multiple files/directories
Expand Down

0 comments on commit 878ffa0

Please sign in to comment.