Unverified Commit 1f4c50ab authored by Lukas Wurzinger's avatar Lukas Wurzinger
Browse files

lib/cli: deprecate toGNUCommandLine

parent 73e8a483
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -353,6 +353,8 @@
  - `number`
  - `numbers.*`

- `lib.cli.toGNUCommandLine` and `lib.cli.toGNUCommandLineShell` have been deprecated in favor of `lib.cli.toCommandLine`, `lib.cli.toCommandLineShell`, `lib.cli.toCommandLineGNU` and `lib.cli.toCommandLineShellGNU`.

### Additions and Improvements {#sec-nixpkgs-release-25.11-lib-additions-improvements}

- `neovim`: Added support for the `vim.o.exrc` option, the `VIMINIT` environment variable, and sourcing of `sysinit.vim`.
+37 −31
Original line number Diff line number Diff line
@@ -40,7 +40,9 @@
    :::
  */
  toGNUCommandLineShell =
    options: attrs: lib.escapeShellArgs (lib.cli.toGNUCommandLine options attrs);
    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2511)
      "lib.cli.toGNUCommandLineShell is deprecated, please use lib.cli.toCommandLineShell or lib.cli.toCommandLineShellGNU instead."
      (options: attrs: lib.escapeShellArgs (lib.cli.toGNUCommandLine options attrs));

  /**
    Automatically convert an attribute set to a list of command-line options.
@@ -114,6 +116,9 @@
    :::
  */
  toGNUCommandLine =
    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2511)
      "lib.cli.toGNUCommandLine is deprecated, please use lib.cli.toCommandLine or lib.cli.toCommandLineShellGNU instead."
      (
        {
          mkOptionName ? k: if builtins.stringLength k == 1 then "-${k}" else "--${k}",

@@ -147,7 +152,8 @@
              mkOption k v;

        in
    builtins.concatLists (lib.mapAttrsToList render options);
        builtins.concatLists (lib.mapAttrsToList render options)
      );

  /**
    Converts the given attributes into a single shell-escaped command-line string.
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ let
  ensurePrinter =
    p:
    let
      args = lib.cli.toGNUCommandLineShell { } (
      args = lib.cli.toCommandLineShellGNU { } (
        {
          p = p.name;
          v = p.deviceUri;
+3 −3
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ libeufinComponent:
            DynamicUser = true;
            ExecStart =
              let
                args = lib.cli.toGNUCommandLineShell { } {
                args = lib.cli.toCommandLineShellGNU { } {
                  c = configFile;
                  L = if cfg.debug then "debug" else null;
                };
@@ -80,7 +80,7 @@ libeufinComponent:
            initialAccountRegistration = lib.concatMapStringsSep "\n" (
              account:
              let
                args = lib.cli.toGNUCommandLineShell { } {
                args = lib.cli.toCommandLineShellGNU { } {
                  c = configFile;
                  inherit (account) username password name;
                  payto_uri = "payto://x-taler-bank/${bankHost}/${account.username}?receiver-name=${account.name}";
@@ -90,7 +90,7 @@ libeufinComponent:
              "${lib.getExe' cfg.package "libeufin-bank"} create-account ${args}"
            ) cfg.initialAccounts;

            args = lib.cli.toGNUCommandLineShell { } {
            args = lib.cli.toCommandLineShellGNU { } {
              c = configFile;
              L = if cfg.debug then "debug" else null;
            };
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ let
        limit != null && window != null
      ) "Both power limit and window must be set";
      "${toString limit} ${toString window}";
  cliArgs = lib.cli.toGNUCommandLine { } {
  cliArgs = lib.cli.toCommandLineGNU { } {
    inherit (cfg)
      verbose
      temp
Loading