Merge staging-next into staging

This commit is contained in:
nixpkgs-ci[bot] 2026-05-10 03:06:37 +00:00 committed by GitHub
commit 787d140ba2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 242 additions and 191 deletions

View file

@ -204,11 +204,11 @@ let
poolImported "${pool}" || poolImport "${pool}" # Try one last time, e.g. to import a degraded pool.
fi
if poolImported "${pool}"; then
${lib.optionalString config.boot.initrd.clevis.enable (
lib.concatMapStringsSep "\n" (
elem: "clevis decrypt < /etc/clevis/${elem}.jwe | zfs load-key -L prompt ${elem} || true "
) (lib.filter (p: (lib.elemAt (lib.splitString "/" p) 0) == pool) clevisDatasets)
)}
${lib.optionalString config.boot.initrd.clevis.enable (
lib.concatMapStringsSep "\n" (
elem: "clevis decrypt < /etc/clevis/${elem}.jwe | zfs load-key -L prompt ${elem} || true "
) (lib.filter (p: (lib.elemAt (lib.splitString "/" p) 0) == pool) clevisDatasets)
)}
${lib.optionalString keyLocations.hasKeys ''

View file

@ -1391,11 +1391,11 @@
"vendorHash": "sha256-ozAYLFkilSK0Nygdglhz3VNtRVKoLDGRnrVvg4nWyH4="
},
"turbot_turbot": {
"hash": "sha256-zh809E1qII8EJm7QFHEORju2WF//+A2uk7olrCNdBkU=",
"hash": "sha256-sJODPeFzU3vaiHbKlGe1dR5Pi7aS56JcmZUe8Yg1BcQ=",
"homepage": "https://registry.terraform.io/providers/turbot/turbot",
"owner": "turbot",
"repo": "terraform-provider-turbot",
"rev": "v1.13.1",
"rev": "v1.13.3",
"spdx": "MPL-2.0",
"vendorHash": null
},

View file

