diff --git a/lib/generators.nix b/lib/generators.nix index 79ae9055ce3d..3bc0fee332ae 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -10,7 +10,7 @@ * are mostly generators themselves, called with * their respective default values; they can be reused. * - * Tests can be found in ./tests.nix + * Tests can be found in ./tests/misc.nix * Documentation in the manual, #sec-generators */ { lib }: @@ -108,7 +108,7 @@ rec { * The mk* configuration attributes can generically change * the way sections and key-value strings are generated. * - * For more examples see the test cases in ./tests.nix. + * For more examples see the test cases in ./tests/misc.nix. */ toINI = { # apply transformations (e.g. escapes) to section names @@ -130,6 +130,51 @@ rec { # map input to ini sections mapAttrsToStringsSep "\n" mkSection attrsOfAttrs; + /* Generate an INI-style config file from an attrset + * specifying the global section (no header), and an + * attrset of sections to an attrset of key-value pairs. + * + * generators.toINIWithGlobalSection {} { + * globalSection = { + * someGlobalKey = "hi"; + * }; + * sections = { + * foo = { hi = "${pkgs.hello}"; ciao = "bar"; }; + * baz = { "also, integers" = 42; }; + * } + * + *> someGlobalKey=hi + *> + *> [baz] + *> also, integers=42 + *> + *> [foo] + *> ciao=bar + *> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10 + * + * The mk* configuration attributes can generically change + * the way sections and key-value strings are generated. + * + * For more examples see the test cases in ./tests/misc.nix. + * + * If you don’t need a global section, you can also use + * `generators.toINI` directly, which only takes + * the part in `sections`. + */ + toINIWithGlobalSection = { + # apply transformations (e.g. escapes) to section names + mkSectionName ? (name: libStr.escape [ "[" "]" ] name), + # format a setting line from key and value + mkKeyValue ? mkKeyValueDefault {} "=", + # allow lists as values for duplicate keys + listsAsDuplicateKeys ? false + }: { globalSection, sections }: + ( if globalSection == {} + then "" + else (toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } globalSection) + + "\n") + + (toINI { inherit mkSectionName mkKeyValue listsAsDuplicateKeys; } sections); + /* Generate a git-config file from an attrset. * * It has two major differences from the regular INI format: diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 9012bba2b567..fcccf89cc888 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -471,6 +471,66 @@ runTests { ''; }; + testToINIWithGlobalSectionEmpty = { + expr = generators.toINIWithGlobalSection {} { + globalSection = { + }; + sections = { + }; + }; + expected = '' + ''; + }; + + testToINIWithGlobalSectionGlobalEmptyIsTheSameAsToINI = + let + sections = { + "section 1" = { + attribute1 = 5; + x = "Me-se JarJar Binx"; + }; + "foo" = { + "he\\h=he" = "this is okay"; + }; + }; + in { + expr = + generators.toINIWithGlobalSection {} { + globalSection = {}; + sections = sections; + }; + expected = generators.toINI {} sections; + }; + + testToINIWithGlobalSectionFull = { + expr = generators.toINIWithGlobalSection {} { + globalSection = { + foo = "bar"; + test = false; + }; + sections = { + "section 1" = { + attribute1 = 5; + x = "Me-se JarJar Binx"; + }; + "foo" = { + "he\\h=he" = "this is okay"; + }; + }; + }; + expected = '' + foo=bar + test=false + + [foo] + he\h\=he=this is okay + + [section 1] + attribute1=5 + x=Me-se JarJar Binx + ''; + }; + /* right now only invocation check */ testToJSONSimple = let val = { diff --git a/pkgs/applications/graphics/hydrus/default.nix b/pkgs/applications/graphics/hydrus/default.nix index 1d0cf4bec7d0..63174ecba98d 100644 --- a/pkgs/applications/graphics/hydrus/default.nix +++ b/pkgs/applications/graphics/hydrus/default.nix @@ -10,14 +10,14 @@ python3Packages.buildPythonPackage rec { pname = "hydrus"; - version = "478"; + version = "479"; format = "other"; src = fetchFromGitHub { owner = "hydrusnetwork"; repo = "hydrus"; rev = "v${version}"; - sha256 = "sha256-ZsQzKc2fOFTzI/kBS8ws2+XT9kRAn4L55n1EZgVy4Kk="; + sha256 = "sha256-hP+tOrtYfxAKmNCJSYWQzmd0hjxktNEjJqb42lPG9IM="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 468a06af2091..0947686144e5 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, pcre, perl, flex, bison, gettext, libpcap, libnl, c-ares +{ lib, stdenv, buildPackages, fetchurl, pkg-config, pcre, perl, flex, bison, gettext, libpcap, libnl, c-ares , gnutls, libgcrypt, libgpg-error, geoip, openssl, lua5, python3, libcap, glib , libssh, nghttp2, zlib, cmake, makeWrapper, wrapGAppsHook , withQt ? true, qt5 ? null @@ -29,22 +29,30 @@ in stdenv.mkDerivation { "-DENABLE_APPLICATION_BUNDLE=${if withQt && stdenv.isDarwin then "ON" else "OFF"}" # Fix `extcap` and `plugins` paths. See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16444 "-DCMAKE_INSTALL_LIBDIR=lib" + "-DLEMON_C_COMPILER=cc" + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "-DHAVE_C99_VSNPRINTF_EXITCODE=0" + "-DHAVE_C99_VSNPRINTF_EXITCODE__TRYRUN_OUTPUT=" ]; # Avoid referencing -dev paths because of debug assertions. NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ]; - nativeBuildInputs = [ asciidoctor bison cmake flex makeWrapper pkg-config ] + nativeBuildInputs = [ asciidoctor bison cmake flex makeWrapper pkg-config python3 perl ] ++ optionals withQt [ qt5.wrapQtAppsHook wrapGAppsHook ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + buildInputs = [ - gettext pcre perl libpcap lua5 libssh nghttp2 openssl libgcrypt - libgpg-error gnutls geoip c-ares python3 glib zlib + gettext pcre libpcap lua5 libssh nghttp2 openssl libgcrypt + libgpg-error gnutls geoip c-ares glib zlib ] ++ optionals withQt (with qt5; [ qtbase qtmultimedia qtsvg qttools ]) ++ optionals stdenv.isLinux [ libcap libnl ] ++ optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ] ++ optionals (withQt && stdenv.isDarwin) (with qt5; [ qtmacextras ]); + strictDeps = true; + patches = [ ./wireshark-lookup-dumpcap-in-path.patch ]; postPatch = '' diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 4789d654ae68..0f88a18a4787 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -22,10 +22,10 @@ let common = { version, sha256, extraPatches ? [ ] }: stdenv.mkDerivation (rec { inherit version; - pname = "subversion"; + pname = "subversion${lib.optionalString (!bdbSupport && perlBindings && pythonBindings) "-client"}"; src = fetchurl { - url = "mirror://apache/subversion/${pname}-${version}.tar.bz2"; + url = "mirror://apache/subversion/subversion-${version}.tar.bz2"; inherit sha256; }; diff --git a/pkgs/applications/virtualization/x11docker/default.nix b/pkgs/applications/virtualization/x11docker/default.nix index bad1e98296c2..621514ad4c82 100644 --- a/pkgs/applications/virtualization/x11docker/default.nix +++ b/pkgs/applications/virtualization/x11docker/default.nix @@ -1,12 +1,12 @@ { lib, stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg, getopt, gnugrep, gawk, ps, mount, iproute2 }: stdenv.mkDerivation rec { pname = "x11docker"; - version = "7.1.3"; + version = "7.1.4"; src = fetchFromGitHub { owner = "mviereck"; repo = "x11docker"; rev = "v${version}"; - sha256 = "sha256-eSarw5RG2ckup9pNlZtAyZAN8IPZy94RRfej9ppiLfo="; + sha256 = "sha256-geYn1ir8h1EAUpTWsTS7giQt5eQwIBFeemS+a940ORg="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/desktops/xfce/applications/mousepad/default.nix b/pkgs/desktops/xfce/applications/mousepad/default.nix index 2b794aa4b8ab..1da88a0104f8 100644 --- a/pkgs/desktops/xfce/applications/mousepad/default.nix +++ b/pkgs/desktops/xfce/applications/mousepad/default.nix @@ -3,10 +3,10 @@ mkXfceDerivation { category = "apps"; pname = "mousepad"; - version = "0.5.8"; + version = "0.5.9"; odd-unstable = false; - sha256 = "sha256-Q5coRO2Swo0LpB+pzi+fxrwNyhcDbQXLuQtepPlCyxY="; + sha256 = "sha256-xuSv2H1+/NNUAm+D8f+f5fPVR97iJ5vIDzPa3S0HLM0="; nativeBuildInputs = [ gobject-introspection ]; diff --git a/pkgs/development/node-packages/default.nix b/pkgs/development/node-packages/default.nix index 9ecb7c5f3ef4..d31da0892e4d 100644 --- a/pkgs/development/node-packages/default.nix +++ b/pkgs/development/node-packages/default.nix @@ -343,13 +343,17 @@ let wrapProgram "$out/bin/postcss" \ --prefix NODE_PATH : ${self.postcss}/lib/node_modules \ --prefix NODE_PATH : ${self.autoprefixer}/lib/node_modules + ln -s '${self.postcss}/lib/node_modules/postcss' "$out/lib/node_modules/postcss" ''; passthru.tests = { simple-execution = pkgs.callPackage ./package-tests/postcss-cli.nix { inherit (self) postcss-cli; }; }; - meta.mainProgram = "postcss"; + meta = { + mainProgram = "postcss"; + maintainers = with lib.maintainers; [ Luflosi ]; + }; }; # To update prisma, please first update prisma-engines to the latest diff --git a/pkgs/development/python-modules/azure-identity/default.nix b/pkgs/development/python-modules/azure-identity/default.nix index 44660e56f426..c4897fb306f9 100644 --- a/pkgs/development/python-modules/azure-identity/default.nix +++ b/pkgs/development/python-modules/azure-identity/default.nix @@ -16,12 +16,12 @@ buildPythonPackage rec { pname = "azure-identity"; - version = "1.8.0"; + version = "1.9.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "sha256-Ag/w5HFXhS5KrIo62waEGCcUfyepTL50qQRCXY5i2Tw="; + sha256 = "sha256-CFTRnaTFZEZBgU3E+VHELgFAC1eS8J37a/+nJti5Fg0="; }; postPatch = '' diff --git a/pkgs/development/python-modules/hatchling/default.nix b/pkgs/development/python-modules/hatchling/default.nix index 09cbdead671a..045bbafd6360 100644 --- a/pkgs/development/python-modules/hatchling/default.nix +++ b/pkgs/development/python-modules/hatchling/default.nix @@ -21,7 +21,7 @@ let pname = "hatchling"; - version = "0.20.1"; + version = "0.22.0"; in buildPythonPackage { inherit pname version; @@ -29,7 +29,7 @@ buildPythonPackage { src = fetchPypi { inherit pname version; - hash = "sha256-l1VRce5H3CSAwZBeuxRyy7bNpOM6zX5s2L1/DXPo/Bg="; + hash = "sha256-BUJ24F4oON/9dWpnnDNM5nIOuh3yuwlvDnLA9uQAIXo="; }; # listed in backend/src/hatchling/ouroboros.py diff --git a/pkgs/development/python-modules/srp/default.nix b/pkgs/development/python-modules/srp/default.nix index 17a3ab51cc7a..13820a236346 100644 --- a/pkgs/development/python-modules/srp/default.nix +++ b/pkgs/development/python-modules/srp/default.nix @@ -1,20 +1,35 @@ -{ buildPythonPackage, fetchPypi, six, lib }: +{ lib +, buildPythonPackage +, fetchPypi +, six +, pythonOlder +}: buildPythonPackage rec { pname = "srp"; - version = "1.0.18"; + version = "1.0.19"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "1582317ccd383dc39d54f223424c588254d73d1cfb2c5c24d945e018ec9516bb"; + hash = "sha256-SOZT6MP1kJCbpAcwbrLoRgosfR+GxWvOWc9Cr1T/XSo="; }; - propagatedBuildInputs = [ six ]; + propagatedBuildInputs = [ + six + ]; # Tests ends up with libssl.so cannot load shared doCheck = false; + pythonImportsCheck = [ + "srp" + ]; + meta = with lib; { + description = "Implementation of the Secure Remote Password protocol (SRP)"; longDescription = '' This package provides an implementation of the Secure Remote Password protocol (SRP). SRP is a cryptographically strong authentication protocol for password-based, mutual authentication over an insecure network connection. diff --git a/pkgs/development/python-modules/tweepy/default.nix b/pkgs/development/python-modules/tweepy/default.nix index c97fd85a8be4..6b7dbee8fa5a 100644 --- a/pkgs/development/python-modules/tweepy/default.nix +++ b/pkgs/development/python-modules/tweepy/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "tweepy"; - version = "4.6.0"; + version = "4.8.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -20,8 +20,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = pname; repo = pname; - rev = "v${version}"; - sha256 = "sha256-7ogsocRTMTO5yegyY7BADu9NrHK7zMMbihBu8oF4UlQ="; + rev = "refs/tags/v${version}"; + sha256 = "sha256-RaM2JN2WOHyZY+AxzgQLvhXg6UnevDbSFSR4jFLsYrc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-cryptography/default.nix b/pkgs/development/python-modules/types-cryptography/default.nix index dd68bfddef7b..508824720366 100644 --- a/pkgs/development/python-modules/types-cryptography/default.nix +++ b/pkgs/development/python-modules/types-cryptography/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "types-cryptography"; - version = "3.3.18"; + version = "3.3.19"; src = fetchPypi { inherit pname version; - sha256 = "sha256-RI/q+a4xImFJvGvOHPj/9U2mYe8Eg398DDFoKYhcNig="; + sha256 = "sha256-+VcTjwczMrnAfq2wgx76pXj9tgTlU6w41yxGeutLfCM="; }; pythonImportsCheck = [ diff --git a/pkgs/development/tools/go-task/default.nix b/pkgs/development/tools/go-task/default.nix index d6e5855d992c..ff8a8174fd75 100644 --- a/pkgs/development/tools/go-task/default.nix +++ b/pkgs/development/tools/go-task/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "go-task"; - version = "3.11.0"; + version = "3.12.0"; src = fetchFromGitHub { owner = pname; repo = "task"; rev = "v${version}"; - sha256 = "sha256-KHeZ0UH7qa+fii+sT7q9ri3DpLOKqQZqCAKQYn4l5M8="; + sha256 = "sha256-FArt9w4nZJW/Kql3Y2rr/IVz+SnWCS2lzNMWF6TN0Bg="; }; - vendorSha256 = "sha256-u+LeH9GijquBeYlA3f2GcyoSP/S7BtBqb8C9OgEA9fY="; + vendorSha256 = "sha256-73DtLYyq3sltzv4VtZMlZaSbP9zA9RZw2wgXVkzwrso="; doCheck = false; diff --git a/pkgs/development/tools/misc/saleae-logic-2/default.nix b/pkgs/development/tools/misc/saleae-logic-2/default.nix index 242d76174ce9..3b9ae267d70a 100644 --- a/pkgs/development/tools/misc/saleae-logic-2/default.nix +++ b/pkgs/development/tools/misc/saleae-logic-2/default.nix @@ -1,10 +1,10 @@ { lib, fetchurl, makeDesktopItem, appimageTools, gtk3 }: let name = "saleae-logic-2"; - version = "2.3.45"; + version = "2.3.47"; src = fetchurl { url = "https://downloads.saleae.com/logic2/Logic-${version}-master.AppImage"; - sha256 = "sha256-kX8jMCUkz7B0muxsEwEttEX+DA2P+6swdZJGHyo7ScA="; + sha256 = "sha256-6/FtdupveKnbAK6LizmJ6BokE0kXgUaMz0sOWi+Fq8k="; }; desktopItem = makeDesktopItem { inherit name; @@ -70,6 +70,6 @@ appimageTools.wrapType2 { description = "Software for Saleae logic analyzers"; license = licenses.unfree; platforms = [ "x86_64-linux" ]; - maintainers = [ maintainers.j-hui ]; + maintainers = with maintainers; [ j-hui newam ]; }; } diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix index 32389d27369c..f10a44710727 100644 --- a/pkgs/os-specific/linux/wireguard/default.nix +++ b/pkgs/os-specific/linux/wireguard/default.nix @@ -7,11 +7,11 @@ assert lib.versionOlder kernel.version "5.6"; stdenv.mkDerivation rec { pname = "wireguard"; - version = "1.0.20210606"; + version = "1.0.20211208"; src = fetchzip { url = "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${version}.tar.xz"; - sha256 = "sha256-ha7x6+41oPRRhuRwEb1ojRWLF1dlEMoJtqXrzRKQ408="; + sha256 = "sha256-MHC4ojhRD8IGwTUE8oEew8IVof9hQCC7CPgVQIBfBRQ="; }; hardeningDisable = [ "pic" ]; diff --git a/pkgs/tools/filesystems/apfsprogs/default.nix b/pkgs/tools/filesystems/apfsprogs/default.nix index 2c2aa108077f..a9f9a746d98b 100644 --- a/pkgs/tools/filesystems/apfsprogs/default.nix +++ b/pkgs/tools/filesystems/apfsprogs/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation { pname = "apfsprogs"; - version = "unstable-2021-10-26"; + version = "unstable-2022-02-23"; src = fetchFromGitHub { owner = "linux-apfs"; repo = "apfsprogs"; - rev = "05ecfa367a8142e289dc76333294271b5edfe395"; - sha256 = "sha256-McGQG8f12DTp/It8KjMHGyfE5tgmgLd7MZlZIn/xC+E="; + rev = "5bce5c7f42843dfbbed90767640e748062e23dd2"; + sha256 = "sha256-0N+aC5paP6ZoXUD7A9lLnF2onbOJU+dqZ8oKs+dCUcg="; }; buildPhase = '' diff --git a/pkgs/tools/misc/ntfy-sh/default.nix b/pkgs/tools/misc/ntfy-sh/default.nix index 6f5a0b011633..c916f61f0d4c 100644 --- a/pkgs/tools/misc/ntfy-sh/default.nix +++ b/pkgs/tools/misc/ntfy-sh/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "ntfy-sh"; - version = "1.18.1"; + version = "1.19.0"; src = fetchFromGitHub { owner = "binwiederhier"; repo = "ntfy"; rev = "v${version}"; - sha256 = "sha256-rXdkNJYpQ8s2BeFRR4fSIuCrdq60me4B3wee64ei8qM="; + sha256 = "sha256-su4Q41x0PrKHRg2R6jxo1KUmWaaLSrU9UZSDsonKNyA="; }; - vendorSha256 = "sha256-7b3cQczQLUZ//5ubKvq8s9U75qJpJaieLN+kzjXIyHg="; + vendorSha256 = "sha256-eZmvngNSYY5Z5Xd5tPXzxv9GkosUMueaBGjZ6L7o/yU="; doCheck = false; diff --git a/pkgs/tools/misc/steampipe/default.nix b/pkgs/tools/misc/steampipe/default.nix index ee97166deb11..664290dbc93a 100644 --- a/pkgs/tools/misc/steampipe/default.nix +++ b/pkgs/tools/misc/steampipe/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "steampipe"; - version = "0.13.3"; + version = "0.13.4"; src = fetchFromGitHub { owner = "turbot"; repo = "steampipe"; rev = "v${version}"; - sha256 = "sha256-zU/FWrlE4TQhzRNOVED7hFub+lehPFD+fEJ3v0PFGdM="; + sha256 = "sha256-Qq8i/uU2TtrEpvTPFmnZdku2vNo5O240dAT2OQKel1U="; }; - vendorSha256 = "sha256-0jixQcgSXQJAd899EWOUKde5OXZcSZwQfH7LRdQlm7c="; + vendorSha256 = "sha256-pEQG9BHhsVDVSOoKJBocLXMLjmP72RM+GXz4nYD4D7s="; proxyVendor = true; # tests are failing for no obvious reasons diff --git a/pkgs/tools/system/goreman/default.nix b/pkgs/tools/system/goreman/default.nix index 8257e930779d..51d70fbc9333 100644 --- a/pkgs/tools/system/goreman/default.nix +++ b/pkgs/tools/system/goreman/default.nix @@ -20,8 +20,6 @@ buildGoModule rec { vendorSha256 = "sha256-87aHBRWm5Odv6LeshZty5N31sC+vdSwGlTYhk3BZkPo="; - doCheck = false; - meta = with lib; { description = "foreman clone written in go language"; homepage = "https://github.com/mattn/goreman"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c73778efa654..539761165cb3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12712,12 +12712,9 @@ with pkgs; buildPackages = buildPackages // { stdenv = buildPackages.gcc8Stdenv; }; }); - go_1_18 = callPackage ../development/compilers/go/1.18.nix ({ + go_1_18 = callPackage ../development/compilers/go/1.18.nix { inherit (darwin.apple_sdk.frameworks) Security Foundation; - } // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) { - stdenv = gcc8Stdenv; - buildPackages = buildPackages // { stdenv = buildPackages.gcc8Stdenv; }; - }); + }; go_2-dev = callPackage ../development/compilers/go/2-dev.nix ({ inherit (darwin.apple_sdk.frameworks) Security Foundation; @@ -29276,11 +29273,11 @@ with pkgs; inherit (callPackages ../applications/version-management/subversion { sasl = cyrus_sasl; }) subversion_1_10 subversion; - subversionClient = appendToName "client" (subversion.override { + subversionClient = subversion.override { bdbSupport = false; perlBindings = true; pythonBindings = true; - }); + }; sublime-music = callPackage ../applications/audio/sublime-music { };