Skip to content

Commit 0983ac2

Browse files
authored
Merge pull request #6207 from IntersectMBO/amesgen/cardano-node-service-nixpkgs-compat
cardano-node service: `builtins.isFunction` -> `lib.isFunction`
2 parents 131cfcb + 40192a6 commit 0983ac2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

nix/nixos/cardano-node-service.nix

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ in {
323323
ipv6HostAddr = mkOption {
324324
type = funcToOr nullOrStr;
325325
default = _: null;
326-
apply = ip: if (builtins.isFunction ip) then ip else _: ip;
326+
apply = ip: if (lib.isFunction ip) then ip else _: ip;
327327
description = ''
328328
The ipv6 host address to bind to. Set to null to disable.
329329
'';
@@ -348,7 +348,7 @@ in {
348348
stateDir = mkOption {
349349
type = funcToOr types.str;
350350
default = "${cfg.stateDirBase}cardano-node";
351-
apply = x : if (builtins.isFunction x) then x else i: x;
351+
apply = x : if (lib.isFunction x) then x else i: x;
352352
description = ''
353353
Directory to store blockchain data, for each instance.
354354
'';
@@ -365,7 +365,7 @@ in {
365365
runtimeDir = mkOption {
366366
type = funcToOr nullOrStr;
367367
default = i: ''${cfg.runDirBase}${suffixDir "cardano-node" i}'';
368-
apply = x : if builtins.isFunction x then x else if x == null then _: null else "${cfg.runDirBase}${suffixDir "cardano-node" x}";
368+
apply = x : if lib.isFunction x then x else if x == null then _: null else "${cfg.runDirBase}${suffixDir "cardano-node" x}";
369369
description = ''
370370
Runtime directory relative to ${cfg.runDirBase}, for each instance
371371
'';
@@ -374,14 +374,14 @@ in {
374374
databasePath = mkOption {
375375
type = funcToOr types.str;
376376
default = i : "${cfg.stateDir i}/${cfg.dbPrefix i}";
377-
apply = x : if builtins.isFunction x then x else _ : x;
377+
apply = x : if lib.isFunction x then x else _ : x;
378378
description = ''Node database path, for each instance.'';
379379
};
380380

381381
lmdbDatabasePath = mkOption {
382382
type = funcToOr nullOrStr;
383383
default = null;
384-
apply = x : if builtins.isFunction x then x else if x == null then _: null else _: x;
384+
apply = x : if lib.isFunction x then x else if x == null then _: null else _: x;
385385
description = ''
386386
Node UTxO-HD LMDB path for performant disk I/O, for each instance.
387387
This could point to a direct-access SSD, with a specifically created journal-less file system and optimized mount options.
@@ -391,14 +391,14 @@ in {
391391
socketPath = mkOption {
392392
type = funcToOr types.str;
393393
default = i : "${runtimeDir i}/node.socket";
394-
apply = x : if builtins.isFunction x then x else _ : x;
394+
apply = x : if lib.isFunction x then x else _ : x;
395395
description = ''Local communication socket path, for each instance.'';
396396
};
397397

398398
tracerSocketPathAccept = mkOption {
399399
type = funcToOr nullOrStr;
400400
default = null;
401-
apply = x : if builtins.isFunction x then x else _ : x;
401+
apply = x : if lib.isFunction x then x else _ : x;
402402
description = ''
403403
Listen for incoming cardano-tracer connection on a local socket,
404404
for each instance.
@@ -408,7 +408,7 @@ in {
408408
tracerSocketPathConnect = mkOption {
409409
type = funcToOr nullOrStr;
410410
default = null;
411-
apply = x : if builtins.isFunction x then x else _ : x;
411+
apply = x : if lib.isFunction x then x else _ : x;
412412
description = ''
413413
Connect to cardano-tracer listening on a local socket,
414414
for each instance.
@@ -456,7 +456,7 @@ in {
456456
dbPrefix = mkOption {
457457
type = types.either types.str (types.functionTo types.str);
458458
default = suffixDir "db-${cfg.environment}";
459-
apply = x : if builtins.isFunction x then x else suffixDir x;
459+
apply = x : if lib.isFunction x then x else suffixDir x;
460460
description = ''
461461
Prefix of database directories inside `stateDir`.
462462
(eg. for "db", there will be db-0, etc.).
@@ -679,7 +679,7 @@ in {
679679
withUtxoHdLmdb = mkOption {
680680
type = funcToOr types.bool;
681681
default = false;
682-
apply = x: if builtins.isFunction x then x else _: x;
682+
apply = x: if lib.isFunction x then x else _: x;
683683
description = ''On an UTxO-HD enabled node, the in-memory backend is the default. This activates the on-disk backend (LMDB) instead.'';
684684
};
685685

@@ -726,7 +726,7 @@ in {
726726
type = funcToOr nullOrStr;
727727
default = null;
728728
example = i: "/etc/cardano-node/peer-snapshot-${toString i}.json";
729-
apply = x: if builtins.isFunction x then x else _: x;
729+
apply = x: if lib.isFunction x then x else _: x;
730730
description = ''
731731
If set, cardano-node will load a peer snapshot file from the declared absolute path.
732732

0 commit comments

Comments
 (0)