@ -10,13 +10,13 @@
gcc15Stdenv.mkDerivation (finalAttrs: {
pname = "hyprutils";
version = "0.13.0";
version = "0.13.1";
src = fetchFromGitHub {
owner = "hyprwm";
repo = "hyprutils";
tag = "v${finalAttrs.version}";
hash = "sha256-PwuoEJQcjSKJNP5T55qhfDwIP0tw5zxEhfu8GDfKfeg=";
hash = "sha256-jAcsogZwWMfXT9MfXxZzkwliAqIuZUV0p71h6Ba9ReE=";
};
nativeBuildInputs = [

View file

@ -8,16 +8,16 @@
}:
buildGo125Module (finalAttrs: {
pname = "jjui";
version = "0.10.4";
version = "0.10.5";
src = fetchFromGitHub {
owner = "idursun";
repo = "jjui";
tag = "v${finalAttrs.version}";
hash = "sha256-20NWoojFBwHs33NFNeZbk1kiZ418kYD42XTUOHuQtv8=";
hash = "sha256-3cr6aSJoIAv9Ine2ePHCC6xBaS1G4i23yQh8I5mq47g=";
};
vendorHash = "sha256-AJlJ9iHkkWNS8a4oGt8AG89StjMH9UH3WuOcZwa3VS8=";
vendorHash = "sha256-iUWeQIYwOkXhRFsQc5zBjFFG5m412ysR5LsZsHET1ak=";
ldflags = [ "-X main.Version=${finalAttrs.version}" ];

View file

@ -9,11 +9,11 @@
}:
let
pname = "lycheeslicer";
version = "7.6.4";
version = "7.6.5";
src = fetchurl {
url = "https://mango-lychee.nyc3.cdn.digitaloceanspaces.com/LycheeSlicer-${version}.AppImage";
hash = "sha256-lLE40ByNdfK7GkLjfbEEX0nmhL0+E51qPDe+whIJqEM=";
hash = "sha256-HVCAvukGeF4hRJ/l41iBV1MZD5i9qzIYGSgMrncNfDg=";
};
desktopItem = makeDesktopItem {

View file

@ -17,7 +17,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "masterpdfeditor";
version = "5.9.94";
version = "5.9.98";
src =
let
@ -29,8 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
aarch64-linux = "https://code-industry.net/public/master-pdf-editor-${finalAttrs.version}-qt5.arm64.tar.gz";
};
hash = selectSystem {
x86_64-linux = "sha256-WKMk0uzcjI4/dwjas4Ws3S6VBcUZYO9/WDXgKY22EeE=";
aarch64-linux = "sha256-DKNOvEAjCzOHRAn8PRiT/1tv6/NggoWCHgHf5OWOHSA=";
x86_64-linux = "sha256-KNAssyWLeMqtMyZQIF6Qr1K/9tioC4cD84lL9c1iMgM=";
aarch64-linux = "sha256-+jNXO4fbbkh9Uea0N+0fJbHRMu9zS/d7o8W4D2+7kMI=";
};
};

View file

@ -3,7 +3,6 @@
"chat_bottom_container": "sha256-+R1MiDMO4onCMXiJ7MJtJVAwyEJcikTyONwp+HibqA0=",
"desktop_webview_window": "sha256-KWON5aTPlVVrLidmnfpV+syWPYEngChOvkN7miIFjvE=",
"extended_nested_scroll_view": "sha256-ocjIy7gpCikoqRMqY4oGw/p9YaQ2v2clhon2pIzTXk4=",
"file_picker": "sha256-4zwyrsyXb6KnCzSRGBLgypH79ifKVji8Y8lIb5AIc58=",
"floating": "sha256-0Xd9dsXJCQ/r/8Nb16oM+M8Jdw+r4QzGmU++HpqF/v0=",
"flutter_smart_dialog": "sha256-sehrQraEWmYvUd9pdG4l3edbtR4yTcJOqPbuhzIrih4=",
"flutter_sortable_wrap": "sha256-Qj9Lzh+pJy+vHznGt5M3xwoJtaVtt00fxm4JJXL4bFI=",
@ -16,7 +15,9 @@
"media_kit_libs_windows_video": "sha256-tly3av5ojuasf+bXkOzLImcEm9oP25Y2flQDMV21T1s=",
"media_kit_native_event_loop": "sha256-tly3av5ojuasf+bXkOzLImcEm9oP25Y2flQDMV21T1s=",
"media_kit_video": "sha256-tly3av5ojuasf+bXkOzLImcEm9oP25Y2flQDMV21T1s=",
"native_device_orientation": "sha256-MCgN6HXCeONLrDAOt27Ve8kUvIrOfFRbfJtX8p92Txk=",
"native_device_orientation": "sha256-8abnUV7ZTAo0DAjekf353ey6xFvxfilTfbQOUWIahtk=",
"screen_brightness_android": "sha256-jxf+KDQAPzCi9+SVK0fUpHG/sR77pk0c76GUZEw04MI=",
"screen_brightness_platform_interface": "sha256-jxf+KDQAPzCi9+SVK0fUpHG/sR77pk0c76GUZEw04MI=",
"super_sliver_list": "sha256-G24uRql1aIc1TDJwKqwQ72Pi4YbJybMn6lxOUySSDwk=",
"webdav_client": "sha256-euNF7HdDtZ68BqSEq9BvO10BK09MxX2wWGoElFS0yeE=",
"window_manager": "sha256-UAN3uOXKMfWk+G9GTHyhD2dGDojKA76mGbUR+EFc2Qo="

View file

@ -14,7 +14,7 @@
let
srcInfo = lib.importJSON ./src-info.json;
description = "Third-party Bilibili client developed in Flutter";
version = "2.0.6";
version = "2.0.7";
in
flutter341.buildFlutterApplication {
pname = "piliplus";

View file

@ -244,11 +244,11 @@
"dependency": "transitive",
"description": {
"name": "built_value",
"sha256": "0730c18c770d05636a8f945c32a4d7d81cb6e0f0148c8db4ad12e7748f7e49af",
"sha256": "34e4067d30ce212937df995f03b69992eea683539ceeac7f679a1f1eba055b56",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "8.12.5"
"version": "8.12.6"
},
"cached_network_image": {
"dependency": "direct main",
@ -487,21 +487,21 @@
"dependency": "direct main",
"description": {
"name": "device_info_plus",
"sha256": "b4fed1b2835da9d670d7bed7db79ae2a94b0f5ad6312268158a9b5479abbacdd",
"sha256": "6a642e1daa10190af89ba6cb6386c0df7d071a3592080bfe1e44faa63ae1df65",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "12.4.0"
"version": "13.1.0"
},
"device_info_plus_platform_interface": {
"dependency": "transitive",
"description": {
"name": "device_info_plus_platform_interface",
"sha256": "e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f",
"sha256": "04b173a92e2d9161dfead145667037c8d834db725ce2e7b942bfe18fd2f45a46",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.0.3"
"version": "8.1.0"
},
"dio": {
"dependency": "direct main",
@ -634,6 +634,16 @@
"source": "hosted",
"version": "2.2.0"
},
"ffi_leak_tracker": {
"dependency": "transitive",
"description": {
"name": "ffi_leak_tracker",
"sha256": "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.2"
},
"file": {
"dependency": "transitive",
"description": {
@ -647,13 +657,12 @@
"file_picker": {
"dependency": "direct main",
"description": {
"path": ".",
"ref": "mod",
"resolved-ref": "d1dde80df07a6ec46d9291cfeba6c01de53b5305",
"url": "https://github.com/bggRGjQaUbCoE/flutter_file_picker.git"
"name": "file_picker",
"sha256": "1d4afa261268e59863af47b9f9dd9a230502d4c702b9d9183353646fe6d5b6e1",
"url": "https://pub.dev"
},
"source": "git",
"version": "11.0.2"
"source": "hosted",
"version": "12.0.0-beta.1"
},
"file_selector_linux": {
"dependency": "transitive",
@ -1556,7 +1565,7 @@
"description": {
"path": ".",
"ref": "master",
"resolved-ref": "731bb77e39cca77065c86ece38902d35f5d653d2",
"resolved-ref": "a987a459f17af0002397e49800ba4f68912b375c",
"url": "https://github.com/bggRGjQaUbCoE/flutter_native_device_orientation.git"
},
"source": "git",
@ -1616,21 +1625,21 @@
"dependency": "direct main",
"description": {
"name": "package_info_plus",
"sha256": "468c26b4254ab01979fa5e4a98cb343ea3631b9acee6f21028997419a80e1a20",
"sha256": "4bf625947f6c7713ee242296a682e23e44823c09cf9d79e4f1238923c92db852",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "9.0.1"
"version": "10.1.0"
},
"package_info_plus_platform_interface": {
"dependency": "transitive",
"description": {
"name": "package_info_plus_platform_interface",
"sha256": "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086",
"sha256": "db762cb2f4f25ee60fb6359773861b0f199e00b90d237bd85a76a1e806b46ef4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.2.1"
"version": "4.1.0"
},
"path": {
"dependency": "direct main",
@ -1905,11 +1914,12 @@
"screen_brightness_android": {
"dependency": "direct overridden",
"description": {
"name": "screen_brightness_android",
"sha256": "d34f5321abd03bc3474f4c381f53d189117eba0b039eac1916aa92cca5fd0a96",
"url": "https://pub.dev"
"path": "screen_brightness_android",
"ref": "dev",
"resolved-ref": "0696d1f3665511496bfeb842f02deada5cd57ff9",
"url": "https://github.com/bggRGjQaUbCoE/screen_brightness.git"
},
"source": "hosted",
"source": "git",
"version": "2.1.3"
},
"screen_brightness_ios": {
@ -1925,11 +1935,12 @@
"screen_brightness_platform_interface": {
"dependency": "direct main",
"description": {
"name": "screen_brightness_platform_interface",
"sha256": "737bd47b57746bc4291cab1b8a5843ee881af499514881b0247ec77447ee769c",
"url": "https://pub.dev"
"path": "screen_brightness_platform_interface",
"ref": "dev",
"resolved-ref": "0696d1f3665511496bfeb842f02deada5cd57ff9",
"url": "https://github.com/bggRGjQaUbCoE/screen_brightness.git"
},
"source": "hosted",
"source": "git",
"version": "2.1.0"
},
"screen_retriever": {
@ -1996,21 +2007,21 @@
"dependency": "direct main",
"description": {
"name": "share_plus",
"sha256": "223873d106614442ea6f20db5a038685cc5b32a2fba81cdecaefbbae0523f7fa",
"sha256": "a857d8b1479250aff6b57a51b2c02d31ca05848d441817c43f1640c885c286c0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "12.0.2"
"version": "13.1.0"
},
"share_plus_platform_interface": {
"dependency": "transitive",
"description": {
"name": "share_plus_platform_interface",
"sha256": "88023e53a13429bd65d8e85e11a9b484f49d4c190abbd96c7932b74d6927cc9a",
"sha256": "7f7ae28cf400d13f811e297ff37742dba83b79e0a6f5dce14eec0248274e6ce9",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.1.0"
"version": "7.1.0"
},
"shared_preferences": {
"dependency": "transitive",
@ -2463,11 +2474,11 @@
"dependency": "direct main",
"description": {
"name": "wakelock_plus",
"sha256": "ddf3db70eaa10c37558ff817519b85d527dbd21034fd5d8e1c2e85f31588f1c1",
"sha256": "2b09acadd7a2862d33c3577e77e7a2aabb684f47ccca1711f1413bd7307a6a72",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.5.2"
"version": "1.6.0"
},
"wakelock_plus_platform_interface": {
"dependency": "transitive",
@ -2544,21 +2555,21 @@
"dependency": "transitive",
"description": {
"name": "win32",
"sha256": "d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e",
"sha256": "ba7d5750e3441caa1bbe31d9e516348fcf8dfcb32aa29ef87a844a59f4d1f1d0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "5.15.0"
"version": "6.1.0"
},
"win32_registry": {
"dependency": "transitive",
"description": {
"name": "win32_registry",
"sha256": "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae",
"sha256": "73b1d78920a9d6e03f8b4e43e612b87bf3152a0e5c5e5150267762b7c4116904",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.0"
"version": "3.0.3"
},
"window_manager": {
"dependency": "direct main",
@ -2604,6 +2615,6 @@
},
"sdks": {
"dart": ">=3.11.0 <4.0.0",
"flutter": "3.41.6"
"flutter": "3.41.9"
}
}

View file

@ -1,6 +1,6 @@
{
"rev": "7b6d8bef994c5a50c2b476978e739dee651129df",
"revCount": 4915,
"commitDate": 1777542771,
"hash": "sha256-jKF0FTTmq5xRB607iya3PtsgRFl73uXiuDA2oSGNbfs="
"rev": "b7b40c557e708ace77ed65098005193eb89b8208",
"revCount": 4940,
"commitDate": 1777948879,
"hash": "sha256-E0ezM87Ecw54XD/MccPhRjg4iQ8LJRewQKbH/bPV9MI="
}

View file

@ -1,25 +0,0 @@
{
buildNpmPackage,
shelfmark,
}:
buildNpmPackage (finalAttrs: {
pname = "shelfmark-frontend";
inherit (shelfmark) version src;
sourceRoot = "${finalAttrs.src.name}/src/frontend";
npmDepsHash = "sha256-VCnxEcaqWo31oIpF6X8Lid4I/aaQCQZ9l9rV6TTqXPI=";
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
meta = {
description = "Shelfmark frontend";
homepage = "https://github.com/calibrain/shelfmark/tree/main/src/frontend";
inherit (shelfmark.meta) changelog license maintainers;
};
})

View file

@ -1,15 +1,19 @@
{
lib,
stdenv,
buildNpmPackage,
fetchFromGitHub,
python3Packages,
python314Packages,
nix-update-script,
makeWrapper,
nixosTests,
shelfmark-frontend,
unrar-free,
_experimental-update-script-combinators,
}:
let
python3Packages = python314Packages;
pythonDeps = with python3Packages; [
flask
flask-cors
@ -32,18 +36,35 @@ let
authlib
apprise
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "shelfmark";
version = "1.2.1";
version = "1.2.3";
src = fetchFromGitHub {
owner = "calibrain";
repo = "shelfmark";
tag = "v${finalAttrs.version}";
hash = "sha256-Fe7zu51gFG2QgcBWcGkFi64CdZW4ohZg+7jdmeMFVLI=";
tag = "v${version}";
hash = "sha256-abRM2ZWfA5nyD0YF7BVmZ6AU37+qd7osjQVGqhjdEV0=";
};
frontend = buildNpmPackage (finalAttrs: {
pname = "shelfmark-frontend";
inherit version src;
sourceRoot = "${finalAttrs.src.name}/src/frontend";
npmDepsHash = "sha256-c/KDGUe+X4dfzbDXpkzYsEzvBxJjq46PTzqbgoCdGgw=";
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
});
in
stdenv.mkDerivation (finalAttrs: {
pname = "shelfmark";
inherit version src;
nativeBuildInputs = [
python3Packages.wrapPython
makeWrapper
@ -60,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: {
cp -r shelfmark $out/libexec/shelfmark
cp -r data $out/libexec/data
ln -s ${finalAttrs.passthru.frontend} $out/libexec/frontend-dist
ln -s ${frontend} $out/libexec/frontend-dist
makeWrapper ${python3Packages.python.interpreter} $out/bin/shelfmark \
--prefix PATH : ${
@ -77,12 +98,21 @@ stdenv.mkDerivation (finalAttrs: {
'';
passthru = {
frontend = shelfmark-frontend.override {
shelfmark = finalAttrs.finalPackage;
};
inherit frontend;
tests = {
inherit (nixosTests) shelfmark;
};
updateScript = _experimental-update-script-combinators.sequence [
(nix-update-script { })
(nix-update-script {
extraArgs = [
"--subpackage=frontend"
"--version=skip"
];
})
];
};
meta = {

View file

@ -12,7 +12,6 @@
glslang,
spirv-tools,
intltool,
jdupes,
libdisplay-info,
libdrm,
libgbm,
@ -318,7 +317,6 @@ stdenv.mkDerivation {
python3Packages.mako
python3Packages.ply
python3Packages.pyyaml
jdupes
# Use bin output from glslang to not propagate the dev output at
# the build time with the host glslang.
(lib.getBin glslang)
@ -382,9 +380,6 @@ stdenv.mkDerivation {
# Don't depend on build python
patchShebangs --host --update $out/bin/*
# NAR doesn't support hard links, so convert them to symlinks to save space.
jdupes --hard-links --link-soft --recurse "$out"
# add RPATH here so Zink can find libvulkan.so
patchelf --add-rpath ${vulkan-loader}/lib $out/lib/libgallium*.so $opencl/lib/libRusticlOpenCL.so
'';

View file

@ -31,6 +31,8 @@ buildPythonPackage {
doCheck = false;
meta = {
# dylib import fails with no LC_RPATH's found
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86;
description = "Phonemization libary used by Piper text to speech system";
inherit (piper-phonemize-native.meta) homepage license maintainers;
};

View file

@ -65,11 +65,16 @@ buildPythonPackage (finalAttrs: {
socat
];
__darwinAllowLocalNetworking = true;
disabledTests = [
# tries to access /sys/class/tty in sandbox
"test_compat_tools_module"
# connects to 192.0.2.1
"test_async_socket_connect_timeout"
# racy
"test_sync_readexactly_total_timeout"
"test_sync_read_until_total_timeout"
];
meta = {

View file

@ -6,16 +6,16 @@
buildNpmPackage rec {
pname = "material-you-theme";
version = "5.0.1";
version = "5.0.12";
src = fetchFromGitHub {
owner = "Nerwyn";
repo = "material-you-theme";
tag = version;
hash = "sha256-xJXhvKwp/l08/ZWi3OcGPmCdsUiMjBDwrKz5OIpD2t8=";
hash = "sha256-2wiWHU/iNIhVSJB2EqNhBi4ppsWfO9oNgfU9xU3FnrA=";
};
npmDepsHash = "sha256-g133Je2Md4nKLZucSeM6TVEdaCsR2Ja1Aj2kf7JQk6w=";
npmDepsHash = "sha256-4FNqAJlupbZT14Sy5mfCsKj7f1xK6tcpKKPrbFoSje8=";
installPhase = ''
runHook preInstall

View file

@ -14,19 +14,20 @@ let
# Lib attributes are inherited to the lexical scope for performance reasons.
inherit (lib)
all
assertMsg
attrNames
concatLists
concatMap
concatMapStrings
concatMapStringsSep
concatStringsSep
elem
extendDerivation
filter
filterAttrs
foldl'
getDev
head
foldl'
intersectAttrs
isAttrs
isBool
isDerivation
@ -34,6 +35,7 @@ let
isList
isPath
isString
listToAttrs
mapAttrs
mapNullable
optional
@ -41,14 +43,22 @@ let
optionals
pipe
remove
seq
splitString
subtractLists
toExtension
toFunction
typeOf
unique
unsafeDiscardStringContext
unsafeGetAttrPos
warnIf
zipAttrsWith
seq
;
inherit (lib.generators) toPretty;
inherit (lib.strings) sanitizeDerivationName;
inherit (import ../../build-support/lib/cmake.nix { inherit lib stdenv; }) makeCMakeFlags;
inherit (import ../../build-support/lib/meson.nix { inherit lib stdenv; }) makeMesonFlags;
@ -101,10 +111,10 @@ let
final:
let
prev = rattrs final;
thisOverlay = lib.toExtension f0 final prev;
pos = builtins.unsafeGetAttrPos "version" thisOverlay;
thisOverlay = toExtension f0 final prev;
pos = unsafeGetAttrPos "version" thisOverlay;
in
lib.warnIf
warnIf
(
prev ? src
&& thisOverlay ? version
@ -165,6 +175,10 @@ let
"zerocallusedregs"
];
concretizeFlagImplications =
flag: impliesFlags: list:
if elem flag list then (list ++ impliesFlags) else list;
removedOrReplacedAttrNames = [
"checkInputs"
"installCheckInputs"
@ -183,6 +197,45 @@ let
"allowedImpureDLLs"
];
referenceCheckingAttrsToRemove = [
"allowedReferences"
"allowedRequisites"
"disallowedReferences"
"disallowedRequisites"
];
argumentAttrsToRemove = [
"meta"
"passthru"
"pos"
"env"
];
attrsToRemoveLast = [
# Fixed-output derivations may not reference other paths, which means that
# for a fixed-output derivation, the corresponding inputDerivation should
# *not* be fixed-output. To achieve this we simply delete the attributes that
# would make it fixed-output.
"outputHashAlgo"
"outputHash"
"outputHashMode"
# inputDerivation produces the inputs; not the outputs, so any
# restrictions on what used to be the outputs don't serve a purpose
# anymore.
"allowedReferences"
"allowedRequisites"
"disallowedReferences"
"disallowedRequisites"
"outputChecks"
];
defaultBuilderArgs = [
"-e"
./source-stdenv.sh
./default-builder.sh
];
inherit (stdenv)
hostPlatform
buildPlatform
@ -263,7 +316,7 @@ let
unsafeDerivationToUntrackedOutpath =
drv:
if isDerivation drv && (!drv.__contentAddressed or false) then
builtins.unsafeDiscardStringContext drv.outPath
unsafeDiscardStringContext drv.outPath
else
drv;
@ -409,25 +462,6 @@ let
actualValue;
outputs' = if separateDebugInfo' then outputs ++ [ "debug" ] else outputs;
concretizeFlagImplications =
flag: impliesFlags: list:
if elem flag list then (list ++ impliesFlags) else list;
hardeningDisable' = unique (
pipe hardeningDisable [
# disabling fortify implies fortify3 should also be disabled
(concretizeFlagImplications "fortify" [ "fortify3" ])
# disabling strictflexarrays1 implies strictflexarrays3 should also be disabled
(concretizeFlagImplications "strictflexarrays1" [ "strictflexarrays3" ])
# disabling libcxxhardeningfast implies libcxxhardeningextensive should also be disabled
(concretizeFlagImplications "libcxxhardeningfast" [ "libcxxhardeningextensive" ])
]
);
enabledHardeningOptions =
if elem "all" hardeningDisable' then
[ ]
else
subtractLists hardeningDisable' (defaultHardeningFlags ++ hardeningEnable);
# hardeningDisable additionally supports "all".
erroneousHardeningFlags = subtractLists knownHardeningFlags (
hardeningEnable ++ remove "all" hardeningDisable
@ -458,7 +492,7 @@ let
if erroneousHardeningFlags != [ ] then
abort (
"mkDerivation was called with unsupported hardening flags: "
+ lib.generators.toPretty { } {
+ toPretty { } {
inherit
erroneousHardeningFlags
hardeningDisable
@ -612,24 +646,28 @@ let
# it again.
staticMarker = stdenvStaticMarker;
in
lib.strings.sanitizeDerivationName (
sanitizeDerivationName (
if attrs ? name then
attrs.name + hostSuffix
else
# we cannot coerce null to a string below
assert assertMsg (
attrs ? version && attrs.version != null
) "The `version` attribute cannot be null.";
assert
(attrs ? version && attrs.version != null) || throw "The `version` attribute cannot be null.";
"${attrs.pname}${staticMarker}${hostSuffix}-${attrs.version}"
);
builder = attrs.realBuilder or stdenvShell;
args =
attrs.args or [
"-e"
./source-stdenv.sh
(attrs.builder or ./default-builder.sh)
];
attrs.args or (
if attrs ? builder then
[
"-e"
./source-stdenv.sh
attrs.builder
]
else
defaultBuilderArgs
);
inherit stdenv;
# The `system` attribute of a derivation has special meaning to Nix.
@ -695,6 +733,22 @@ let
else
null
} =
let
enabledHardeningOptions =
if elem "all" hardeningDisable then
[ ]
else
subtractLists (unique (
pipe hardeningDisable [
# disabling fortify implies fortify3 should also be disabled
(concretizeFlagImplications "fortify" [ "fortify3" ])
# disabling strictflexarrays1 implies strictflexarrays3 should also be disabled
(concretizeFlagImplications "strictflexarrays1" [ "strictflexarrays3" ])
# disabling libcxxhardeningfast implies libcxxhardeningextensive should also be disabled
(concretizeFlagImplications "libcxxhardeningfast" [ "libcxxhardeningextensive" ])
]
)) (defaultHardeningFlags ++ hardeningEnable);
in
concatStringsSep " " enabledHardeningOptions;
# TODO: remove platform condition
@ -794,7 +848,7 @@ let
then
if separateDebugInfo' then debugCachedOutputChecks else cachedOutputChecks
else
builtins.listToAttrs (
listToAttrs (
map (name: {
inherit name;
value =
@ -809,12 +863,7 @@ let
# that's "normal". Notably it symlinks to the source.
# So disable reference checking for the debug output
if separateDebugInfo' && name == "debug" then
removeAttrs raw [
"allowedReferences"
"allowedRequisites"
"disallowedReferences"
"disallowedRequisites"
]
removeAttrs raw referenceCheckingAttrsToRemove
else
raw;
}) outputs
@ -854,11 +903,11 @@ let
pos ? # position used in error messages and for meta.position
(
if attrs.meta.description or null != null then
builtins.unsafeGetAttrPos "description" attrs.meta
unsafeGetAttrPos "description" attrs.meta
else if attrs.version or null != null then
builtins.unsafeGetAttrPos "version" attrs
unsafeGetAttrPos "version" attrs
else
builtins.unsafeGetAttrPos "name" attrs
unsafeGetAttrPos "name" attrs
),
# Experimental. For simple packages mostly just works,
@ -885,12 +934,7 @@ let
if attrs ? meta.mainProgram then env // { NIX_MAIN_PROGRAM = attrs.meta.mainProgram; } else env;
derivationArg = makeDerivationArgument (
removeAttrs attrs [
"meta"
"passthru"
"pos"
"env"
]
removeAttrs attrs argumentAttrsToRemove
// {
${if __structuredAttrs then "env" else null} = checkedEnv;
cmakeFlags = makeCMakeFlags attrs;
@ -910,44 +954,32 @@ let
checkedEnv =
let
overlappingNames = attrNames (builtins.intersectAttrs env' derivationArg);
errors = lib.concatMapStringsSep "\n" (
name:
" - ${name}: in `env`: ${lib.generators.toPretty { } env'.${name}}; in derivation arguments: ${
lib.generators.toPretty { } derivationArg.${name}
}"
) overlappingNames;
overlappingArgs = intersectAttrs env' derivationArg;
in
assert assertMsg (isAttrs env && !isDerivation env)
"`env` must be an attribute set of environment variables. Set `env.env` or pick a more specific name.";
assert assertMsg (overlappingNames == [ ])
"The `env` attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping:\n${errors}";
assert
(isAttrs env && !isDerivation env)
|| throw "`env` must be an attribute set of environment variables. Set `env.env` or pick a more specific name.";
assert
(overlappingArgs == { })
|| throw (
let
errors = concatMapStringsSep "\n" (
name:
" - ${name}: in `env`: ${toPretty { } env'.${name}}; in derivation arguments: ${
toPretty { } derivationArg.${name}
}"
) (attrNames overlappingArgs);
in
"The `env` attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping:\n${errors}"
);
mapAttrs (
n: v:
assert assertMsg (isString v || isBool v || isInt v || isDerivation v)
"The `env` attribute set can only contain derivation, string, boolean or integer attributes. The `${n}` attribute is of type ${builtins.typeOf v}.";
assert
(isString v || isBool v || isInt v || isDerivation v)
|| throw "The `env` attribute set can only contain derivation, string, boolean or integer attributes. The `${n}` attribute is of type ${typeOf v}.";
v
) env';
attrsToRemove = [
# Fixed-output derivations may not reference other paths, which means that
# for a fixed-output derivation, the corresponding inputDerivation should
# *not* be fixed-output. To achieve this we simply delete the attributes that
# would make it fixed-output.
"outputHashAlgo"
"outputHash"
"outputHashMode"
# inputDerivation produces the inputs; not the outputs, so any
# restrictions on what used to be the outputs don't serve a purpose
# anymore.
"allowedReferences"
"allowedRequisites"
"disallowedReferences"
"disallowedRequisites"
"outputChecks"
];
in
extendDerivation validity.handled (
@ -958,7 +990,7 @@ let
# needed to enter a nix-shell with
# nix-build shell.nix -A inputDerivation
inputDerivation = derivation (
removeAttrs derivationArg attrsToRemove
removeAttrs derivationArg attrsToRemoveLast
// {
# Add a name in case the original drv didn't have one
name = "inputDerivation" + optionalString (derivationArg ? name) "-${derivationArg.name}";