diff --git a/doc/default.nix b/doc/default.nix index 26aae9efa573..bcbc20b9f983 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -25,6 +25,7 @@ let { name = "gvariant"; description = "GVariant formatted string serialization functions"; } { name = "customisation"; description = "Functions to customise (derivation-related) functions, derivatons, or attribute sets"; } { name = "meta"; description = "functions for derivation metadata"; } + { name = "derivations"; description = "miscellaneous derivation-specific functions"; } ]; }; diff --git a/lib/default.nix b/lib/default.nix index f6c94ae91634..a17307be6e07 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -116,7 +116,7 @@ let inherit (self.customisation) overrideDerivation makeOverridable callPackageWith callPackagesWith extendDerivation hydraJob makeScope makeScopeWithSplicing makeScopeWithSplicing'; - inherit (self.derivations) lazyDerivation; + inherit (self.derivations) lazyDerivation optionalDrvAttr; inherit (self.meta) addMetaAttrs dontDistribute setName updateName appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio hiPrioSet getLicenseFromSpdxId getExe getExe'; diff --git a/lib/derivations.nix b/lib/derivations.nix index 5b7ed1868e86..44b727ee31cc 100644 --- a/lib/derivations.nix +++ b/lib/derivations.nix @@ -98,4 +98,30 @@ in # `lazyDerivation` caller knew a shortcut, be taken from there. meta = args.meta or checked.meta; } // passthru; + + /* Conditionally set a derivation attribute. + + Because `mkDerivation` sets `__ignoreNulls = true`, a derivation + attribute set to `null` will not impact the derivation output hash. + Thus, this function passes through its `value` argument if the `cond` + is `true`, but returns `null` if not. + + Type: optionalDrvAttr :: Bool -> a -> a | Null + + Example: + (stdenv.mkDerivation { + name = "foo"; + x = optionalDrvAttr true 1; + y = optionalDrvAttr false 1; + }).drvPath == (stdenv.mkDerivation { + name = "foo"; + x = 1; + }).drvPath + => true + */ + optionalDrvAttr = + # Condition + cond: + # Attribute value + value: if cond then value else null; } diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 3059878ba069..193e68a96933 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -1902,7 +1902,7 @@ runTests { expected = true; }; - # lazyDerivation + # DERIVATIONS testLazyDerivationIsLazyInDerivationForAttrNames = { expr = attrNames (lazyDerivation { @@ -1955,6 +1955,24 @@ runTests { expected = derivation; }; + testOptionalDrvAttr = let + mkDerivation = args: derivation (args // { + builder = "builder"; + system = "system"; + __ignoreNulls = true; + }); + in { + expr = (mkDerivation { + name = "foo"; + x = optionalDrvAttr true 1; + y = optionalDrvAttr false 1; + }).drvPath; + expected = (mkDerivation { + name = "foo"; + x = 1; + }).drvPath; + }; + testTypeDescriptionInt = { expr = (with types; int).description; expected = "signed integer"; diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix index b9821895d37b..0646099973ff 100644 --- a/pkgs/applications/audio/strawberry/default.nix +++ b/pkgs/applications/audio/strawberry/default.nix @@ -10,6 +10,7 @@ , fftw , gnutls , libcdio +, libebur128 , libmtp , libpthreadstubs , libtasn1 @@ -34,21 +35,23 @@ , gst_all_1 , withVlc ? true , libvlc +, nix-update-script }: let - inherit (lib) optionals; + inherit (lib) optionals optionalString; in stdenv.mkDerivation rec { pname = "strawberry"; - version = "1.0.21"; + version = "1.0.23"; src = fetchFromGitHub { owner = "jonaski"; repo = pname; rev = version; - hash = "sha256-McwnYHaw0LYDeHLDQzfqRIYMV2FoiMdHyOL/EE8/esU="; + hash = "sha256-hzZx530HD7R3JOG6cCsoaW9puYkmu7m5lr+EfobKX7o="; + fetchSubmodules = true; }; # the big strawberry shown in the context menu is *very* much in your face, so use the grey version instead @@ -64,6 +67,7 @@ stdenv.mkDerivation rec { fftw gnutls libcdio + libebur128 libidn2 libmtp libpthreadstubs @@ -89,7 +93,7 @@ stdenv.mkDerivation rec { gst-plugins-good gst-plugins-bad gst-plugins-ugly - ]) ++ lib.optional withVlc libvlc; + ]) ++ optionals withVlc [ libvlc ]; nativeBuildInputs = [ cmake @@ -101,13 +105,15 @@ stdenv.mkDerivation rec { util-linux ]; - postInstall = lib.optionalString withGstreamer '' + postInstall = optionalString withGstreamer '' qtWrapperArgs+=( --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" --prefix GIO_EXTRA_MODULES : "${glib-networking.out}/lib/gio/modules" ) ''; + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Music player and music collection organizer"; homepage = "https://www.strawberrymusicplayer.org/"; diff --git a/pkgs/applications/blockchains/optimism/default.nix b/pkgs/applications/blockchains/optimism/default.nix index cd7cc1ce9fe2..1c794cfb1e1a 100644 --- a/pkgs/applications/blockchains/optimism/default.nix +++ b/pkgs/applications/blockchains/optimism/default.nix @@ -6,19 +6,19 @@ buildGoModule rec { pname = "optimism"; - version = "1.1.6"; + version = "1.5.0"; src = fetchFromGitHub { owner = "ethereum-optimism"; repo = "optimism"; rev = "op-node/v${version}"; - hash = "sha256-kzJ2zV4Iz3LqrVrs6mluiXluFqFaftycHhOAE8m0vns="; + hash = "sha256-fg63J1qgsQOTCLHgEWSI6ZxNf9XIPq+aYCumJ/FEx/s="; fetchSubmodules = true; }; subPackages = [ "op-node/cmd" "op-proposer/cmd" "op-batcher/cmd" ]; - vendorHash = "sha256-6ChcT8rgyxiory//EHNA0Q0AZRhUIDpe1pmVeQ66gA4="; + vendorHash = "sha256-9mLS44wzPslPfa+QwBg05+QSL6F0c8fcev1VOI9VPE4="; buildInputs = [ libpcap diff --git a/pkgs/applications/blockchains/optimism/geth.nix b/pkgs/applications/blockchains/optimism/geth.nix index bcc83ec8c95b..722402e704d3 100644 --- a/pkgs/applications/blockchains/optimism/geth.nix +++ b/pkgs/applications/blockchains/optimism/geth.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "op-geth"; - version = "1.101305.1"; + version = "1.101305.3"; src = fetchFromGitHub { owner = "ethereum-optimism"; repo = "op-geth"; rev = "v${version}"; - hash = "sha256-4dsHYyoCkGGu68PiLw37y5yN5kNHroMruIIbnxl4uJE="; + hash = "sha256-AKVwwvt77FZlm7089EeayYVRYLo7c3v6LFVpsQN68Zk="; fetchSubmodules = true; }; @@ -33,7 +33,7 @@ buildGoModule rec { "cmd/utils" ]; - vendorHash = "sha256-lTkbdzRuWqgFl/8N0v9jH8+pVM2k87a/cQF22DqiAIE="; + vendorHash = "sha256-pcIydpKWZt3vwShwzGlPKGq+disdxYFOB8gxHou3mVU="; # Fix for usb-related segmentation faults on darwin propagatedBuildInputs = diff --git a/pkgs/applications/misc/gsctl/default.nix b/pkgs/applications/misc/gsctl/default.nix index bf47ee1899b3..31f8881127d1 100644 --- a/pkgs/applications/misc/gsctl/default.nix +++ b/pkgs/applications/misc/gsctl/default.nix @@ -13,6 +13,15 @@ buildGoModule rec { vendorHash = "sha256-6b4H8YAY8d/qIGnnGPYZoXne1LXHLsc0OEq0lCeqivo="; + patches = [ + ./go120-compatibility.patch + ]; + + postPatch = '' + # fails on sandbox + rm commands/root_test.go + ''; + ldflags = [ "-s" "-w" "-X github.com/giantswarm/gsctl/buildinfo.Version=${version}" diff --git a/pkgs/applications/misc/gsctl/go120-compatibility.patch b/pkgs/applications/misc/gsctl/go120-compatibility.patch new file mode 100644 index 000000000000..81b393c583a4 --- /dev/null +++ b/pkgs/applications/misc/gsctl/go120-compatibility.patch @@ -0,0 +1,21 @@ +--- a/client/clienterror/matcher.go ++++ b/client/clienterror/matcher.go +@@ -2,6 +2,7 @@ package clienterror + + import ( + "crypto/x509" ++ "errors" + "net/http" + + "github.com/giantswarm/microerror" +@@ -101,9 +102,7 @@ func IsServiceUnavailableError(err error) bool { + // a x509.UnknownAuthorityError + func IsCertificateSignedByUnknownAuthorityError(err error) bool { + if clientErr, ok := err.(*APIError); ok { +- if _, certErrorOK := clientErr.OriginalError.(x509.UnknownAuthorityError); certErrorOK { +- return true +- } ++ return errors.As(clientErr.OriginalError, &x509.UnknownAuthorityError{}) + } + + return false diff --git a/pkgs/applications/networking/browsers/floorp/default.nix b/pkgs/applications/networking/browsers/floorp/default.nix index 9e2bba5b4807..d824a385ad5f 100644 --- a/pkgs/applications/networking/browsers/floorp/default.nix +++ b/pkgs/applications/networking/browsers/floorp/default.nix @@ -7,19 +7,19 @@ ((buildMozillaMach rec { pname = "floorp"; - packageVersion = "11.7.1"; + packageVersion = "11.8.2"; applicationName = "Floorp"; binaryName = "floorp"; # Must match the contents of `browser/config/version.txt` in the source tree - version = "115.6.0"; + version = "115.7.0"; src = fetchFromGitHub { owner = "Floorp-Projects"; repo = "Floorp"; fetchSubmodules = true; rev = "v${packageVersion}"; - hash = "sha256-1GxWqibUR10gz0TjQuCtFntlxoNkq4CY5Yt/4FcIDDQ="; + hash = "sha256-bEHl+0MzvQNMCxOjBuFx92gwNr0spVA+on0znBUIhz0="; }; extraConfigureFlags = [ diff --git a/pkgs/applications/networking/cluster/kubedb-cli/default.nix b/pkgs/applications/networking/cluster/kubedb-cli/default.nix index b138c1928256..1972ad27af33 100644 --- a/pkgs/applications/networking/cluster/kubedb-cli/default.nix +++ b/pkgs/applications/networking/cluster/kubedb-cli/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "kubedb-cli"; - version = "0.40.1"; + version = "0.41.0"; src = fetchFromGitHub { owner = "kubedb"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-GGZjqXw0Fi5QdQjVrw//sDVA8oRKADCwHeRY22z7bko="; + sha256 = "sha256-P4B5N2hIDTYtrHk86n3MCvy6IXlDyAUc1wFhXmEkQFA="; }; vendorHash = null; diff --git a/pkgs/by-name/al/alsa-tools/package.nix b/pkgs/by-name/al/alsa-tools/package.nix index b52e15200967..31e949c07cef 100644 --- a/pkgs/by-name/al/alsa-tools/package.nix +++ b/pkgs/by-name/al/alsa-tools/package.nix @@ -12,11 +12,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "alsa-tools"; - version = "1.2.5"; + version = "1.2.11"; src = fetchurl { url = "mirror://alsa/tools/alsa-tools-${finalAttrs.version}.tar.bz2"; - hash = "sha256-NacQJ6AfTX3kci4iNSDpQN5os8VwtsZxaRVnrij5iT4="; + hash = "sha256-CRXJY0pQL9NlXKnFdNJZvJ55mD2R1Frqz/bzwA+K4+k="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/pi/pixi/package.nix b/pkgs/by-name/pi/pixi/package.nix index aa081c7e69a8..1592ce9849f9 100644 --- a/pkgs/by-name/pi/pixi/package.nix +++ b/pkgs/by-name/pi/pixi/package.nix @@ -12,16 +12,16 @@ rustPlatform.buildRustPackage rec { pname = "pixi"; - version = "0.11.1"; + version = "0.13.0"; src = fetchFromGitHub { owner = "prefix-dev"; repo = "pixi"; rev = "v${version}"; - hash = "sha256-NOa8OvZs+BoJQ9qIU1lpMmEOecZpmwwCNYpDk1LUSTI="; + hash = "sha256-4EKJwHXNDUGhwlSSZFoPHdG5WBDoHFAQncG+CpD2sik="; }; - cargoHash = "sha256-rDtr9ITYH5o/QPG1Iozh05iTA8c0i+3DnabXLzyqdrg="; + cargoHash = "sha256-s1ODwuYv1x5/iP8yHS5FRk5MacrW81LaXI7/J+qtPNM="; nativeBuildInputs = [ pkg-config diff --git a/pkgs/development/tools/yj/default.nix b/pkgs/by-name/yj/yj/package.nix similarity index 96% rename from pkgs/development/tools/yj/default.nix rename to pkgs/by-name/yj/yj/package.nix index 150278c0ac4d..ae4597619583 100644 --- a/pkgs/development/tools/yj/default.nix +++ b/pkgs/by-name/yj/yj/package.nix @@ -18,6 +18,7 @@ buildGoModule rec { meta = with lib; { description = "Convert YAML <=> TOML <=> JSON <=> HCL"; license = licenses.asl20; + mainProgram = "yj"; maintainers = with maintainers; [ Profpatsch ]; homepage = "https://github.com/sclevine/yj"; }; diff --git a/pkgs/development/php-packages/php-cs-fixer/default.nix b/pkgs/development/php-packages/php-cs-fixer/default.nix index dadc4dfafa19..611e5f263091 100644 --- a/pkgs/development/php-packages/php-cs-fixer/default.nix +++ b/pkgs/development/php-packages/php-cs-fixer/default.nix @@ -2,14 +2,14 @@ let pname = "php-cs-fixer"; - version = "3.48.0"; + version = "3.49.0"; in mkDerivation { inherit pname version; src = fetchurl { url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar"; - sha256 = "sha256-JPFZ297l83PqJv+yyzTN6DIKsk82MJuo9IEdMPPAPGM="; + sha256 = "sha256-cnH6SEEaEh7X9zlHgHD8eOpaSUDnqhL2SMnNGSj1nJQ="; }; dontUnpack = true; diff --git a/pkgs/development/python-modules/aliyun-python-sdk-iot/default.nix b/pkgs/development/python-modules/aliyun-python-sdk-iot/default.nix index afad8539e7cc..2f08429d54d7 100644 --- a/pkgs/development/python-modules/aliyun-python-sdk-iot/default.nix +++ b/pkgs/development/python-modules/aliyun-python-sdk-iot/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "aliyun-python-sdk-iot"; - version = "8.58.0"; + version = "8.59.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-Aafqju0EcaXv9RYkNSlcc1JnffluXXSl3KR1OcIX+OI="; + hash = "sha256-v0jTMKtYrbEBVjHQokpWSlcJBALZFsuoYHq8wCP8w1E="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/boto3-stubs/default.nix b/pkgs/development/python-modules/boto3-stubs/default.nix index 33ffd9a3d705..1adb7e70c59a 100644 --- a/pkgs/development/python-modules/boto3-stubs/default.nix +++ b/pkgs/development/python-modules/boto3-stubs/default.nix @@ -365,14 +365,14 @@ buildPythonPackage rec { pname = "boto3-stubs"; - version = "1.34.32"; + version = "1.34.33"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-B38TsIVoYr7a+5K4SZuWBiTQb2hFlb5wH63lGo6WFe0="; + hash = "sha256-WXuVCQ6rw+EI6AS24jVgYRwx0H6VGZzzVIzPdIIGK+Y="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/botocore-stubs/default.nix b/pkgs/development/python-modules/botocore-stubs/default.nix index e790e8cea5b2..dcf43729f40c 100644 --- a/pkgs/development/python-modules/botocore-stubs/default.nix +++ b/pkgs/development/python-modules/botocore-stubs/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "botocore-stubs"; - version = "1.34.32"; + version = "1.34.33"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "botocore_stubs"; inherit version; - hash = "sha256-l4yXuMArX/o3JqUFLlcVrsxSxkCnWoCIs6WEU8KwVLI="; + hash = "sha256-96v/qwfDvWcKxpz4nSbUCWHS6ZO8cdzsc1UBl8KRsjQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/databricks-sql-connector/default.nix b/pkgs/development/python-modules/databricks-sql-connector/default.nix index 01b565df96e9..b0bd083085f3 100644 --- a/pkgs/development/python-modules/databricks-sql-connector/default.nix +++ b/pkgs/development/python-modules/databricks-sql-connector/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "databricks-sql-connector"; - version = "3.0.1"; + version = "3.0.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "databricks"; repo = "databricks-sql-python"; rev = "refs/tags/v${version}"; - hash = "sha256-ymR/PL+LC7Bt+thtCJs5kfbJgKDgioUo+T79E7ZUQWY="; + hash = "sha256-Uvy5/a9YFdPKpZ3B+Yvrvp7uZCY/My45w1lDqX7zJvI="; }; pythonRelaxDeps = [ diff --git a/pkgs/development/python-modules/deebot-client/default.nix b/pkgs/development/python-modules/deebot-client/default.nix index df62c36fd930..7e394e8e27e4 100644 --- a/pkgs/development/python-modules/deebot-client/default.nix +++ b/pkgs/development/python-modules/deebot-client/default.nix @@ -8,6 +8,7 @@ , fetchFromGitHub , numpy , pillow +, pycountry , pytest-asyncio , pytestCheckHook , pythonOlder @@ -19,7 +20,7 @@ buildPythonPackage rec { pname = "deebot-client"; - version = "5.0.0"; + version = "5.1.0"; pyproject = true; disabled = pythonOlder "3.11"; @@ -28,7 +29,7 @@ buildPythonPackage rec { owner = "DeebotUniverse"; repo = "client.py"; rev = "refs/tags/${version}"; - hash = "sha256-fBRP3ieeTIVtyNtRapmAr1utuLMp44C1hK/TAExy4Ok="; + hash = "sha256-XKsS0Ty3n6rQW+f+4lLCc4i9DBqs3b6R5FEIr8L11UE="; }; nativeBuildInputs = [ @@ -48,6 +49,7 @@ buildPythonPackage rec { nativeCheckInputs = [ docker + pycountry pytest-asyncio pytestCheckHook testfixtures diff --git a/pkgs/development/python-modules/google-cloud-datacatalog/default.nix b/pkgs/development/python-modules/google-cloud-datacatalog/default.nix index 24eb50c01e60..f5bdde090be1 100644 --- a/pkgs/development/python-modules/google-cloud-datacatalog/default.nix +++ b/pkgs/development/python-modules/google-cloud-datacatalog/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "google-cloud-datacatalog"; - version = "3.17.2"; + version = "3.18.0"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-kKRuakMZfmt2HrU7g4Ap1ZxFmYYSiRNKvRB/xHkyp1U="; + hash = "sha256-rqWuOJlyB2EN3+qydRMJHLwK7RAFxUT7eEUZiAfOseE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/grpcio-health-checking/default.nix b/pkgs/development/python-modules/grpcio-health-checking/default.nix index 573670a98c30..7873404d6514 100644 --- a/pkgs/development/python-modules/grpcio-health-checking/default.nix +++ b/pkgs/development/python-modules/grpcio-health-checking/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "grpcio-health-checking"; - version = "1.60.0"; + version = "1.60.1"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-R4tTAHeBIP7Z9tE01ysVeln5wGaJeJIYy/9H+vyi8Rk="; + hash = "sha256-fC5Izp1b2xmtV7er40ONR+verVB4ZpORQHILPijGJbM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/grpcio-reflection/default.nix b/pkgs/development/python-modules/grpcio-reflection/default.nix index dc4fb436fbb4..713fec8af4cd 100644 --- a/pkgs/development/python-modules/grpcio-reflection/default.nix +++ b/pkgs/development/python-modules/grpcio-reflection/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "grpcio-reflection"; - version = "1.60.0"; + version = "1.60.1"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-P2wMc7qPINFCDF5y/E3QOJ+sNG7Y+zKijm4ZZ7RP/zU="; + hash = "sha256-v+1JYUE4IcEbTfECyesFWsjENUYm2dyxEKJz79TPfZg="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/iminuit/default.nix b/pkgs/development/python-modules/iminuit/default.nix index 3969b1c9ca51..675a751f0096 100644 --- a/pkgs/development/python-modules/iminuit/default.nix +++ b/pkgs/development/python-modules/iminuit/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "iminuit"; - version = "2.24.0"; + version = "2.25.0"; format = "pyproject"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-JatjHDyOAksbzHyW9mM4yqxUpKIyTVXx47pWF4FuRP0="; + hash = "sha256-e99ZRg05Dy0DznVcAVGy7D0gMwC8UVQb+Ch7Q8EgTGY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pyfireservicerota/default.nix b/pkgs/development/python-modules/pyfireservicerota/default.nix index 7622f858959b..fcdfdd0442d4 100644 --- a/pkgs/development/python-modules/pyfireservicerota/default.nix +++ b/pkgs/development/python-modules/pyfireservicerota/default.nix @@ -1,6 +1,9 @@ { lib , buildPythonPackage +, pythonOlder , fetchPypi +, fetchpatch2 +, pdm-backend , pytz , oauthlib , requests @@ -9,14 +12,27 @@ buildPythonPackage rec { pname = "pyfireservicerota"; - version = "0.0.43"; - format = "setuptools"; + version = "0.0.44"; + pyproject = true; + + disabled = pythonOlder "3.10"; src = fetchPypi { inherit pname version; - hash = "sha256-3+QK1BVuWYii0oYT4xXMOYJZmVKrB4EmqE0EkdFlZvE="; + hash = "sha256-OknGX4xP+AHXRuhizbeTVAfiOX0uRGzAly7FJ1vopDI="; }; + postPatch = '' + # https://github.com/cyberjunky/python-fireservicerota/pull/1 + substituteInPlace pyproject.toml \ + --replace-fail '"aiohttp",' '"requests",' \ + --replace-fail '"aiohttp_retry",' "" + ''; + + nativeBuildInputs = [ + pdm-backend + ]; + propagatedBuildInputs = [ pytz oauthlib diff --git a/pkgs/development/python-modules/qdrant-client/default.nix b/pkgs/development/python-modules/qdrant-client/default.nix index 4281248fe273..8913cc5d64db 100644 --- a/pkgs/development/python-modules/qdrant-client/default.nix +++ b/pkgs/development/python-modules/qdrant-client/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "qdrant-client"; - version = "1.7.1"; + version = "1.7.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "qdrant"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-HQJgiy0tBOdXveNzrJcWcnGZAp9eHu3qRjgONj4aTQg="; + hash = "sha256-nGZV8ORThVxH+Q1xfpqUwPGw6LUoTZXj4KgfTLCvUEc="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/trimesh/default.nix b/pkgs/development/python-modules/trimesh/default.nix index 83d14083f461..d05cefe6ebe4 100644 --- a/pkgs/development/python-modules/trimesh/default.nix +++ b/pkgs/development/python-modules/trimesh/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "trimesh"; - version = "4.1.0"; + version = "4.1.3"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-ca0KytcPZaflr0eF/CRwbWSjmUzKNSbVkXLbQ1scHZ8="; + hash = "sha256-SIHIA6HKo3Ka6rmZrBZfSmN/sNfEjSImYUtbtQs3ozQ="; }; nativeBuildInputs = [ setuptools ]; diff --git a/pkgs/development/python-modules/types-psycopg2/default.nix b/pkgs/development/python-modules/types-psycopg2/default.nix index 0e13f5be9f86..c22fec8de7dd 100644 --- a/pkgs/development/python-modules/types-psycopg2/default.nix +++ b/pkgs/development/python-modules/types-psycopg2/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-psycopg2"; - version = "2.9.21.20240118"; + version = "2.9.21.20240201"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-5KBjFufJaQJVF1w+5d/6W0fFBX8XGB9eNMbc2zQGbzU="; + hash = "sha256-daknNfYro2OXQJrkdY8CQcvEqbsw8fldO0pmD+p+dxE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/allure/default.nix b/pkgs/development/tools/allure/default.nix index f12f35b66a4d..9580a6431fd2 100644 --- a/pkgs/development/tools/allure/default.nix +++ b/pkgs/development/tools/allure/default.nix @@ -2,7 +2,7 @@ let pname = "allure"; - version = "2.26.0"; + version = "2.27.0"; in stdenv.mkDerivation rec { inherit pname version; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/allure-framework/allure2/releases/download/${version}/allure-${version}.tgz"; - sha256 = "sha256-db4pfbJOEkw0P/e3EB4XV3xnRnzcVHXDSn0M0fdHgDQ="; + sha256 = "sha256-gasOVDCNxuZlyeDbloV6iL6DAInHPEXHAvnfUfoj+gA="; }; dontConfigure = true; dontBuild = true; diff --git a/pkgs/development/tools/analysis/snyk/default.nix b/pkgs/development/tools/analysis/snyk/default.nix index c207b201d569..fc5db92cb161 100644 --- a/pkgs/development/tools/analysis/snyk/default.nix +++ b/pkgs/development/tools/analysis/snyk/default.nix @@ -2,16 +2,16 @@ buildNpmPackage rec { pname = "snyk"; - version = "1.1274.0"; + version = "1.1276.0"; src = fetchFromGitHub { owner = "snyk"; repo = "cli"; rev = "v${version}"; - hash = "sha256-cQIgHHulgjUxrl35dKEf7j9kZUp378rLmgwz4K8+Qy0="; + hash = "sha256-l5Xx6z3NbtwdtKe8MmRWTJoKaEH3AZjHKXqoLv3rHfU="; }; - npmDepsHash = "sha256-Ji7zbmPNsqeXsC+mnYnfKL7m7mkXRAcwlaP+M8wWrIo="; + npmDepsHash = "sha256-FJGxCEhBADH4c1khJaVFHL4e25Mq4PHrez+2NPFBx0w="; postPatch = '' substituteInPlace package.json --replace '"version": "1.0.0-monorepo"' '"version": "${version}"' diff --git a/pkgs/development/tools/metal-cli/default.nix b/pkgs/development/tools/metal-cli/default.nix index 5aa1c2e5698d..62bc61a98a25 100644 --- a/pkgs/development/tools/metal-cli/default.nix +++ b/pkgs/development/tools/metal-cli/default.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "metal-cli"; - version = "0.19.0"; + version = "0.20.0"; src = fetchFromGitHub { owner = "equinix"; repo = pname; rev = "v${version}"; - hash = "sha256-S3/VKK+ab6RMuhqP1RRQK7ATcZn37Nws3ya3v9ujZ5M="; + hash = "sha256-Y6zjEB7LKEb1CGQwNs8jAx1BFSw+EGwgXBMGyQUJhYc="; }; - vendorHash = "sha256-tu3AryadBbvQzYCEefGAWOnpEki3VJVxFZAseHrXhD4="; + vendorHash = "sha256-FJ68j41Nb6KqiZPJE/u0TYDkXt43810Nx0p/JQDopn8="; ldflags = [ "-s" diff --git a/pkgs/development/tools/supabase-cli/default.nix b/pkgs/development/tools/supabase-cli/default.nix index 16710b2571c9..ed4cb8b8fe5d 100644 --- a/pkgs/development/tools/supabase-cli/default.nix +++ b/pkgs/development/tools/supabase-cli/default.nix @@ -9,16 +9,16 @@ buildGoModule rec { pname = "supabase-cli"; - version = "1.140.0"; + version = "1.141.0"; src = fetchFromGitHub { owner = "supabase"; repo = "cli"; rev = "v${version}"; - hash = "sha256-E/7/A/+RgSDp1OfdGDjGEnXv6UhcjFCLsKA4bBPTs9A="; + hash = "sha256-LyArcez2x2aGb8rH9IQX7E8HMyhpfjzBlwdLs15lKD8="; }; - vendorHash = "sha256-p026yk50DfzUZX7TTFpDhvGHiD/XUhbxlHQz383pRZk="; + vendorHash = "sha256-WKfR1HzgghuOF4brNiAAfOul0q4reg3YRxI3AzyOdFM="; ldflags = [ "-s" diff --git a/pkgs/servers/keycloak/default.nix b/pkgs/servers/keycloak/default.nix index fac37227c8bc..16e08aa82962 100644 --- a/pkgs/servers/keycloak/default.nix +++ b/pkgs/servers/keycloak/default.nix @@ -18,11 +18,11 @@ let ''; in stdenv.mkDerivation rec { pname = "keycloak"; - version = "23.0.5"; + version = "23.0.6"; src = fetchzip { url = "https://github.com/keycloak/keycloak/releases/download/${version}/keycloak-${version}.zip"; - hash = "sha256-6oIe1lKHVcddCTQacLHrEJ8yTMqN9FsVwbwpHDnN1oA="; + hash = "sha256-Sw+6UloKSvYjkm7qYROmsZxKk/sky4DKvgupo+S61Q8="; }; nativeBuildInputs = [ makeWrapper jre ]; diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix new file mode 100644 index 000000000000..b1b21174c8a8 --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/lantern.nix @@ -0,0 +1,79 @@ +{ lib +, stdenv +, cmake +, fetchFromGitHub +, postgresql +, postgresqlTestHook +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "lantern"; + version = "0.0.12"; + + src = fetchFromGitHub { + owner = "lanterndata"; + repo = "lantern"; + rev = "v${finalAttrs.version}"; + hash = "sha256-PJLpRX5IuHBz7xywgD/lXfr6c6Kn1XmQ6MCGSuKPmlE="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + postgresql + ]; + + installPhase = '' + runHook preInstall + + install -D -t $out/lib lantern${postgresql.dlSuffix} + install -D -t $out/share/postgresql/extension lantern-*.sql + install -D -t $out/share/postgresql/extension lantern.control + + runHook postInstall + ''; + + cmakeFlags = [ + "-DBUILD_FOR_DISTRIBUTING=ON" + ]; + + passthru.tests.extension = stdenv.mkDerivation { + name = "lantern-pg-test"; + dontUnpack = true; + doCheck = true; + buildInputs = [ postgresqlTestHook ]; + nativeCheckInputs = [ (postgresql.withPackages (_: [ finalAttrs.finalPackage ])) ]; + postgresqlTestUserOptions = "LOGIN SUPERUSER"; + passAsFile = [ "sql" ]; + sql = '' + CREATE EXTENSION lantern; + + CREATE TABLE small_world (id integer, vector real[3]); + INSERT INTO small_world (id, vector) VALUES (0, '{0,0,0}'), (1, '{0,0,1}'); + + CREATE INDEX ON small_world USING hnsw (vector dist_l2sq_ops) + WITH (M=2, ef_construction=10, ef=4, dim=3); + ''; + failureHook = "postgresqlStop"; + checkPhase = '' + runHook preCheck + psql -a -v ON_ERROR_STOP=1 -f $sqlPath + runHook postCheck + ''; + installPhase = "touch $out"; + }; + + meta = with lib; { + description = "PostgreSQL vector database extension for building AI applications"; + homepage = "https://lantern.dev/"; + changelog = "https://github.com/lanterndata/lantern/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = licenses.bsl11; + maintainers = [ maintainers.marsam ]; + platforms = postgresql.meta.platforms; + # error: use of undeclared identifier 'aligned_alloc' + broken = stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13"; + }; +}) diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index 55be61dacf30..0e1677a09af4 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -12,6 +12,8 @@ self: super: { jsonb_deep_sum = super.callPackage ./ext/jsonb_deep_sum.nix { }; + lantern = super.callPackage ./ext/lantern.nix { }; + periods = super.callPackage ./ext/periods.nix { }; postgis = super.callPackage ./ext/postgis.nix { }; diff --git a/pkgs/tools/misc/plantuml/plantuml-c4.nix b/pkgs/tools/misc/plantuml/plantuml-c4.nix index a8d0001054fd..2829d0a31eab 100644 --- a/pkgs/tools/misc/plantuml/plantuml-c4.nix +++ b/pkgs/tools/misc/plantuml/plantuml-c4.nix @@ -12,13 +12,13 @@ let c4-lib = fetchzip { - url = "https://github.com/plantuml-stdlib/C4-PlantUML/archive/88a3f99150c6ff7953c4a99b184d03412ffdedb1.zip"; - sha256 = "sha256-vk4YWdGb47OsI9mApGTQ7OfELRZdBouzKfUZq3kchcM="; + url = "https://github.com/plantuml-stdlib/C4-PlantUML/archive/refs/tags/v2.8.0.zip"; + hash = "sha256-pGtTFg7HcAFYPrjd+CAaxS4C6Cqaj94aq45v3NpiAxM="; }; sprites = fetchzip { url = "https://github.com/tupadr3/plantuml-icon-font-sprites/archive/fa3f885dbd45c9cd0cdf6c0e5e4fb51ec8b76582.zip"; - sha256 = "sha256-lt9+NNMIaZSkKNsGyHoqXUCTlKmZFGfNYYGjer6X0Xc="; + hash = "sha256-lt9+NNMIaZSkKNsGyHoqXUCTlKmZFGfNYYGjer6X0Xc="; }; # In order to pre-fix the plantuml.jar parameter with the argument @@ -41,7 +41,7 @@ in stdenv.mkDerivation rec { pname = "plantuml-c4"; - version = "unstable-2022-08-21"; + version = "2.8.0"; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/networking/ssl-proxy/default.nix b/pkgs/tools/networking/ssl-proxy/default.nix index 5b72fb14fd9c..1bfb1418355f 100644 --- a/pkgs/tools/networking/ssl-proxy/default.nix +++ b/pkgs/tools/networking/ssl-proxy/default.nix @@ -13,6 +13,10 @@ buildGoModule rec { vendorHash = "sha256-310K9ZSxy/OQ4HYFCcHQaj4NQwzATrOZ2YkhiSkhY5I="; + patches = [ + ./go120-compatibility.patch + ]; + checkTarget = "test"; meta = with lib; { diff --git a/pkgs/tools/networking/ssl-proxy/go120-compatibility.patch b/pkgs/tools/networking/ssl-proxy/go120-compatibility.patch new file mode 100644 index 000000000000..868ca39a5414 --- /dev/null +++ b/pkgs/tools/networking/ssl-proxy/go120-compatibility.patch @@ -0,0 +1,18 @@ +Check whether User-Agent is defined before trying to override it + +Since Go 1.20 [1], ReverseProxy no longer adds a User-Agent header to forwarded +requests. + +[1] https://github.com/golang/go/commit/f001df540b3fc66a475985c1b7c810e7df063c8f + +--- a/reverseproxy/reverseproxy.go ++++ b/reverseproxy/reverseproxy.go +@@ -32,7 +32,7 @@ func newDirector(target *url.URL, extraDirector func(*http.Request)) func(*http. + } else { + req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery + } +- if _, ok := req.Header["User-Agent"]; !ok { ++ if req.Header.Get("User-Agent") != "" { + // explicitly disable User-Agent so it's not set to default value + req.Header.Set("User-Agent", "") + } diff --git a/pkgs/tools/security/nuclei/default.nix b/pkgs/tools/security/nuclei/default.nix index 14948c3e7999..56db6fb78b95 100644 --- a/pkgs/tools/security/nuclei/default.nix +++ b/pkgs/tools/security/nuclei/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "nuclei"; - version = "3.1.8"; + version = "3.1.9"; src = fetchFromGitHub { owner = "projectdiscovery"; repo = "nuclei"; rev = "refs/tags/v${version}"; - hash = "sha256-uNPMQ4I85R8xY9IrEX3puaKXvk3+nTT32fimEpzStjM="; + hash = "sha256-0GQoX4S4k3d7/BJ1KDTKH9UceLL12IHlEAt1E4JRPLA="; }; - vendorHash = "sha256-bk8vgCZqzLYmtO2sj5p3l22X5SSZ5zA5RvlrijsiW10="; + vendorHash = "sha256-0ERUvPUAxj0H62YcRvsfYX8h0Hp/mA6NdE8E/BjPGzw="; subPackages = [ "cmd/nuclei/" diff --git a/pkgs/tools/text/mdbook-pdf/default.nix b/pkgs/tools/text/mdbook-pdf/default.nix index 9ff9a80214f3..18b234a4ec08 100644 --- a/pkgs/tools/text/mdbook-pdf/default.nix +++ b/pkgs/tools/text/mdbook-pdf/default.nix @@ -10,14 +10,14 @@ rustPlatform.buildRustPackage rec { pname = "mdbook-pdf"; - version = "0.1.7"; + version = "0.1.8"; src = fetchCrate { inherit pname version; - hash = "sha256-3hyvLLBcS7MLAL707tkvW8LGue/x9DudOYhJDDqAdRg="; + hash = "sha256-UPSh0/8HFaLvnU95Gyd+uQaRvWeXlp+HViVUKX0I1jI="; }; - cargoHash = "sha256-ecIaKSrkqUsQWchkm9uCTXLuQabzGmEz1UqDR13vX8Y="; + cargoHash = "sha256-WYG2EkfEqjOOelxwivk5srtTNLxEPGX1ztwntvgft1I="; nativeBuildInputs = [ pkg-config diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a5840667a98f..e5e355660a49 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5608,9 +5608,7 @@ with pkgs; gscan2pdf = callPackage ../applications/graphics/gscan2pdf { }; - gsctl = callPackage ../applications/misc/gsctl { - buildGoModule = buildGo119Module; # go 1.20 build failure - }; + gsctl = callPackage ../applications/misc/gsctl { }; gsocket = callPackage ../tools/networking/gsocket { }; @@ -7795,7 +7793,11 @@ with pkgs; stratis-cli = callPackage ../tools/filesystems/stratis-cli { }; - strawberry = libsForQt5.callPackage ../applications/audio/strawberry { }; + strawberry-qt5 = libsForQt5.callPackage ../applications/audio/strawberry { }; + + strawberry-qt6 = qt6Packages.callPackage ../applications/audio/strawberry { }; + + strawberry = strawberry-qt5; schleuder = callPackage ../tools/security/schleuder { }; @@ -15138,8 +15140,6 @@ with pkgs; haskellPackages = haskell.packages.ghc810; }; - yj = callPackage ../development/tools/yj { }; - yaydl = callPackage ../tools/video/yaydl { inherit (darwin.apple_sdk.frameworks) Security; }; @@ -41989,9 +41989,7 @@ with pkgs; yazi = callPackage ../applications/file-managers/yazi { inherit (darwin.apple_sdk.frameworks) Foundation; }; - ssl-proxy = callPackage ../tools/networking/ssl-proxy { - buildGoModule = buildGo119Module; # build fails with 1.20 - }; + ssl-proxy = callPackage ../tools/networking/ssl-proxy { }; code-maat = callPackage ../development/tools/code-maat {};