diff options
-rw-r--r-- | doc/default.nix | 1 | ||||
-rw-r--r-- | lib/default.nix | 2 | ||||
-rw-r--r-- | lib/derivations.nix | 26 | ||||
-rw-r--r-- | lib/tests/misc.nix | 20 | ||||
-rw-r--r-- | pkgs/applications/audio/strawberry/default.nix | 16 | ||||
-rw-r--r-- | pkgs/by-name/al/alsa-tools/package.nix | 4 | ||||
-rw-r--r-- | pkgs/by-name/yj/yj/package.nix (renamed from pkgs/development/tools/yj/default.nix) | 1 | ||||
-rw-r--r-- | pkgs/development/php-packages/php-cs-fixer/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/python-modules/pyfireservicerota/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/python-modules/trimesh/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/python-modules/types-psycopg2/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/tools/metal-cli/default.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
13 files changed, 94 insertions, 24 deletions
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/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/development/tools/yj/default.nix b/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/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/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/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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a5840667a98f..eba1fb54804e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7795,7 +7795,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 +15142,6 @@ with pkgs; haskellPackages = haskell.packages.ghc810; }; - yj = callPackage ../development/tools/yj { }; - yaydl = callPackage ../tools/video/yaydl { inherit (darwin.apple_sdk.frameworks) Security; }; |