diff --git a/src/Nixfmt/Pretty.hs b/src/Nixfmt/Pretty.hs index 120ef92b..7971759c 100644 --- a/src/Nixfmt/Pretty.hs +++ b/src/Nixfmt/Pretty.hs @@ -211,14 +211,13 @@ prettyTerm (List paropen@Ann{trailComment = Nothing} (Items []) parclose@Ann{pre -- If the brackets are on different lines, keep them like that sep = if sourceLine paropen /= sourceLine parclose then hardline else hardspace -- General list --- Always expand if len > 1 -prettyTerm (List paropen@Ann{trailComment = post} items parclose) = +prettyTerm (List paropen@Ann{trailComment = post} (Items items) parclose) = pretty (paropen{trailComment = Nothing}) - <> surroundWith sur (nest $ pretty post <> prettyItems items) + <> surroundWith sep (nest $ pretty post <> sepBy sep items) <> pretty parclose where -- If the brackets are on different lines, keep them like that - sur = if sourceLine paropen /= sourceLine parclose then hardline else line + sep = if sourceLine paropen /= sourceLine parclose then hardline else line prettyTerm (Set krec paropen items parclose) = prettySet False (krec, paropen, items, parclose) -- Parentheses prettyTerm (Parenthesized paropen expr parclose@Ann{preTrivia = closePre}) = diff --git a/test/correct/paths-with-interpolations.nix b/test/correct/paths-with-interpolations.nix index e09d344f..93e58875 100644 --- a/test/correct/paths-with-interpolations.nix +++ b/test/correct/paths-with-interpolations.nix @@ -3,12 +3,4 @@ let bar = "bar"; in -[ - /${foo} - ./${foo} - /foo/${bar} - /foo${bar} - /${foo}/bar - /${foo}bar - /foo${bar}baz -] +[ /${foo} ./${foo} /foo/${bar} /foo${bar} /${foo}/bar /${foo}bar /foo${bar}baz ] diff --git a/test/diff/apply/out-pure.nix b/test/diff/apply/out-pure.nix index 42497b7f..627bfac8 100644 --- a/test/diff/apply/out-pure.nix +++ b/test/diff/apply/out-pure.nix @@ -69,12 +69,7 @@ b = # Function call with comment mapAttrsToStringsSep "\n" mkSection attrsOfAttrs; } - [ - (mapAttrsToStringsSep [ - force - long - ] "\n" mkSection attrsOfAttrs) - ] + [ (mapAttrsToStringsSep [ force long ] "\n" mkSection attrsOfAttrs) ] (a b) ((a b) (a b) ( @@ -155,21 +150,8 @@ utils.lib.eachDefaultSystem (system: { }); } { - escapeSingleline = libStr.escape [ - "\\" - ''"'' - "\${" - ]; - escapeMultiline = - libStr.replaceStrings - [ - "\${" - "''" - ] - [ - "''\${" - "'''" - ]; + escapeSingleline = libStr.escape [ "\\" ''"'' "\${" ]; + escapeMultiline = libStr.replaceStrings [ "\${" "''" ] [ "''\${" "'''" ]; test = foo [ diff --git a/test/diff/apply/out.nix b/test/diff/apply/out.nix index a30e59ad..cd343118 100644 --- a/test/diff/apply/out.nix +++ b/test/diff/apply/out.nix @@ -70,10 +70,7 @@ mapAttrsToStringsSep "\n" mkSection attrsOfAttrs; } [ - (mapAttrsToStringsSep [ - force - long - ] "\n" mkSection attrsOfAttrs) + (mapAttrsToStringsSep [ force long ] "\n" mkSection attrsOfAttrs) ] (a b) ((a b) (a b) diff --git a/test/diff/attr_set/out-pure.nix b/test/diff/attr_set/out-pure.nix index f28d2e25..afe4a70b 100644 --- a/test/diff/attr_set/out-pure.nix +++ b/test/diff/attr_set/out-pure.nix @@ -143,16 +143,8 @@ ] ++ (if foo then [ bar ] else [ baz ]) ++ [ ] - ++ (optionals condition [ - more - items - ]); - b = with pkgs; [ - a - lot - of - packages - ]; + ++ (optionals condition [ more items ]); + b = with pkgs; [ a lot of packages ]; } { systemd.initrdBi = lib.mkIf config.boot.initrd.services.lvm.enable [ pkgs.vdo ]; @@ -309,31 +301,14 @@ # Parentheses { a = ({ }); - b = ([ - 1 - 2 - 3 - ]); + b = ([ 1 2 3 ]); c = (if null then true else false); d = ( let in - [ - 1 - 2 - 3 - ] - ); - e = ( - if null then - true - else - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ); + e = (if null then true else [ 1 2 3 ]); # FIXME: This one exposes a really weird bug in the underlying # pretty printing engine. # (It's probably the same one that causes weird indentation in @@ -341,24 +316,13 @@ # f = /* comment */ (if null then true else [ 1 2 3 ]); a = (with a; { }); - b = ( - with a; - [ - 1 - 2 - 3 - ] - ); + b = (with a; [ 1 2 3 ]); c = (with a; if null then true else false); d = ( with a; let in - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ); } @@ -373,9 +337,6 @@ # Sans) than that horror. But we do need the Adobe fonts for some # old non-fontconfig applications. (Possibly this could be done # better using a fontconfig rule.) - [ - pkgs.xorg.fontadobe100dpi - pkgs.xorg.fontadobe75dpi - ]; + [ pkgs.xorg.fontadobe100dpi pkgs.xorg.fontadobe75dpi ]; } ] diff --git a/test/diff/attr_set/out.nix b/test/diff/attr_set/out.nix index 7b52a916..16bce737 100644 --- a/test/diff/attr_set/out.nix +++ b/test/diff/attr_set/out.nix @@ -146,10 +146,7 @@ ] ++ (if foo then [ bar ] else [ baz ]) ++ [ ] - ++ (optionals condition [ - more - items - ]); + ++ (optionals condition [ more items ]); b = with pkgs; [ a lot @@ -312,31 +309,14 @@ # Parentheses { a = ({ }); - b = ([ - 1 - 2 - 3 - ]); + b = ([ 1 2 3 ]); c = (if null then true else false); d = ( let in - [ - 1 - 2 - 3 - ] - ); - e = ( - if null then - true - else - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ); + e = (if null then true else [ 1 2 3 ]); # FIXME: This one exposes a really weird bug in the underlying # pretty printing engine. # (It's probably the same one that causes weird indentation in @@ -344,24 +324,13 @@ # f = /* comment */ (if null then true else [ 1 2 3 ]); a = (with a; { }); - b = ( - with a; - [ - 1 - 2 - 3 - ] - ); + b = (with a; [ 1 2 3 ]); c = (with a; if null then true else false); d = ( with a; let in - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ); } diff --git a/test/diff/idioms_lib_2/out-pure.nix b/test/diff/idioms_lib_2/out-pure.nix index 1fc274f0..8cbc7ab2 100644 --- a/test/diff/idioms_lib_2/out-pure.nix +++ b/test/diff/idioms_lib_2/out-pure.nix @@ -351,13 +351,7 @@ rec { Type: string -> a -> a */ warn = - if - lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") [ - "1" - "true" - "yes" - ] - then + if lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") [ "1" "true" "yes" ] then msg: builtins.trace "warning: ${msg}" ( abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors." diff --git a/test/diff/idioms_lib_2/out.nix b/test/diff/idioms_lib_2/out.nix index 1fc274f0..8cbc7ab2 100644 --- a/test/diff/idioms_lib_2/out.nix +++ b/test/diff/idioms_lib_2/out.nix @@ -351,13 +351,7 @@ rec { Type: string -> a -> a */ warn = - if - lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") [ - "1" - "true" - "yes" - ] - then + if lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") [ "1" "true" "yes" ] then msg: builtins.trace "warning: ${msg}" ( abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors." diff --git a/test/diff/idioms_lib_3/out-pure.nix b/test/diff/idioms_lib_3/out-pure.nix index 1115ae8b..1b2584df 100644 --- a/test/diff/idioms_lib_3/out-pure.nix +++ b/test/diff/idioms_lib_3/out-pure.nix @@ -130,13 +130,7 @@ rec { toINI = { # apply transformations (e.g. escapes) to section names - mkSectionName ? ( - name: - libStr.escape [ - "[" - "]" - ] name - ), + mkSectionName ? (name: libStr.escape [ "[" "]" ] name), # format a setting line from key and value mkKeyValue ? mkKeyValueDefault { } "=", # allow lists as values for duplicate keys @@ -191,13 +185,7 @@ rec { toINIWithGlobalSection = { # apply transformations (e.g. escapes) to section names - mkSectionName ? ( - name: - libStr.escape [ - "[" - "]" - ] name - ), + mkSectionName ? (name: libStr.escape [ "[" "]" ] name), # format a setting line from key and value mkKeyValue ? mkKeyValueDefault { } "=", # allow lists as values for duplicate keys @@ -292,12 +280,7 @@ rec { }: assert builtins.isInt depthLimit; let - specialAttrs = [ - "__functor" - "__functionArgs" - "__toString" - "__pretty" - ]; + specialAttrs = [ "__functor" "__functionArgs" "__toString" "__pretty" ]; stepIntoAttr = evalNext: name: if builtins.elem name specialAttrs then id else evalNext; transform = @@ -373,21 +356,8 @@ rec { else if isString v then let lines = filter (v: !isList v) (builtins.split "\n" v); - escapeSingleline = libStr.escape [ - "\\" - ''"'' - "\${" - ]; - escapeMultiline = - libStr.replaceStrings - [ - "\${" - "''" - ] - [ - "''\${" - "'''" - ]; + escapeSingleline = libStr.escape [ "\\" ''"'' "\${" ]; + escapeMultiline = libStr.replaceStrings [ "\${" "''" ] [ "''\${" "'''" ]; singlelineResult = ''"'' + concatStringsSep "\\n" (map escapeSingleline lines) + ''"''; multilineResult = diff --git a/test/diff/idioms_lib_3/out.nix b/test/diff/idioms_lib_3/out.nix index 4a1b2843..84b7c0a0 100644 --- a/test/diff/idioms_lib_3/out.nix +++ b/test/diff/idioms_lib_3/out.nix @@ -133,13 +133,7 @@ rec { toINI = { # apply transformations (e.g. escapes) to section names - mkSectionName ? ( - name: - libStr.escape [ - "[" - "]" - ] name - ), + mkSectionName ? (name: libStr.escape [ "[" "]" ] name), # format a setting line from key and value mkKeyValue ? mkKeyValueDefault { } "=", # allow lists as values for duplicate keys @@ -194,13 +188,7 @@ rec { toINIWithGlobalSection = { # apply transformations (e.g. escapes) to section names - mkSectionName ? ( - name: - libStr.escape [ - "[" - "]" - ] name - ), + mkSectionName ? (name: libStr.escape [ "[" "]" ] name), # format a setting line from key and value mkKeyValue ? mkKeyValueDefault { } "=", # allow lists as values for duplicate keys @@ -305,12 +293,7 @@ rec { }: assert builtins.isInt depthLimit; let - specialAttrs = [ - "__functor" - "__functionArgs" - "__toString" - "__pretty" - ]; + specialAttrs = [ "__functor" "__functionArgs" "__toString" "__pretty" ]; stepIntoAttr = evalNext: name: if builtins.elem name specialAttrs then id else evalNext; transform = @@ -386,21 +369,8 @@ rec { else if isString v then let lines = filter (v: !isList v) (builtins.split "\n" v); - escapeSingleline = libStr.escape [ - "\\" - ''"'' - "\${" - ]; - escapeMultiline = - libStr.replaceStrings - [ - "\${" - "''" - ] - [ - "''\${" - "'''" - ]; + escapeSingleline = libStr.escape [ "\\" ''"'' "\${" ]; + escapeMultiline = libStr.replaceStrings [ "\${" "''" ] [ "''\${" "'''" ]; singlelineResult = ''"'' + concatStringsSep "\\n" (map escapeSingleline lines) + ''"''; multilineResult = diff --git a/test/diff/idioms_lib_4/out-pure.nix b/test/diff/idioms_lib_4/out-pure.nix index 8ff78dae..72e66d89 100644 --- a/test/diff/idioms_lib_4/out-pure.nix +++ b/test/diff/idioms_lib_4/out-pure.nix @@ -54,13 +54,7 @@ rec { ################################################################################ # Reasonable power of 2 - types.bitWidth = enum [ - 8 - 16 - 32 - 64 - 128 - ]; + types.bitWidth = enum [ 8 16 32 64 128 ]; ################################################################################ @@ -783,13 +777,7 @@ rec { "3" = # cpu-kernel-environment if - elemAt l 1 == "linux" - || elem (elemAt l 2) [ - "eabi" - "eabihf" - "elf" - "gnu" - ] + elemAt l 1 == "linux" || elem (elemAt l 2) [ "eabi" "eabihf" "elf" "gnu" ] then { cpu = elemAt l 0; @@ -800,13 +788,7 @@ rec { # cpu-vendor-os else if elemAt l 1 == "apple" - || elem (elemAt l 2) [ - "wasi" - "redox" - "mmixware" - "ghcjs" - "mingw32" - ] + || elem (elemAt l 2) [ "wasi" "redox" "mmixware" "ghcjs" "mingw32" ] || hasPrefix "freebsd" (elemAt l 2) || hasPrefix "netbsd" (elemAt l 2) || hasPrefix "genode" (elemAt l 2) diff --git a/test/diff/idioms_lib_4/out.nix b/test/diff/idioms_lib_4/out.nix index 8ff78dae..72e66d89 100644 --- a/test/diff/idioms_lib_4/out.nix +++ b/test/diff/idioms_lib_4/out.nix @@ -54,13 +54,7 @@ rec { ################################################################################ # Reasonable power of 2 - types.bitWidth = enum [ - 8 - 16 - 32 - 64 - 128 - ]; + types.bitWidth = enum [ 8 16 32 64 128 ]; ################################################################################ @@ -783,13 +777,7 @@ rec { "3" = # cpu-kernel-environment if - elemAt l 1 == "linux" - || elem (elemAt l 2) [ - "eabi" - "eabihf" - "elf" - "gnu" - ] + elemAt l 1 == "linux" || elem (elemAt l 2) [ "eabi" "eabihf" "elf" "gnu" ] then { cpu = elemAt l 0; @@ -800,13 +788,7 @@ rec { # cpu-vendor-os else if elemAt l 1 == "apple" - || elem (elemAt l 2) [ - "wasi" - "redox" - "mmixware" - "ghcjs" - "mingw32" - ] + || elem (elemAt l 2) [ "wasi" "redox" "mmixware" "ghcjs" "mingw32" ] || hasPrefix "freebsd" (elemAt l 2) || hasPrefix "netbsd" (elemAt l 2) || hasPrefix "genode" (elemAt l 2) diff --git a/test/diff/idioms_lib_5/out-pure.nix b/test/diff/idioms_lib_5/out-pure.nix index ee898df8..83733566 100644 --- a/test/diff/idioms_lib_5/out-pure.nix +++ b/test/diff/idioms_lib_5/out-pure.nix @@ -549,15 +549,7 @@ let let hasOutput = out: builtins.elem out outputs; in - [ - (lib.findFirst hasOutput null ( - [ - "bin" - "out" - ] - ++ outputs - )) - ] + [ (lib.findFirst hasOutput null ([ "bin" "out" ] ++ outputs)) ] ++ lib.optional (hasOutput "man") "man"; } // attrs.meta or { } diff --git a/test/diff/idioms_lib_5/out.nix b/test/diff/idioms_lib_5/out.nix index ee898df8..83733566 100644 --- a/test/diff/idioms_lib_5/out.nix +++ b/test/diff/idioms_lib_5/out.nix @@ -549,15 +549,7 @@ let let hasOutput = out: builtins.elem out outputs; in - [ - (lib.findFirst hasOutput null ( - [ - "bin" - "out" - ] - ++ outputs - )) - ] + [ (lib.findFirst hasOutput null ([ "bin" "out" ] ++ outputs)) ] ++ lib.optional (hasOutput "man") "man"; } // attrs.meta or { } diff --git a/test/diff/idioms_nixos_1/out-pure.nix b/test/diff/idioms_nixos_1/out-pure.nix index f2bcf7ff..1f171a2c 100644 --- a/test/diff/idioms_nixos_1/out-pure.nix +++ b/test/diff/idioms_nixos_1/out-pure.nix @@ -148,10 +148,7 @@ in boot.initrd.availableKernelModules = mkOption { type = types.listOf types.str; default = [ ]; - example = [ - "sata_nv" - "ext3" - ]; + example = [ "sata_nv" "ext3" ]; description = '' The set of kernel modules in the initial ramdisk used during the boot process. This set must include all modules necessary for @@ -292,19 +289,13 @@ in # Implement consoleLogLevel both in early boot and using sysctl # (so you don't need to reboot to have changes take effect). - boot.kernelParams = - [ "loglevel=${toString config.boot.consoleLogLevel}" ] - ++ optionals config.boot.vesa [ - "vga=0x317" - "nomodeset" - ]; + boot.kernelParams = [ + "loglevel=${toString config.boot.consoleLogLevel}" + ] ++ optionals config.boot.vesa [ "vga=0x317" "nomodeset" ]; boot.kernel.sysctl."kernel.printk" = mkDefault config.boot.consoleLogLevel; - boot.kernelModules = [ - "loop" - "atkbd" - ]; + boot.kernelModules = [ "loop" "atkbd" ]; # The Linux kernel >= 2.6.27 provides firmware. hardware.firmware = [ kernel ]; diff --git a/test/diff/idioms_nixos_1/out.nix b/test/diff/idioms_nixos_1/out.nix index f2bcf7ff..1f171a2c 100644 --- a/test/diff/idioms_nixos_1/out.nix +++ b/test/diff/idioms_nixos_1/out.nix @@ -148,10 +148,7 @@ in boot.initrd.availableKernelModules = mkOption { type = types.listOf types.str; default = [ ]; - example = [ - "sata_nv" - "ext3" - ]; + example = [ "sata_nv" "ext3" ]; description = '' The set of kernel modules in the initial ramdisk used during the boot process. This set must include all modules necessary for @@ -292,19 +289,13 @@ in # Implement consoleLogLevel both in early boot and using sysctl # (so you don't need to reboot to have changes take effect). - boot.kernelParams = - [ "loglevel=${toString config.boot.consoleLogLevel}" ] - ++ optionals config.boot.vesa [ - "vga=0x317" - "nomodeset" - ]; + boot.kernelParams = [ + "loglevel=${toString config.boot.consoleLogLevel}" + ] ++ optionals config.boot.vesa [ "vga=0x317" "nomodeset" ]; boot.kernel.sysctl."kernel.printk" = mkDefault config.boot.consoleLogLevel; - boot.kernelModules = [ - "loop" - "atkbd" - ]; + boot.kernelModules = [ "loop" "atkbd" ]; # The Linux kernel >= 2.6.27 provides firmware. hardware.firmware = [ kernel ]; diff --git a/test/diff/idioms_nixos_2/out-pure.nix b/test/diff/idioms_nixos_2/out-pure.nix index e7d3e5d2..24d64de4 100644 --- a/test/diff/idioms_nixos_2/out-pure.nix +++ b/test/diff/idioms_nixos_2/out-pure.nix @@ -72,58 +72,27 @@ in { imports = [ - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "config" - "adminpass" - ] - '' - Please use `services.nextcloud.config.adminpassFile' instead! - '' - ) - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "config" - "dbpass" - ] - '' - Please use `services.nextcloud.config.dbpassFile' instead! - '' - ) - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "nginx" - "enable" - ] - '' - The nextcloud module supports `nginx` as reverse-proxy by default and doesn't - support other reverse-proxies officially. - - However it's possible to use an alternative reverse-proxy by - - * disabling nginx - * setting `listen.owner` & `listen.group` in the phpfpm-pool to a different value - - Further details about this can be found in the `Nextcloud`-section of the NixOS-manual - (which can be opened e.g. by running `nixos-help`). - '' - ) - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "disableImagemagick" - ] - '' - Use services.nextcloud.enableImagemagick instead. - '' - ) + (mkRemovedOptionModule [ "services" "nextcloud" "config" "adminpass" ] '' + Please use `services.nextcloud.config.adminpassFile' instead! + '') + (mkRemovedOptionModule [ "services" "nextcloud" "config" "dbpass" ] '' + Please use `services.nextcloud.config.dbpassFile' instead! + '') + (mkRemovedOptionModule [ "services" "nextcloud" "nginx" "enable" ] '' + The nextcloud module supports `nginx` as reverse-proxy by default and doesn't + support other reverse-proxies officially. + + However it's possible to use an alternative reverse-proxy by + + * disabling nginx + * setting `listen.owner` & `listen.group` in the phpfpm-pool to a different value + + Further details about this can be found in the `Nextcloud`-section of the NixOS-manual + (which can be opened e.g. by running `nixos-help`). + '') + (mkRemovedOptionModule [ "services" "nextcloud" "disableImagemagick" ] '' + Use services.nextcloud.enableImagemagick instead. + '') ]; options.services.nextcloud = { @@ -231,12 +200,7 @@ in description = lib.mdDoc "Log level value between 0 (DEBUG) and 4 (FATAL)."; }; logType = mkOption { - type = types.enum [ - "errorlog" - "file" - "syslog" - "systemd" - ]; + type = types.enum [ "errorlog" "file" "syslog" "systemd" ]; default = "syslog"; description = lib.mdDoc '' Logging backend to use. @@ -252,18 +216,11 @@ in package = mkOption { type = types.package; description = lib.mdDoc "Which package to use for the Nextcloud instance."; - relatedPackages = [ - "nextcloud24" - "nextcloud25" - "nextcloud26" - ]; + relatedPackages = [ "nextcloud24" "nextcloud25" "nextcloud26" ]; }; phpPackage = mkOption { type = types.package; - relatedPackages = [ - "php80" - "php81" - ]; + relatedPackages = [ "php80" "php81" ]; defaultText = "pkgs.php"; description = lib.mdDoc '' PHP package to use for Nextcloud. @@ -335,13 +292,7 @@ in }; poolSettings = mkOption { - type = - with types; - attrsOf (oneOf [ - str - int - bool - ]); + type = with types; attrsOf (oneOf [ str int bool ]); default = { "pm" = "dynamic"; "pm.max_children" = "32"; @@ -389,11 +340,7 @@ in config = { dbtype = mkOption { - type = types.enum [ - "sqlite" - "pgsql" - "mysql" - ]; + type = types.enum [ "sqlite" "pgsql" "mysql" ]; default = "sqlite"; description = lib.mdDoc "Database type."; }; @@ -467,12 +414,7 @@ in }; overwriteProtocol = mkOption { - type = types.nullOr ( - types.enum [ - "http" - "https" - ] - ); + type = types.nullOr (types.enum [ "http" "https" ]); default = null; example = "https"; @@ -1130,10 +1072,7 @@ in group = "nextcloud"; isSystemUser = true; }; - users.groups.nextcloud.members = [ - "nextcloud" - config.services.nginx.user - ]; + users.groups.nextcloud.members = [ "nextcloud" config.services.nginx.user ]; environment.systemPackages = [ occ ]; diff --git a/test/diff/idioms_nixos_2/out.nix b/test/diff/idioms_nixos_2/out.nix index 7502b9f9..4fb18d54 100644 --- a/test/diff/idioms_nixos_2/out.nix +++ b/test/diff/idioms_nixos_2/out.nix @@ -75,58 +75,27 @@ in { imports = [ - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "config" - "adminpass" - ] - '' - Please use `services.nextcloud.config.adminpassFile' instead! - '' - ) - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "config" - "dbpass" - ] - '' - Please use `services.nextcloud.config.dbpassFile' instead! - '' - ) - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "nginx" - "enable" - ] - '' - The nextcloud module supports `nginx` as reverse-proxy by default and doesn't - support other reverse-proxies officially. - - However it's possible to use an alternative reverse-proxy by - - * disabling nginx - * setting `listen.owner` & `listen.group` in the phpfpm-pool to a different value - - Further details about this can be found in the `Nextcloud`-section of the NixOS-manual - (which can be opened e.g. by running `nixos-help`). - '' - ) - (mkRemovedOptionModule - [ - "services" - "nextcloud" - "disableImagemagick" - ] - '' - Use services.nextcloud.enableImagemagick instead. - '' - ) + (mkRemovedOptionModule [ "services" "nextcloud" "config" "adminpass" ] '' + Please use `services.nextcloud.config.adminpassFile' instead! + '') + (mkRemovedOptionModule [ "services" "nextcloud" "config" "dbpass" ] '' + Please use `services.nextcloud.config.dbpassFile' instead! + '') + (mkRemovedOptionModule [ "services" "nextcloud" "nginx" "enable" ] '' + The nextcloud module supports `nginx` as reverse-proxy by default and doesn't + support other reverse-proxies officially. + + However it's possible to use an alternative reverse-proxy by + + * disabling nginx + * setting `listen.owner` & `listen.group` in the phpfpm-pool to a different value + + Further details about this can be found in the `Nextcloud`-section of the NixOS-manual + (which can be opened e.g. by running `nixos-help`). + '') + (mkRemovedOptionModule [ "services" "nextcloud" "disableImagemagick" ] '' + Use services.nextcloud.enableImagemagick instead. + '') ]; options.services.nextcloud = { @@ -234,12 +203,7 @@ in description = lib.mdDoc "Log level value between 0 (DEBUG) and 4 (FATAL)."; }; logType = mkOption { - type = types.enum [ - "errorlog" - "file" - "syslog" - "systemd" - ]; + type = types.enum [ "errorlog" "file" "syslog" "systemd" ]; default = "syslog"; description = lib.mdDoc '' Logging backend to use. @@ -255,18 +219,11 @@ in package = mkOption { type = types.package; description = lib.mdDoc "Which package to use for the Nextcloud instance."; - relatedPackages = [ - "nextcloud24" - "nextcloud25" - "nextcloud26" - ]; + relatedPackages = [ "nextcloud24" "nextcloud25" "nextcloud26" ]; }; phpPackage = mkOption { type = types.package; - relatedPackages = [ - "php80" - "php81" - ]; + relatedPackages = [ "php80" "php81" ]; defaultText = "pkgs.php"; description = lib.mdDoc '' PHP package to use for Nextcloud. @@ -338,13 +295,7 @@ in }; poolSettings = mkOption { - type = - with types; - attrsOf (oneOf [ - str - int - bool - ]); + type = with types; attrsOf (oneOf [ str int bool ]); default = { "pm" = "dynamic"; "pm.max_children" = "32"; @@ -392,11 +343,7 @@ in config = { dbtype = mkOption { - type = types.enum [ - "sqlite" - "pgsql" - "mysql" - ]; + type = types.enum [ "sqlite" "pgsql" "mysql" ]; default = "sqlite"; description = lib.mdDoc "Database type."; }; @@ -470,12 +417,7 @@ in }; overwriteProtocol = mkOption { - type = types.nullOr ( - types.enum [ - "http" - "https" - ] - ); + type = types.nullOr (types.enum [ "http" "https" ]); default = null; example = "https"; @@ -1133,10 +1075,7 @@ in group = "nextcloud"; isSystemUser = true; }; - users.groups.nextcloud.members = [ - "nextcloud" - config.services.nginx.user - ]; + users.groups.nextcloud.members = [ "nextcloud" config.services.nginx.user ]; environment.systemPackages = [ occ ]; diff --git a/test/diff/idioms_pkgs_3/out-pure.nix b/test/diff/idioms_pkgs_3/out-pure.nix index 066bc56e..fce7fe74 100644 --- a/test/diff/idioms_pkgs_3/out-pure.nix +++ b/test/diff/idioms_pkgs_3/out-pure.nix @@ -270,10 +270,7 @@ buildStdenv.mkDerivation ({ # Ignore trivial whitespace changes in patches, this fixes compatibility of # ./env_var_for_system_dir.patch with Firefox >=65 without having to track # two patches. - patchFlags = [ - "-p1" - "-l" - ]; + patchFlags = [ "-p1" "-l" ]; # if not explicitly set, wrong cc from buildStdenv would be used HOST_CC = "${llvmPackagesBuildBuild.stdenv.cc}/bin/cc"; @@ -297,10 +294,7 @@ buildStdenv.mkDerivation ({ which wrapGAppsHook ] - ++ lib.optionals crashreporterSupport [ - dump_syms - patchelf - ] + ++ lib.optionals crashreporterSupport [ dump_syms patchelf ] ++ lib.optionals pgoSupport [ xvfb-run ] ++ extraNativeBuildInputs; @@ -484,10 +478,7 @@ buildStdenv.mkDerivation ({ ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed ++ lib.optional sndioSupport sndio ++ lib.optional gssSupport libkrb5 - ++ lib.optionals waylandSupport [ - libxkbcommon - libdrm - ] + ++ lib.optionals waylandSupport [ libxkbcommon libdrm ] ++ lib.optional jemallocSupport jemalloc ++ extraBuildInputs; diff --git a/test/diff/idioms_pkgs_3/out.nix b/test/diff/idioms_pkgs_3/out.nix index 13f30559..7477891f 100644 --- a/test/diff/idioms_pkgs_3/out.nix +++ b/test/diff/idioms_pkgs_3/out.nix @@ -272,10 +272,7 @@ buildStdenv.mkDerivation ({ # Ignore trivial whitespace changes in patches, this fixes compatibility of # ./env_var_for_system_dir.patch with Firefox >=65 without having to track # two patches. - patchFlags = [ - "-p1" - "-l" - ]; + patchFlags = [ "-p1" "-l" ]; # if not explicitly set, wrong cc from buildStdenv would be used HOST_CC = "${llvmPackagesBuildBuild.stdenv.cc}/bin/cc"; @@ -299,10 +296,7 @@ buildStdenv.mkDerivation ({ which wrapGAppsHook ] - ++ lib.optionals crashreporterSupport [ - dump_syms - patchelf - ] + ++ lib.optionals crashreporterSupport [ dump_syms patchelf ] ++ lib.optionals pgoSupport [ xvfb-run ] ++ extraNativeBuildInputs; @@ -486,10 +480,7 @@ buildStdenv.mkDerivation ({ ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed ++ lib.optional sndioSupport sndio ++ lib.optional gssSupport libkrb5 - ++ lib.optionals waylandSupport [ - libxkbcommon - libdrm - ] + ++ lib.optionals waylandSupport [ libxkbcommon libdrm ] ++ lib.optional jemallocSupport jemalloc ++ extraBuildInputs; diff --git a/test/diff/idioms_pkgs_4/out-pure.nix b/test/diff/idioms_pkgs_4/out-pure.nix index a4ed06e4..966d3028 100644 --- a/test/diff/idioms_pkgs_4/out-pure.nix +++ b/test/diff/idioms_pkgs_4/out-pure.nix @@ -22,11 +22,7 @@ let (lib.optionals (system == "i686-solaris") [ "/usr/gnu" ]) ++ (lib.optionals (system == "i686-netbsd") [ "/usr/pkg" ]) ++ (lib.optionals (system == "x86_64-solaris") [ "/opt/local/gnu" ]) - ++ [ - "/" - "/usr" - "/usr/local" - ]; + ++ [ "/" "/usr" "/usr/local" ]; prehookBase = '' # Disable purity tests; it's allowed (even needed) to link to diff --git a/test/diff/idioms_pkgs_4/out.nix b/test/diff/idioms_pkgs_4/out.nix index 717216df..fbeb7a0d 100644 --- a/test/diff/idioms_pkgs_4/out.nix +++ b/test/diff/idioms_pkgs_4/out.nix @@ -22,11 +22,7 @@ let (lib.optionals (system == "i686-solaris") [ "/usr/gnu" ]) ++ (lib.optionals (system == "i686-netbsd") [ "/usr/pkg" ]) ++ (lib.optionals (system == "x86_64-solaris") [ "/opt/local/gnu" ]) - ++ [ - "/" - "/usr" - "/usr/local" - ]; + ++ [ "/" "/usr" "/usr/local" ]; prehookBase = '' # Disable purity tests; it's allowed (even needed) to link to diff --git a/test/diff/idioms_pkgs_5/out-pure.nix b/test/diff/idioms_pkgs_5/out-pure.nix index fc02b21a..5ebd409c 100644 --- a/test/diff/idioms_pkgs_5/out-pure.nix +++ b/test/diff/idioms_pkgs_5/out-pure.nix @@ -164,16 +164,10 @@ let # Including it then would cause needless mass rebuilds. # # TODO(@Ericson2314): Make [ "build" "host" ] always the default / resolve #87909 - configurePlatforms ? - optionals - ( - stdenv.hostPlatform != stdenv.buildPlatform - || config.configurePlatformsByDefault - ) - [ - "build" - "host" - ], + configurePlatforms ? optionals ( + stdenv.hostPlatform != stdenv.buildPlatform + || config.configurePlatformsByDefault + ) [ "build" "host" ], # TODO(@Ericson2314): Make unconditional / resolve #33599 # Check phase @@ -503,11 +497,7 @@ let // optionalAttrs __structuredAttrs { env = checkedEnv; } // { builder = attrs.realBuilder or stdenv.shell; - args = - attrs.args or [ - "-e" - (attrs.builder or ./default-builder.sh) - ]; + args = attrs.args or [ "-e" (attrs.builder or ./default-builder.sh) ]; inherit stdenv; # The `system` attribute of a derivation has special meaning to Nix. @@ -647,10 +637,7 @@ let [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile - ++ [ - propagatedSandboxProfile - sandboxProfile - ]; + ++ [ propagatedSandboxProfile sandboxProfile ]; final = concatStringsSep "\n" (filter (x: x != "") (unique profiles)); in final; @@ -663,12 +650,7 @@ let ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ stdenv.__extraImpureHostDeps - ++ [ - "/dev/zero" - "/dev/random" - "/dev/urandom" - "/bin/sh" - ]; + ++ [ "/dev/zero" "/dev/random" "/dev/urandom" "/bin/sh" ]; __propagatedImpureHostDeps = computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps; } diff --git a/test/diff/idioms_pkgs_5/out.nix b/test/diff/idioms_pkgs_5/out.nix index eab21af3..47d0235b 100644 --- a/test/diff/idioms_pkgs_5/out.nix +++ b/test/diff/idioms_pkgs_5/out.nix @@ -164,16 +164,10 @@ let # Including it then would cause needless mass rebuilds. # # TODO(@Ericson2314): Make [ "build" "host" ] always the default / resolve #87909 - configurePlatforms ? - optionals - ( - stdenv.hostPlatform != stdenv.buildPlatform - || config.configurePlatformsByDefault - ) - [ - "build" - "host" - ], + configurePlatforms ? optionals ( + stdenv.hostPlatform != stdenv.buildPlatform + || config.configurePlatformsByDefault + ) [ "build" "host" ], # TODO(@Ericson2314): Make unconditional / resolve #33599 # Check phase @@ -503,11 +497,7 @@ let // optionalAttrs __structuredAttrs { env = checkedEnv; } // { builder = attrs.realBuilder or stdenv.shell; - args = - attrs.args or [ - "-e" - (attrs.builder or ./default-builder.sh) - ]; + args = attrs.args or [ "-e" (attrs.builder or ./default-builder.sh) ]; inherit stdenv; # The `system` attribute of a derivation has special meaning to Nix. @@ -652,10 +642,7 @@ let [ stdenv.extraSandboxProfile ] ++ computedSandboxProfile ++ computedPropagatedSandboxProfile - ++ [ - propagatedSandboxProfile - sandboxProfile - ]; + ++ [ propagatedSandboxProfile sandboxProfile ]; final = concatStringsSep "\n" (filter (x: x != "") (unique profiles)); in final; diff --git a/test/diff/if_else/out-pure.nix b/test/diff/if_else/out-pure.nix index 479cd610..a938e968 100644 --- a/test/diff/if_else/out-pure.nix +++ b/test/diff/if_else/out-pure.nix @@ -41,13 +41,7 @@ ] then foo - else if - [ - more - multi - line - ] - then + else if [ more multi line ] then bar else baz diff --git a/test/diff/lambda/out-pure.nix b/test/diff/lambda/out-pure.nix index 5d888163..8c8b8370 100644 --- a/test/diff/lambda/out-pure.nix +++ b/test/diff/lambda/out-pure.nix @@ -106,73 +106,35 @@ in ( { - gst_plugins ? [ - gst-plugins-good - gst-plugins-ugly - ], + gst_plugins ? [ gst-plugins-good gst-plugins-ugly ], more ? let in - [ - 1 - 2 - 3 - ], + [ 1 2 3 ], things ? if null then true else false, things ? if null then true else "loooooooooooooooooooooooooooooooooooooooooooong", more ? ( let in - [ - 1 - 2 - 3 - ] - ), - foo ? ( - with bar; - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ), + foo ? (with bar; [ 1 2 3 ]), foo ? ( with bar; let in - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ), things ? (if null then true else false), things ? ( if null then true else "loooooooooooooooooooooooooooooooooooooooooooong" ), things ? ( - if null then - [ - 1 - 2 - 3 - ] - else - "loooooooooooooooooooooooooooooooooooooooooooong" + if null then [ 1 2 3 ] else "loooooooooooooooooooooooooooooooooooooooooooong" ), things ? # comment - ( - if null then - [ - 1 - 2 - 3 - ] - else - "loooooooooooooooooooooooooooooooooooooooooooong" - ), + (if null then [ 1 2 3 ] else "loooooooooooooooooooooooooooooooooooooooooooong"), }: { } ) @@ -184,15 +146,8 @@ in a' = name: '' --nodaemon --syslog --prefix=${name} --pidfile /run/${name}/${name}.pid ${name} ''; - b = - p: with p; [ - ConfigIniFiles - FileSlurp - ]; - b' = p: [ - ConfigIniFiles - FileSlurp - ]; + b = p: with p; [ ConfigIniFiles FileSlurp ]; + b' = p: [ ConfigIniFiles FileSlurp ]; mkUrls = { name, diff --git a/test/diff/lambda/out.nix b/test/diff/lambda/out.nix index 16eb44de..ce9694fd 100644 --- a/test/diff/lambda/out.nix +++ b/test/diff/lambda/out.nix @@ -124,66 +124,31 @@ in more ? let in - [ - 1 - 2 - 3 - ], + [ 1 2 3 ], things ? if null then true else false, things ? if null then true else "loooooooooooooooooooooooooooooooooooooooooooong", more ? ( let in - [ - 1 - 2 - 3 - ] - ), - foo ? ( - with bar; - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ), + foo ? (with bar; [ 1 2 3 ]), foo ? ( with bar; let in - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ), things ? (if null then true else false), things ? ( if null then true else "loooooooooooooooooooooooooooooooooooooooooooong" ), things ? ( - if null then - [ - 1 - 2 - 3 - ] - else - "loooooooooooooooooooooooooooooooooooooooooooong" + if null then [ 1 2 3 ] else "loooooooooooooooooooooooooooooooooooooooooooong" ), things ? # comment - ( - if null then - [ - 1 - 2 - 3 - ] - else - "loooooooooooooooooooooooooooooooooooooooooooong" - ), + (if null then [ 1 2 3 ] else "loooooooooooooooooooooooooooooooooooooooooooong"), }: { } ) diff --git a/test/diff/let_in/out-pure.nix b/test/diff/let_in/out-pure.nix index 6870e5b3..a8520154 100644 --- a/test/diff/let_in/out-pure.nix +++ b/test/diff/let_in/out-pure.nix @@ -56,10 +56,7 @@ let a = let in - [ - 1 - 2 - ]; + [ 1 2 ]; a = let diff --git a/test/diff/lists/out-pure.nix b/test/diff/lists/out-pure.nix index 6bf6b5ae..a452177e 100644 --- a/test/diff/lists/out-pure.nix +++ b/test/diff/lists/out-pure.nix @@ -50,10 +50,7 @@ [ 1 ] - [ - b - d - ] + [ b d ] [ b d # e @@ -108,20 +105,8 @@ ] - [ - [ - multi - line - ] - ] + [ [ multi line ] ] [ [ [ singleton ] ] ] [ [ [ { } ] ] ] - [ - [ - [ - { } - multiline - ] - ] - ] + [ [ [ { } multiline ] ] ] ] diff --git a/test/diff/lists/out.nix b/test/diff/lists/out.nix index 6798279b..6f1c5e04 100644 --- a/test/diff/lists/out.nix +++ b/test/diff/lists/out.nix @@ -53,10 +53,7 @@ 1 ] - [ - b - d - ] + [ b d ] [ b d # e @@ -111,20 +108,8 @@ ] - [ - [ - multi - line - ] - ] + [ [ multi line ] ] [ [ [ singleton ] ] ] [ [ [ { } ] ] ] - [ - [ - [ - { } - multiline - ] - ] - ] + [ [ [ { } multiline ] ] ] ] diff --git a/test/diff/monsters_3/out-pure.nix b/test/diff/monsters_3/out-pure.nix index 063dc219..fd242fbf 100644 --- a/test/diff/monsters_3/out-pure.nix +++ b/test/diff/monsters_3/out-pure.nix @@ -45,13 +45,7 @@ stdenv.mkDerivation rec { wrapGAppsHook4 glib # for glib-compile-resources ]; - buildInputs = [ - cairo - glib - gtk4 - libadwaita - pango - ]; + buildInputs = [ cairo glib gtk4 libadwaita pango ]; postPatch = '' patchShebangs build-aux/meson_post_install.py # https://gitlab.gnome.org/World/design/contrast/-/merge_requests/23 diff --git a/test/diff/monsters_3/out.nix b/test/diff/monsters_3/out.nix index 063dc219..fd242fbf 100644 --- a/test/diff/monsters_3/out.nix +++ b/test/diff/monsters_3/out.nix @@ -45,13 +45,7 @@ stdenv.mkDerivation rec { wrapGAppsHook4 glib # for glib-compile-resources ]; - buildInputs = [ - cairo - glib - gtk4 - libadwaita - pango - ]; + buildInputs = [ cairo glib gtk4 libadwaita pango ]; postPatch = '' patchShebangs build-aux/meson_post_install.py # https://gitlab.gnome.org/World/design/contrast/-/merge_requests/23 diff --git a/test/diff/operation/out-pure.nix b/test/diff/operation/out-pure.nix index f032b244..ff45bbe2 100644 --- a/test/diff/operation/out-pure.nix +++ b/test/diff/operation/out-pure.nix @@ -45,10 +45,7 @@ # comment on function application || foo bar baz # comment on function application 2 - || foo bar baz [ - 1 - 2 - ] + || foo bar baz [ 1 2 ] # comment on other || foo ? bar ) @@ -92,69 +89,16 @@ execFormats.elf ) ( - [ - aaaaaaaaaaaaa - aaaaaaaaaaaaa - ] - + - [ - bbbbbbbbbbbbbb - bbbbbbbbbbbbbbb - ] - * [ - ccccccccccccccc - ccccccccccccccccccc - ] + [ aaaaaaaaaaaaa aaaaaaaaaaaaa ] + + [ bbbbbbbbbbbbbb bbbbbbbbbbbbbbb ] * [ ccccccccccccccc ccccccccccccccccccc ] ) ( - [ - aaaaaaaaaaaaa - aaaaaaaaaaaaa - ] - * [ - bbbbbbbbbbbbbb - bbbbbbbbbbbbbbb - ] - + [ - ccccccccccccccc - ccccccccccccccccccc - ] + [ aaaaaaaaaaaaa aaaaaaaaaaaaa ] * [ bbbbbbbbbbbbbb bbbbbbbbbbbbbbb ] + + [ ccccccccccccccc ccccccccccccccccccc ] ) - ( - [ - 1 - 2 - 3 - ] - / [ - 4 - 5 - 6 - ] - / [ - 7 - 8 - 9 - ] - ) - ( - [ - 1 - 2 - 3 - ] - ++ [ - 4 - 5 - 6 - ] - ++ [ - 7 - 8 - 9 - ] - ) + ([ 1 2 3 ] / [ 4 5 6 ] / [ 7 8 9 ]) + ([ 1 2 3 ] ++ [ 4 5 6 ] ++ [ 7 8 9 ]) ( [ @@ -168,10 +112,7 @@ ] ++ (if foo then [ bar ] else [ baz ]) ++ [ ] - ++ (optionals condition [ - more - items - ]) + ++ (optionals condition [ more items ]) ) # Test precedence @@ -234,25 +175,7 @@ ) # Indentation with parenthesized multiline function call - ( - [ - 1 - 2 - 3 - ] - ++ (isOneOf item [ - 1 - 2 - 3 - 4 - ]) - ++ isOneOf item [ - 1 - 2 - 3 - 4 - ] - ) + ([ 1 2 3 ] ++ (isOneOf item [ 1 2 3 4 ]) ++ isOneOf item [ 1 2 3 4 ]) # Interaction with function calls ( g { diff --git a/test/diff/operation/out.nix b/test/diff/operation/out.nix index 3e1759f4..1c93ec56 100644 --- a/test/diff/operation/out.nix +++ b/test/diff/operation/out.nix @@ -92,69 +92,16 @@ execFormats.elf ) ( - [ - aaaaaaaaaaaaa - aaaaaaaaaaaaa - ] - + - [ - bbbbbbbbbbbbbb - bbbbbbbbbbbbbbb - ] - * [ - ccccccccccccccc - ccccccccccccccccccc - ] + [ aaaaaaaaaaaaa aaaaaaaaaaaaa ] + + [ bbbbbbbbbbbbbb bbbbbbbbbbbbbbb ] * [ ccccccccccccccc ccccccccccccccccccc ] ) ( - [ - aaaaaaaaaaaaa - aaaaaaaaaaaaa - ] - * [ - bbbbbbbbbbbbbb - bbbbbbbbbbbbbbb - ] - + [ - ccccccccccccccc - ccccccccccccccccccc - ] + [ aaaaaaaaaaaaa aaaaaaaaaaaaa ] * [ bbbbbbbbbbbbbb bbbbbbbbbbbbbbb ] + + [ ccccccccccccccc ccccccccccccccccccc ] ) - ( - [ - 1 - 2 - 3 - ] - / [ - 4 - 5 - 6 - ] - / [ - 7 - 8 - 9 - ] - ) - ( - [ - 1 - 2 - 3 - ] - ++ [ - 4 - 5 - 6 - ] - ++ [ - 7 - 8 - 9 - ] - ) + ([ 1 2 3 ] / [ 4 5 6 ] / [ 7 8 9 ]) + ([ 1 2 3 ] ++ [ 4 5 6 ] ++ [ 7 8 9 ]) ( [ @@ -168,10 +115,7 @@ ] ++ (if foo then [ bar ] else [ baz ]) ++ [ ] - ++ (optionals condition [ - more - items - ]) + ++ (optionals condition [ more items ]) ) # Test precedence @@ -236,25 +180,7 @@ ) # Indentation with parenthesized multiline function call - ( - [ - 1 - 2 - 3 - ] - ++ (isOneOf item [ - 1 - 2 - 3 - 4 - ]) - ++ isOneOf item [ - 1 - 2 - 3 - 4 - ] - ) + ([ 1 2 3 ] ++ (isOneOf item [ 1 2 3 4 ]) ++ isOneOf item [ 1 2 3 4 ]) # Interaction with function calls ( g { diff --git a/test/diff/pattern/out-pure.nix b/test/diff/pattern/out-pure.nix index cdac106f..cd9de788 100644 --- a/test/diff/pattern/out-pure.nix +++ b/test/diff/pattern/out-pure.nix @@ -50,11 +50,7 @@ ) ( { - a ? [ - 1 - 2 - 3 - ], + a ? [ 1 2 3 ], b ? { # ... }, diff --git a/test/diff/with/out-pure.nix b/test/diff/with/out-pure.nix index 9c71920b..5671082d 100644 --- a/test/diff/with/out-pure.nix +++ b/test/diff/with/out-pure.nix @@ -33,11 +33,7 @@ { a = with b; # comment - [ - 1 - 2 - 3 - ]; + [ 1 2 3 ]; } { a = @@ -51,16 +47,8 @@ } ([ 1 ]) (with a; [ 1 ]) - ([ - 1 - 2 - 3 - ]) - (with a; [ - 1 - 2 - 3 - ]) + ([ 1 2 3 ]) + (with a; [ 1 2 3 ]) (with a; with b; with c; [ 1 ]) (with a; with b; with c; { a = 1; }) ( @@ -90,46 +78,24 @@ } ) { a = with b; with b; with b; 1; } - { - binPath = - with pkgs; - makeBinPath ([ - rsync - util-linux - ]); - } + { binPath = with pkgs; makeBinPath ([ rsync util-linux ]); } (with a; { }) - (with a; [ - 1 - 2 - 3 - ]) + (with a; [ 1 2 3 ]) (with a; if null then true else false) ( with a; let in - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ) ( { - gst_plugins ? with gst_all_1; [ - gst-plugins-good - gst-plugins-ugly - ], + gst_plugins ? with gst_all_1; [ gst-plugins-good gst-plugins-ugly ], more ? with stuff; let in - [ - 1 - 2 - 3 - ], + [ 1 2 3 ], things ? with a; if null then true else false, things ? with a; @@ -142,11 +108,7 @@ with stuff; let in - [ - 1 - 2 - 3 - ]; + [ 1 2 3 ]; things = with a; if null then true else false; things = with a; diff --git a/test/diff/with/out.nix b/test/diff/with/out.nix index dbaea7e0..11054e81 100644 --- a/test/diff/with/out.nix +++ b/test/diff/with/out.nix @@ -33,11 +33,7 @@ { a = with b; # comment - [ - 1 - 2 - 3 - ]; + [ 1 2 3 ]; } { a = @@ -51,16 +47,8 @@ } ([ 1 ]) (with a; [ 1 ]) - ([ - 1 - 2 - 3 - ]) - (with a; [ - 1 - 2 - 3 - ]) + ([ 1 2 3 ]) + (with a; [ 1 2 3 ]) (with a; with b; with c; [ 1 ]) (with a; with b; with c; { a = 1; }) ( @@ -101,21 +89,13 @@ ]); } (with a; { }) - (with a; [ - 1 - 2 - 3 - ]) + (with a; [ 1 2 3 ]) (with a; if null then true else false) ( with a; let in - [ - 1 - 2 - 3 - ] + [ 1 2 3 ] ) ( { @@ -127,11 +107,7 @@ with stuff; let in - [ - 1 - 2 - 3 - ], + [ 1 2 3 ], things ? with a; if null then true else false, things ? with a;