Merge master into staging-next

Changed files
+357 -115
ci
eval
nixos
modules
services
system
pkgs
applications
blockchains
elements
build-support
by-name
co
codesnap
fl
flood
mo
moneydance
sq
squeezelite
ya
yamlscript
development
python-modules
servers
home-assistant
custom-components
moonraker
+65 -4
ci/eval/compare/default.nix
···
jq,
runCommand,
writeText,
-
supportedSystems,
...
}:
{ beforeResultDir, afterResultDir }:
let
+
/*
+
Derivation that computes which packages are affected (added, changed or removed) between two revisions of nixpkgs.
+
Note: "platforms" are "x86_64-linux", "aarch64-darwin", ...
+
+
---
+
Inputs:
+
- beforeResultDir, afterResultDir: The evaluation result from before and after the change.
+
They can be obtained by running `nix-build -A ci.eval.full` on both revisions.
+
+
---
+
Outputs:
+
- changed-paths.json: Various information about the changes:
+
{
+
attrdiff: {
+
added: ["package1"],
+
changed: ["package2", "package3"],
+
removed: ["package4"],
+
},
+
labels: [
+
"10.rebuild-darwin: 1-10",
+
"10.rebuild-linux: 1-10"
+
],
+
rebuildsByKernel: {
+
darwin: ["package1", "package2"],
+
linux: ["package1", "package2", "package3"]
+
},
+
rebuildCountByKernel: {
+
darwin: 2,
+
linux: 3,
+
},
+
rebuildsByPlatform: {
+
aarch64-darwin: ["package1", "package2"],
+
aarch64-linux: ["package1", "package2"],
+
x86_64-linux: ["package1", "package2", "package3"],
+
x86_64-darwin: ["package1"],
+
},
+
}
+
- step-summary.md: A markdown render of the changes
+
+
---
+
Implementation details:
+
+
Helper functions can be found in ./utils.nix.
+
Two main "types" are important:
+
+
- `packagePlatformPath`: A string of the form "<PACKAGE_PATH>.<PLATFORM>"
+
Example: "python312Packages.numpy.x86_64-linux"
+
+
- `packagePlatformAttr`: An attrs representation of a packagePlatformPath:
+
Example: { name = "python312Packages.numpy"; platform = "x86_64-linux"; }
+
*/
inherit (import ./utils.nix { inherit lib; })
diff
groupByKernel
+
convertToPackagePlatformAttrs
+
groupByPlatform
extractPackageNames
getLabels
uniqueStrings
···
beforeAttrs = getAttrs beforeResultDir;
afterAttrs = getAttrs afterResultDir;
+
# Attrs
+
# - keys: "added", "changed" and "removed"
+
# - values: lists of `packagePlatformPath`s
diffAttrs = diff beforeAttrs afterAttrs;
changed-paths =
let
rebuilds = uniqueStrings (diffAttrs.added ++ diffAttrs.changed);
+
rebuildsPackagePlatformAttrs = convertToPackagePlatformAttrs rebuilds;
-
rebuildsByKernel = groupByKernel rebuilds;
+
rebuildsByPlatform = groupByPlatform rebuildsPackagePlatformAttrs;
+
rebuildsByKernel = groupByKernel rebuildsPackagePlatformAttrs;
rebuildCountByKernel = lib.mapAttrs (
kernel: kernelRebuilds: lib.length kernelRebuilds
) rebuildsByKernel;
in
writeText "changed-paths.json" (
builtins.toJSON {
-
attrdiff = lib.mapAttrs (_: v: extractPackageNames v) diffAttrs;
-
inherit rebuildsByKernel rebuildCountByKernel;
+
attrdiff = lib.mapAttrs (_: extractPackageNames) diffAttrs;
+
inherit
+
rebuildsByPlatform
+
rebuildsByKernel
+
rebuildCountByKernel
+
;
labels = getLabels rebuildCountByKernel;
}
);
+141 -60
ci/eval/compare/utils.nix
···
# Borrowed from https://github.com/NixOS/nixpkgs/pull/355616
uniqueStrings = list: builtins.attrNames (builtins.groupBy lib.id list);
-
_processSystemPath =
-
packageSystemPath:
+
/*
+
Converts a `packagePlatformPath` into a `packagePlatformAttr`
+
+
Turns
+
"hello.aarch64-linux"
+
into
+
{
+
name = "hello";
+
platform = "aarch64-linux";
+
}
+
*/
+
convertToPackagePlatformAttr =
+
packagePlatformPath:
let
-
# python312Packages.torch.aarch64-linux -> ["python312Packages" "torch" "aarch64-linux"]
-
# splittedPath = lib.splitString "." attrName;
-
splittedPath = lib.splitString "." packageSystemPath;
+
# python312Packages.numpy.aarch64-linux -> ["python312Packages" "numpy" "aarch64-linux"]
+
splittedPath = lib.splitString "." packagePlatformPath;
-
# ["python312Packages" "torch" "aarch64-linux"] -> ["python312Packages" "torch"]
+
# ["python312Packages" "numpy" "aarch64-linux"] -> ["python312Packages" "numpy"]
packagePath = lib.sublist 0 (lib.length splittedPath - 1) splittedPath;
+
+
# "python312Packages.numpy"
+
name = lib.concatStringsSep "." packagePath;
in
-
{
-
# "python312Packages.torch"
-
name = lib.concatStringsSep "." packagePath;
+
if name == "" then
+
null
+
else
+
{
+
# python312Packages.numpy
+
inherit name;
+
+
# "aarch64-linux"
+
platform = lib.last splittedPath;
+
};
+
+
/*
+
Converts a list of `packagePlatformPath`s into a list of `packagePlatformAttr`s
+
+
Turns
+
[
+
"hello.aarch64-linux"
+
"hello.x86_64-linux"
+
"hello.aarch64-darwin"
+
"hello.x86_64-darwin"
+
"bye.x86_64-darwin"
+
"bye.aarch64-darwin"
+
"release-checks" <- Will be dropped
+
]
+
into
+
[
+
{ name = "hello"; platform = "aarch64-linux"; }
+
{ name = "hello"; platform = "x86_64-linux"; }
+
{ name = "hello"; platform = "aarch64-darwin"; }
+
{ name = "hello"; platform = "x86_64-darwin"; }
+
{ name = "bye"; platform = "aarch64-darwin"; }
+
{ name = "bye"; platform = "x86_64-darwin"; }
+
]
+
*/
+
convertToPackagePlatformAttrs =
+
packagePlatformPaths:
+
builtins.filter (x: x != null) (builtins.map convertToPackagePlatformAttr packagePlatformPaths);
-
# "aarch64-linux"
-
system = lib.last splittedPath;
-
};
+
/*
+
Converts a list of `packagePlatformPath`s directly to a list of (unique) package names
-
# Turns
-
# [
-
# "hello.aarch64-linux"
-
# "hello.x86_64-linux"
-
# "hello.aarch64-darwin"
-
# "hello.x86_64-darwin"
-
# "bye.x86_64-darwin"
-
# "bye.aarch64-darwin"
-
# ]
-
#
-
# into
-
#
-
# [
-
# "hello"
-
# "bye"
-
# ]
+
Turns
+
[
+
"hello.aarch64-linux"
+
"hello.x86_64-linux"
+
"hello.aarch64-darwin"
+
"hello.x86_64-darwin"
+
"bye.x86_64-darwin"
+
"bye.aarch64-darwin"
+
]
+
into
+
[
+
"hello"
+
"bye"
+
]
+
*/
extractPackageNames =
-
packageSystemPaths:
-
builtins.attrNames (
-
builtins.removeAttrs (builtins.groupBy (
-
packageSystemPath: (_processSystemPath packageSystemPath).name
-
) packageSystemPaths) [ "" ]
-
);
+
packagePlatformPaths:
+
let
+
packagePlatformAttrs = convertToPackagePlatformAttrs (uniqueStrings packagePlatformPaths);
+
in
+
uniqueStrings (builtins.map (p: p.name) packagePlatformAttrs);
+
+
/*
+
Computes the key difference between two attrs
-
# Computes a diff between two attrs
-
# {
-
# added: [ <keys only in the second object> ],
-
# removed: [ <keys only in the first object> ],
-
# changed: [ <keys with different values between the two objects> ],
-
# }
-
#
+
{
+
added: [ <keys only in the second object> ],
+
removed: [ <keys only in the first object> ],
+
changed: [ <keys with different values between the two objects> ],
+
}
+
*/
diff =
let
filterKeys = cond: attrs: lib.attrNames (lib.filterAttrs cond attrs);
···
) old;
};
+
/*
+
Group a list of `packagePlatformAttr`s by platforms
+
+
Turns
+
[
+
{ name = "hello"; platform = "aarch64-linux"; }
+
{ name = "hello"; platform = "x86_64-linux"; }
+
{ name = "hello"; platform = "aarch64-darwin"; }
+
{ name = "hello"; platform = "x86_64-darwin"; }
+
{ name = "bye"; platform = "aarch64-darwin"; }
+
{ name = "bye"; platform = "x86_64-darwin"; }
+
]
+
into
+
{
+
aarch64-linux = [ "hello" ];
+
x86_64-linux = [ "hello" ];
+
aarch64-darwin = [ "hello" "bye" ];
+
x86_64-darwin = [ "hello" "bye" ];
+
}
+
*/
+
groupByPlatform =
+
packagePlatformAttrs:
+
let
+
packagePlatformAttrsByPlatform = builtins.groupBy (p: p.platform) packagePlatformAttrs;
+
extractPackageNames = map (p: p.name);
+
in
+
lib.mapAttrs (_: extractPackageNames) packagePlatformAttrsByPlatform;
+
# Turns
# [
-
# "hello.aarch64-linux"
-
# "hello.x86_64-linux"
-
# "hello.aarch64-darwin"
-
# "hello.x86_64-darwin"
-
# "bye.x86_64-darwin"
-
# "bye.aarch64-darwin"
+
# { name = "hello"; platform = "aarch64-linux"; }
+
# { name = "hello"; platform = "x86_64-linux"; }
+
# { name = "hello"; platform = "aarch64-darwin"; }
+
# { name = "hello"; platform = "x86_64-darwin"; }
+
# { name = "bye"; platform = "aarch64-darwin"; }
+
# { name = "bye"; platform = "x86_64-darwin"; }
# ]
#
# into
#
# {
-
# linux = [
-
# "hello"
-
# ];
-
# darwin = [
-
# "hello"
-
# "bye"
-
# ];
+
# linux = [ "hello" ];
+
# darwin = [ "hello" "bye" ];
# }
groupByKernel =
-
systemPaths:
+
packagePlatformAttrs:
let
-
systemPaths' = builtins.map _processSystemPath systemPaths;
-
filterKernel =
kernel:
builtins.attrNames (
-
builtins.groupBy (systemPath: systemPath.name) (
-
builtins.filter (systemPath: lib.hasSuffix kernel systemPath.system) systemPaths'
+
builtins.groupBy (p: p.name) (
+
builtins.filter (p: lib.hasSuffix kernel p.platform) packagePlatformAttrs
)
);
in
lib.genAttrs [ "linux" "darwin" ] filterKernel;
-
getLabels = lib.mapAttrs (
+
/*
+
Maps an attrs of `kernel - rebuild counts` mappings to a list of labels
+
+
Turns
+
{
+
linux = 56;
+
darwin = 8;
+
}
+
into
+
[
+
"10.rebuild-darwin: 1-10"
+
"10.rebuild-linux: 11-100"
+
]
+
*/
+
getLabels = lib.mapAttrsToList (
kernel: rebuildCount:
let
number =
+2 -2
nixos/modules/services/web-apps/bookstack.nix
···
index = "index.php";
tryFiles = "$uri $uri/ /index.php?$query_string";
};
-
"~ \.php$".extraConfig = ''
+
"~ \\.php$".extraConfig = ''
fastcgi_pass unix:${config.services.phpfpm.pools."bookstack".socket};
'';
-
"~ \.(js|css|gif|png|ico|jpg|jpeg)$" = {
+
"~ \\.(js|css|gif|png|ico|jpg|jpeg)$" = {
extraConfig = "expires 365d;";
};
};
+16
nixos/modules/services/web-apps/immich.nix
···
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
+
UMask = "0077";
};
inherit (lib)
types
···
CacheDirectory = "immich";
User = cfg.user;
Group = cfg.group;
+
};
+
};
+
+
systemd.tmpfiles.settings = {
+
immich = {
+
# Redundant to the `UMask` service config setting on new installs, but installs made in
+
# early 24.11 created world-readable media storage by default, which is a privacy risk. This
+
# fixes those installs.
+
"${cfg.mediaLocation}" = {
+
e = {
+
user = cfg.user;
+
group = cfg.group;
+
mode = "0700";
+
};
+
};
};
};
+13 -8
nixos/modules/system/activation/activation-script.nix
···
default = {};
example = literalExpression ''
-
{ stdio.text =
-
'''
-
# Needed by some programs.
-
ln -sfn /proc/self/fd /dev/fd
-
ln -sfn /proc/self/fd/0 /dev/stdin
-
ln -sfn /proc/self/fd/1 /dev/stdout
-
ln -sfn /proc/self/fd/2 /dev/stderr
-
''';
+
{
+
stdio = {
+
# Run after /dev has been mounted
+
deps = [ "specialfs" ];
+
text =
+
'''
+
# Needed by some programs.
+
ln -sfn /proc/self/fd /dev/fd
+
ln -sfn /proc/self/fd/0 /dev/stdin
+
ln -sfn /proc/self/fd/1 /dev/stdout
+
ln -sfn /proc/self/fd/2 /dev/stderr
+
''';
+
};
}
'';
+2 -2
pkgs/applications/blockchains/elements/default.nix
···
stdenv.mkDerivation rec {
pname = if withGui then "elements" else "elementsd";
-
version = "23.2.1";
+
version = "23.2.4";
src = fetchFromGitHub {
owner = "ElementsProject";
repo = "elements";
rev = "elements-${version}";
-
sha256 = "sha256-qHtSgfZGZ4Beu5fsJAOZm8ejj7wfHBbOS6WAjOrCuw4=";
+
sha256 = "sha256-UNjYkEZBjGuhkwBxSkNXjBBcLQqoan/afCLhoR2lOY4=";
};
patches = [
+1 -1
pkgs/build-support/xen/default.nix
···
;
# Mark versions older than minSupportedVersion as EOL.
-
minSupportedVersion = "4.16";
+
minSupportedVersion = "4.17";
#TODO: fix paths instead.
scriptEnvPath = makeSearchPathOutput "out" "bin" [
+43
pkgs/by-name/co/codesnap/package.nix
···
+
{
+
lib,
+
rustPlatform,
+
fetchFromGitHub,
+
versionCheckHook,
+
nix-update-script,
+
}:
+
rustPlatform.buildRustPackage rec {
+
pname = "codesnap";
+
version = "0.8.2";
+
+
src = fetchFromGitHub {
+
owner = "mistricky";
+
repo = "CodeSnap";
+
tag = "v${version}";
+
hash = "sha256-/eWqJ7CyHwYCOSoQHZ6047hWbVsp30JMXfeUeNci8xM=";
+
};
+
+
cargoHash = "sha256-trthuKmI7V6HQHb+uu1RjZy4+qIP1anyqPdHwzEUuLs=";
+
+
cargoBuildFlags = [
+
"-p"
+
"codesnap-cli"
+
];
+
cargoTestFlags = cargoBuildFlags;
+
+
nativeInstallCheckInputs = [
+
versionCheckHook
+
];
+
versionCheckProgramArg = [ "--version" ];
+
doInstallCheck = true;
+
+
passthru.updateScript = nix-update-script { };
+
+
meta = {
+
description = "Command-line tool for generating beautiful code snippets";
+
homepage = "https://github.com/mistricky/CodeSnap";
+
changelog = "https://github.com/mistricky/CodeSnap/releases/tag/v${version}";
+
license = lib.licenses.mit;
+
maintainers = with lib.maintainers; [ nartsiss ];
+
mainProgram = "codesnap";
+
};
+
}
+16 -6
pkgs/by-name/fl/flood/package.nix
···
, buildNpmPackage
, fetchFromGitHub
, nixosTests
+
, pnpm
+
, nix-update-script
}:
buildNpmPackage rec {
pname = "flood";
-
version = "4.8.2";
+
version = "4.8.5";
src = fetchFromGitHub {
owner = "jesec";
repo = pname;
rev = "v${version}";
-
hash = "sha256-Ejr0pmWIuYByzDS+iFTECO/aymzuJrJjaaW7HikNt2w=";
+
hash = "sha256-lm+vPo7V99OSUAVEvdiTNMlD/+iHGPIyPLc1WzO1aTU=";
};
-
npmDepsHash = "sha256-md76I7W5QQvfbOmk5ODssMtJAVOj8nvaJ2PakEZ8WUA=";
+
npmConfigHook = pnpm.configHook;
+
npmDeps = pnpmDeps;
+
pnpmDeps = pnpm.fetchDeps {
+
inherit pname version src;
+
hash = "sha256-NuU9O3bEboxmuEuk1WSUeZRNgVK5cwFiUAN3+7vACGw=";
+
};
-
passthru.tests = {
-
inherit (nixosTests) flood;
+
passthru = {
+
tests = {
+
inherit (nixosTests) flood;
+
};
+
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Modern web UI for various torrent clients with a Node.js backend and React frontend";
homepage = "https://flood.js.org";
license = licenses.gpl3Only;
-
maintainers = with maintainers; [ thiagokokada winter ];
+
maintainers = with maintainers; [ thiagokokada winter ners ];
mainProgram = "flood";
};
}
+47 -21
pkgs/by-name/mo/moneydance/package.nix
···
-
{ lib, stdenv, fetchzip, makeWrapper, openjdk23, jvmFlags ? [ ] }:
+
{
+
lib,
+
stdenv,
+
buildPackages,
+
fetchzip,
+
makeWrapper,
+
openjdk23,
+
wrapGAppsHook3,
+
jvmFlags ? [ ],
+
}:
let
jdk = openjdk23.override {
enableJavaFX = true;
···
hash = "sha256-wwSb3CuhuXB4I9jq+TpLPbd1k9UzqQbAaZkGKgi+nns=";
};
-
nativeBuildInputs = [ makeWrapper ];
+
# We must use wrapGAppsHook (since Java GUIs on Linux use GTK), but by
+
# default that uses makeBinaryWrapper which doesn't support flags that need
+
# quoting: <https://github.com/NixOS/nixpkgs/issues/330471>. Thanks to
+
# @Artturin for the tip to override the wrapper generator.
+
nativeBuildInputs = [
+
makeWrapper
+
(buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; })
+
];
buildInputs = [ jdk ];
+
dontWrapGApps = true;
+
+
installPhase = ''
+
runHook preInstall
+
+
mkdir -p $out/libexec $out/bin
+
cp -p $src/lib/* $out/libexec/
+
+
runHook postInstall
+
'';
# Note the double escaping in the call to makeWrapper. The escapeShellArgs
# call quotes each element of the flags list as a word[1] and returns a
···
#
# 1. https://www.gnu.org/software/bash/manual/html_node/Word-Splitting.html
# 2. https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/make-wrapper.sh
-
installPhase = let
-
finalJvmFlags = [
-
"-client"
-
"--add-modules"
-
"javafx.swing,javafx.controls,javafx.graphics"
-
"-classpath"
-
"${placeholder "out"}/libexec/*"
-
] ++ jvmFlags ++ [ "Moneydance" ];
-
in ''
-
runHook preInstall
-
-
mkdir -p $out/libexec $out/bin
-
cp -p $src/lib/* $out/libexec/
-
makeWrapper ${jdk}/bin/java $out/bin/moneydance \
-
--add-flags ${lib.escapeShellArg (lib.escapeShellArgs finalJvmFlags)}
-
-
runHook postInstall
-
'';
+
postFixup =
+
let
+
finalJvmFlags = [
+
"-client"
+
"--add-modules"
+
"javafx.swing,javafx.controls,javafx.graphics"
+
"-classpath"
+
"${placeholder "out"}/libexec/*"
+
] ++ jvmFlags ++ [ "Moneydance" ];
+
in
+
''
+
# This is in postFixup because gappsWrapperArgs is generated in preFixup
+
makeWrapper ${jdk}/bin/java $out/bin/moneydance \
+
"''${gappsWrapperArgs[@]}" \
+
--add-flags ${lib.escapeShellArg (lib.escapeShellArgs finalJvmFlags)}
+
'';
-
passthru = { inherit jdk; };
+
passthru = {
+
inherit jdk;
+
};
meta = {
homepage = "https://infinitekind.com/moneydance";
+3 -3
pkgs/by-name/sq/squeezelite/package.nix
···
pname = binName;
# versions are specified in `squeezelite.h`
# see https://github.com/ralph-irving/squeezelite/issues/29
-
version = "2.0.0.1504";
+
version = "2.0.0.1507";
src = fetchFromGitHub {
owner = "ralph-irving";
repo = "squeezelite";
-
rev = "54e39690d9882d56c56fbdced4661abce7d8beff";
-
hash = "sha256-+NjCykWlru8y1Iy3uLvO87NcoFvcggCaEnajXRxKYno=";
+
rev = "279ac086053239323f5c4df965342e3be5d10671";
+
hash = "sha256-iMqBQJDy1pkGNHH2aFOtzBn9VK5x+Na4iD2vc3bppTc=";
};
buildInputs =
+2 -2
pkgs/by-name/ya/yamlscript/package.nix
···
buildGraalvmNativeImage rec {
pname = "yamlscript";
-
version = "0.1.83";
+
version = "0.1.86";
src = fetchurl {
url = "https://github.com/yaml/yamlscript/releases/download/${version}/yamlscript.cli-${version}-standalone.jar";
-
hash = "sha256-c38jNaQSFTQA6+P2joduGe2fqSZmNiokKVf91vkJtEA=";
+
hash = "sha256-GFLmEowy89eZDB7cEMTHRKfvGNlZ9CTARxAKLH/GuNg=";
};
executable = "ys";
+4 -4
pkgs/development/python-modules/chex/default.nix
···
buildPythonPackage rec {
pname = "chex";
-
version = "0.1.87";
+
version = "0.1.88";
pyproject = true;
src = fetchFromGitHub {
owner = "deepmind";
repo = "chex";
-
rev = "refs/tags/v${version}";
-
hash = "sha256-TPh7XLWHk0y/VLXxHLANUiDmfveHPeMLks9QKf16doo=";
+
tag = "v${version}";
+
hash = "sha256-umRq+FZwyx1hz839ZibRTEFKjbBugrfUJuE8PagjqI4=";
};
build-system = [ setuptools ];
···
];
meta = {
-
description = "Chex is a library of utilities for helping to write reliable JAX code";
+
description = "Library of utilities for helping to write reliable JAX code";
homepage = "https://github.com/deepmind/chex";
changelog = "https://github.com/google-deepmind/chex/releases/tag/v${version}";
license = lib.licenses.asl20;
+2 -2
pkgs/servers/home-assistant/custom-components/moonraker/package.nix
···
buildHomeAssistantComponent rec {
owner = "marcolivierarsenault";
domain = "moonraker";
-
version = "1.4.0";
+
version = "1.5.0";
src = fetchFromGitHub {
owner = "marcolivierarsenault";
repo = "moonraker-home-assistant";
rev = "refs/tags/${version}";
-
hash = "sha256-wdbomvpRvadWjxi8c6D9dhdXmWnSuVxmEPZCX8WmC5M=";
+
hash = "sha256-LGpCT0a6mxbf0W6ucTIBhl9aNUd5/1dUk6M+CzRKuoU=";
};
propagatedBuildInputs = [