From ae207af82b4c38b878a8928d2d54454a6f6bf387 Mon Sep 17 00:00:00 2001 From: piegames Date: Wed, 23 Oct 2024 21:52:18 +0200 Subject: [PATCH] treewide: More string indentation fixes Follow-up on #350296 with the packages that cause big rebuilds and need to go through staging. --- .../version-management/git/default.nix | 15 ++++---- pkgs/by-name/cu/cue/validator.nix | 4 +-- .../development/compilers/flutter/wrapper.nix | 3 +- pkgs/development/compilers/gcc/default.nix | 3 +- .../haskell-modules/configuration-nix.nix | 2 +- pkgs/development/libraries/check/default.nix | 16 ++++----- .../development/libraries/clutter/default.nix | 24 ++++++------- pkgs/development/libraries/glibc/common.nix | 14 ++++---- pkgs/development/libraries/gmp/4.3.2.nix | 4 +-- pkgs/development/libraries/gmp/5.1.x.nix | 4 +-- pkgs/development/libraries/gmp/6.x.nix | 36 +++++++++---------- pkgs/development/libraries/gnutls/default.nix | 3 +- pkgs/development/libraries/libmpc/default.nix | 10 +++--- .../build-managers/bazel/bazel_7/tests.nix | 2 +- pkgs/development/tools/misc/gdb/default.nix | 8 ++--- .../tools/misc/gengetopt/default.nix | 10 +++--- pkgs/tools/archivers/sharutils/default.nix | 4 +-- pkgs/tools/compression/brotli/default.nix | 22 ++++++------ pkgs/tools/compression/gzip/default.nix | 20 +++++------ pkgs/tools/compression/xz/default.nix | 24 ++++++------- 20 files changed, 117 insertions(+), 111 deletions(-) diff --git a/pkgs/applications/version-management/git/default.nix b/pkgs/applications/version-management/git/default.nix index 1b4f736ed63f..57779cb487d0 100644 --- a/pkgs/applications/version-management/git/default.nix +++ b/pkgs/applications/version-management/git/default.nix @@ -245,10 +245,11 @@ stdenv.mkDerivation (finalAttrs: { + (if svnSupport then '' # wrap git-svn - wrapProgram $out/libexec/git-core/git-svn \ - --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath (perlLibs ++ [svn.out])}" \ - --prefix PATH : "${svn.out}/bin" '' - else '' # replace git-svn by notification script + wrapProgram $out/libexec/git-core/git-svn \ + --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath (perlLibs ++ [svn.out])}" \ + --prefix PATH : "${svn.out}/bin" + '' else '' + # replace git-svn by notification script notSupported $out/libexec/git-core/git-svn '') @@ -261,9 +262,11 @@ stdenv.mkDerivation (finalAttrs: { notSupported $out/libexec/git-core/git-send-email '') - + lib.optionalString withManual ''# Install man pages + + lib.optionalString withManual '' + # Install man pages make -j $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-html \ - -C Documentation '' + -C Documentation + '' + (if guiSupport then '' # Wrap Tcl/Tk programs diff --git a/pkgs/by-name/cu/cue/validator.nix b/pkgs/by-name/cu/cue/validator.nix index cddc3fe342b7..09e852347341 100644 --- a/pkgs/by-name/cu/cue/validator.nix +++ b/pkgs/by-name/cu/cue/validator.nix @@ -5,8 +5,8 @@ # against the fragment described by `document` or the whole definition. # The script will be strict and enforce concrete values, i.e. partial documents are not supported. cueSchemaFile: { document ? null }: - writeShellScript "validate-using-cue" - ''${cue}/bin/cue \ + writeShellScript "validate-using-cue" '' + ${cue}/bin/cue \ --all-errors \ --strict \ vet \ diff --git a/pkgs/development/compilers/flutter/wrapper.nix b/pkgs/development/compilers/flutter/wrapper.nix index 2c1b1ea125c8..9b4123b0e7d9 100644 --- a/pkgs/development/compilers/flutter/wrapper.nix +++ b/pkgs/development/compilers/flutter/wrapper.nix @@ -146,7 +146,8 @@ in '' + lib.optionalString (flutter ? engine && flutter.engine.meta.available) '' --set-default FLUTTER_ENGINE "${flutter.engine}" \ --add-flags "--local-engine-host ${flutter.engine.outName}" \ - '' + '' --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \ + '' + '' + --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \ --suffix PKG_CONFIG_PATH : "$FLUTTER_PKG_CONFIG_PATH" \ --suffix LIBRARY_PATH : '${lib.makeLibraryPath appStaticBuildDeps}' \ --prefix CXXFLAGS "''\t" '${builtins.concatStringsSep " " (includeFlags ++ extraCxxFlags)}' \ diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index d5d59adabb74..40a0484d5c50 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -226,7 +226,8 @@ pipe ((callFile ./common/builder.nix {}) ({ libc = if libcCross != null then libcCross else stdenv.cc.libc; in ( - '' echo "fixing the {GLIBC,UCLIBC,MUSL}_DYNAMIC_LINKER macros..." + '' + echo "fixing the {GLIBC,UCLIBC,MUSL}_DYNAMIC_LINKER macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h do grep -q _DYNAMIC_LINKER "$header" || continue diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 269fef0dd6a8..0a30703684c4 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -523,7 +523,7 @@ self: super: builtins.intersectAttrs super { "--extra-include-dirs=${pkgs.cwiid}/include" "--extra-include-dirs=${pkgs.bluez.dev}/include" ]; - prePatch = '' sed -i -e "/Extra-Lib-Dirs/d" -e "/Include-Dirs/d" "hcwiid.cabal" ''; + prePatch = ''sed -i -e "/Extra-Lib-Dirs/d" -e "/Include-Dirs/d" "hcwiid.cabal"''; }) super.hcwiid; # cabal2nix doesn't pick up some of the dependencies. diff --git a/pkgs/development/libraries/check/default.nix b/pkgs/development/libraries/check/default.nix index 10030f5653c2..82aca7c4ec01 100644 --- a/pkgs/development/libraries/check/default.nix +++ b/pkgs/development/libraries/check/default.nix @@ -22,14 +22,14 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Unit testing framework for C"; - longDescription = - '' Check is a unit testing framework for C. It features a simple - interface for defining unit tests, putting little in the way of the - developer. Tests are run in a separate address space, so Check can - catch both assertion failures and code errors that cause - segmentation faults or other signals. The output from unit tests - can be used within source code editors and IDEs. - ''; + longDescription = '' + Check is a unit testing framework for C. It features a simple + interface for defining unit tests, putting little in the way of the + developer. Tests are run in a separate address space, so Check can + catch both assertion failures and code errors that cause + segmentation faults or other signals. The output from unit tests + can be used within source code editors and IDEs. + ''; homepage = "https://libcheck.github.io/check/"; diff --git a/pkgs/development/libraries/clutter/default.nix b/pkgs/development/libraries/clutter/default.nix index bb7ddf08957f..3831e3105208 100644 --- a/pkgs/development/libraries/clutter/default.nix +++ b/pkgs/development/libraries/clutter/default.nix @@ -84,20 +84,20 @@ stdenv.mkDerivation rec { meta = { description = "Library for creating fast, dynamic graphical user interfaces"; - longDescription = - '' Clutter is free software library for creating fast, compelling, - portable, and dynamic graphical user interfaces. It is a core part - of MeeGo, and is supported by the open source community. Its - development is sponsored by Intel. + longDescription = '' + Clutter is free software library for creating fast, compelling, + portable, and dynamic graphical user interfaces. It is a core part + of MeeGo, and is supported by the open source community. Its + development is sponsored by Intel. - Clutter uses OpenGL for rendering (and optionally OpenGL|ES for use - on mobile and embedded platforms), but wraps an easy to use, - efficient, flexible API around GL's complexity. + Clutter uses OpenGL for rendering (and optionally OpenGL|ES for use + on mobile and embedded platforms), but wraps an easy to use, + efficient, flexible API around GL's complexity. - Clutter enforces no particular user interface style, but provides a - rich, generic foundation for higher-level toolkits tailored to - specific needs. - ''; + Clutter enforces no particular user interface style, but provides a + rich, generic foundation for higher-level toolkits tailored to + specific needs. + ''; license = lib.licenses.lgpl2Plus; homepage = "http://www.clutter-project.org/"; diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index a611cb38d836..09dde042848b 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -283,14 +283,14 @@ stdenv.mkDerivation ({ homepage = "https://www.gnu.org/software/libc/"; description = "GNU C Library"; - longDescription = - '' Any Unix-like operating system needs a C library: the library which - defines the "system calls" and other basic facilities such as - open, malloc, printf, exit... + longDescription = '' + Any Unix-like operating system needs a C library: the library which + defines the "system calls" and other basic facilities such as + open, malloc, printf, exit... - The GNU C library is used as the C library in the GNU system and - most systems with the Linux kernel. - ''; + The GNU C library is used as the C library in the GNU system and + most systems with the Linux kernel. + ''; license = licenses.lgpl2Plus; diff --git a/pkgs/development/libraries/gmp/4.3.2.nix b/pkgs/development/libraries/gmp/4.3.2.nix index 9d014c266753..2700dad0db09 100644 --- a/pkgs/development/libraries/gmp/4.3.2.nix +++ b/pkgs/development/libraries/gmp/4.3.2.nix @@ -43,8 +43,8 @@ let self = stdenv.mkDerivation rec { branch = "4"; description = "GNU multiple precision arithmetic library"; - longDescription = - '' GMP is a free library for arbitrary precision arithmetic, operating + longDescription = '' + GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich diff --git a/pkgs/development/libraries/gmp/5.1.x.nix b/pkgs/development/libraries/gmp/5.1.x.nix index 43e3ca9759eb..adc4d7946862 100644 --- a/pkgs/development/libraries/gmp/5.1.x.nix +++ b/pkgs/development/libraries/gmp/5.1.x.nix @@ -56,8 +56,8 @@ let self = stdenv.mkDerivation rec { description = "GNU multiple precision arithmetic library"; license = licenses.gpl3Plus; - longDescription = - '' GMP is a free library for arbitrary precision arithmetic, operating + longDescription = '' + GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix index e1a8ff0ecdc1..458c7928c00e 100644 --- a/pkgs/development/libraries/gmp/6.x.nix +++ b/pkgs/development/libraries/gmp/6.x.nix @@ -64,27 +64,27 @@ let self = stdenv.mkDerivation rec { gpl2Only ]; - longDescription = - '' GMP is a free library for arbitrary precision arithmetic, operating - on signed integers, rational numbers, and floating point numbers. - There is no practical limit to the precision except the ones implied - by the available memory in the machine GMP runs on. GMP has a rich - set of functions, and the functions have a regular interface. + longDescription = '' + GMP is a free library for arbitrary precision arithmetic, operating + on signed integers, rational numbers, and floating point numbers. + There is no practical limit to the precision except the ones implied + by the available memory in the machine GMP runs on. GMP has a rich + set of functions, and the functions have a regular interface. - The main target applications for GMP are cryptography applications - and research, Internet security applications, algebra systems, - computational algebra research, etc. + The main target applications for GMP are cryptography applications + and research, Internet security applications, algebra systems, + computational algebra research, etc. - GMP is carefully designed to be as fast as possible, both for small - operands and for huge operands. The speed is achieved by using - fullwords as the basic arithmetic type, by using fast algorithms, - with highly optimised assembly code for the most common inner loops - for a lot of CPUs, and by a general emphasis on speed. + GMP is carefully designed to be as fast as possible, both for small + operands and for huge operands. The speed is achieved by using + fullwords as the basic arithmetic type, by using fast algorithms, + with highly optimised assembly code for the most common inner loops + for a lot of CPUs, and by a general emphasis on speed. - GMP is faster than any other bignum library. The advantage for GMP - increases with the operand sizes for many operations, since GMP uses - asymptotically faster algorithms. - ''; + GMP is faster than any other bignum library. The advantage for GMP + increases with the operand sizes for many operations, since GMP uses + asymptotically faster algorithms. + ''; platforms = platforms.all; maintainers = [ ]; diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix index 3e9395668c85..964c0acb7c78 100644 --- a/pkgs/development/libraries/gnutls/default.nix +++ b/pkgs/development/libraries/gnutls/default.nix @@ -98,7 +98,8 @@ stdenv.mkDerivation rec { sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh - '' + lib.optionalString stdenv.hostPlatform.isMusl '' # See https://gitlab.com/gnutls/gnutls/-/issues/945 + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + # See https://gitlab.com/gnutls/gnutls/-/issues/945 sed '2iecho "certtool tests skipped in musl build"\nexit 0' -i tests/cert-tests/certtool.sh '' + lib.optionalString stdenv.hostPlatform.isLinux '' sed '2iexit 77' -i tests/{ktls,ktls_keyupdate}.sh diff --git a/pkgs/development/libraries/libmpc/default.nix b/pkgs/development/libraries/libmpc/default.nix index fe11b59f4523..053f0113b444 100644 --- a/pkgs/development/libraries/libmpc/default.nix +++ b/pkgs/development/libraries/libmpc/default.nix @@ -26,11 +26,11 @@ stdenv.mkDerivation rec { meta = { description = "Library for multiprecision complex arithmetic with exact rounding"; - longDescription = - '' GNU MPC is a C library for the arithmetic of complex numbers with - arbitrarily high precision and correct rounding of the result. It is - built upon and follows the same principles as GNU MPFR. - ''; + longDescription = '' + GNU MPC is a C library for the arithmetic of complex numbers with + arbitrarily high precision and correct rounding of the result. It is + built upon and follows the same principles as GNU MPFR. + ''; homepage = "https://www.multiprecision.org/mpc/"; license = lib.licenses.lgpl2Plus; diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix index 0976d1c2d5a6..768804ecd555 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix @@ -104,7 +104,7 @@ let } ${# Note https://github.com/bazelbuild/bazel/issues/5763#issuecomment-456374609 # about why to create a subdir for the workspace. - '' cp -r ${workspaceDir} wd && chmod ug+rw -R wd && cd wd '' + ''cp -r ${workspaceDir} wd && chmod ug+rw -R wd && cd wd'' } ${# run the actual test snippet bazelScript diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 40808bcdb439..3a41ff855d38 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -117,10 +117,10 @@ stdenv.mkDerivation rec { ++ lib.optional enableDebuginfod "--with-debuginfod=yes" ++ lib.optional (!enableSim) "--disable-sim"; - postInstall = - '' # Remove Info files already provided by Binutils and other packages. - rm -v $out/share/info/bfd.info - ''; + postInstall = '' + # Remove Info files already provided by Binutils and other packages. + rm -v $out/share/info/bfd.info + ''; # TODO: Investigate & fix the test failures. doCheck = false; diff --git a/pkgs/development/tools/misc/gengetopt/default.nix b/pkgs/development/tools/misc/gengetopt/default.nix index 9ef5ec24d545..b0492665de1b 100644 --- a/pkgs/development/tools/misc/gengetopt/default.nix +++ b/pkgs/development/tools/misc/gengetopt/default.nix @@ -35,11 +35,11 @@ stdenv.mkDerivation rec { description = "Command-line option parser generator"; mainProgram = "gengetopt"; - longDescription = - '' GNU Gengetopt program generates a C function that uses getopt_long - function to parse the command line options, to validate them and - fills a struct - ''; + longDescription = '' + GNU Gengetopt program generates a C function that uses getopt_long + function to parse the command line options, to validate them and + fills a struct + ''; homepage = "https://www.gnu.org/software/gengetopt/"; diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index 557fdae4d22b..6a30ae1ff946 100644 --- a/pkgs/tools/archivers/sharutils/default.nix +++ b/pkgs/tools/archivers/sharutils/default.nix @@ -66,8 +66,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Tools for remote synchronization and `shell archives'"; - longDescription = - '' GNU shar makes so-called shell archives out of many files, preparing + longDescription = '' + GNU shar makes so-called shell archives out of many files, preparing them for transmission by electronic mail services. A shell archive is a collection of files that can be unpacked by /bin/sh. A wide range of features provide extensive flexibility in manufacturing diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index 94ed992812e5..0a7bbfe1746c 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -54,18 +54,18 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { homepage = "https://github.com/google/brotli"; description = "Generic-purpose lossless compression algorithm and tool"; - longDescription = - '' Brotli is a generic-purpose lossless compression algorithm that - compresses data using a combination of a modern variant of the LZ77 - algorithm, Huffman coding and 2nd order context modeling, with a - compression ratio comparable to the best currently available - general-purpose compression methods. It is similar in speed with - deflate but offers more dense compression. + longDescription = '' + Brotli is a generic-purpose lossless compression algorithm that + compresses data using a combination of a modern variant of the LZ77 + algorithm, Huffman coding and 2nd order context modeling, with a + compression ratio comparable to the best currently available + general-purpose compression methods. It is similar in speed with + deflate but offers more dense compression. - The specification of the Brotli Compressed Data Format is defined - in the following internet draft: - http://www.ietf.org/id/draft-alakuijala-brotli - ''; + The specification of the Brotli Compressed Data Format is defined + in the following internet draft: + http://www.ietf.org/id/draft-alakuijala-brotli + ''; license = licenses.mit; maintainers = with maintainers; [ freezeboy ]; pkgConfigModules = [ diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 8b10fa1c98d4..cbca093bcb4f 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -55,17 +55,17 @@ stdenv.mkDerivation rec { homepage = "https://www.gnu.org/software/gzip/"; description = "GNU zip compression program"; - longDescription = - ''gzip (GNU zip) is a popular data compression program written by - Jean-loup Gailly for the GNU project. Mark Adler wrote the - decompression part. + longDescription = '' + gzip (GNU zip) is a popular data compression program written by + Jean-loup Gailly for the GNU project. Mark Adler wrote the + decompression part. - We developed this program as a replacement for compress because of - the Unisys and IBM patents covering the LZW algorithm used by - compress. These patents made it impossible for us to use compress, - and we needed a replacement. The superior compression ratio of gzip - is just a bonus. - ''; + We developed this program as a replacement for compress because of + the Unisys and IBM patents covering the LZW algorithm used by + compress. These patents made it impossible for us to use compress, + and we needed a replacement. The superior compression ratio of gzip + is just a bonus. + ''; platforms = lib.platforms.all; diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index c05350ba9b64..47619ac751b3 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -65,19 +65,19 @@ stdenv.mkDerivation (finalAttrs: { changelog = "https://github.com/tukaani-project/xz/releases/tag/v${finalAttrs.version}"; description = "General-purpose data compression software, successor of LZMA"; homepage = "https://tukaani.org/xz/"; - longDescription = - '' XZ Utils is free general-purpose data compression software with high - compression ratio. XZ Utils were written for POSIX-like systems, - but also work on some not-so-POSIX systems. XZ Utils are the - successor to LZMA Utils. + longDescription = '' + XZ Utils is free general-purpose data compression software with high + compression ratio. XZ Utils were written for POSIX-like systems, + but also work on some not-so-POSIX systems. XZ Utils are the + successor to LZMA Utils. - The core of the XZ Utils compression code is based on LZMA SDK, but - it has been modified quite a lot to be suitable for XZ Utils. The - primary compression algorithm is currently LZMA2, which is used - inside the .xz container format. With typical files, XZ Utils - create 30 % smaller output than gzip and 15 % smaller output than - bzip2. - ''; + The core of the XZ Utils compression code is based on LZMA SDK, but + it has been modified quite a lot to be suitable for XZ Utils. The + primary compression algorithm is currently LZMA2, which is used + inside the .xz container format. With typical files, XZ Utils + create 30 % smaller output than gzip and 15 % smaller output than + bzip2. + ''; license = with licenses; [ gpl2Plus lgpl21Plus ]; maintainers = with maintainers; [ sander ]; platforms = platforms.all;