Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Default meson build dir
/build
# Meson creates this file too
src/.wraplock

# /tests/functional/
/tests/functional/common/subst-vars.sh
Expand Down
10 changes: 5 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "The purely functional package manager";

inputs.nixpkgs.url = "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz";
inputs.nixpkgs.url = "https://channels.nixos.org/nixos-25.11/nixexprs.tar.xz";

inputs.nixpkgs-regression.url = "github:NixOS/nixpkgs/215d4d0fd80ca5163643b03a33fde804a29cc1e2";
inputs.nixpkgs-23-11.url = "github:NixOS/nixpkgs/a62e6edd6d5e1fa0329b8653c801147986f8d446";
Expand Down
2 changes: 1 addition & 1 deletion maintainers/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
clang-format = {
enable = true;
# https://github.com/cachix/git-hooks.nix/pull/532
package = pkgs.llvmPackages_latest.clang-tools;
package = pkgs.llvmPackages_21.clang-tools;
excludes = [
# We don't want to format test data
# ''tests/(?!nixos/).*\.nix''
Expand Down
2 changes: 1 addition & 1 deletion nix-meson-build-support/common/asan-options/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Clang gets grumpy about missing libasan symbols if -shared-libasan is not
# passed when building shared libs, at least on Linux
if cxx.get_id() == 'clang' and ('address' in get_option('b_sanitize') or 'undefined' in get_option(
'b_sanitize',
'b_sanitize',
))
add_project_link_arguments('-shared-libasan', language : 'cpp')
endif
Expand Down
5 changes: 4 additions & 1 deletion packaging/components.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,14 @@ let
];
};

mesonBuildLayer = finalAttrs: prevAttrs: {
mesonBuildLayer = finalAttrs: prevAttrs: rec {
nativeBuildInputs = prevAttrs.nativeBuildInputs or [ ] ++ [
pkg-config
];
separateDebugInfo = !stdenv.hostPlatform.isStatic;
# needed by separateDebugInfo
# SEE: https://github.com/NixOS/nixpkgs/pull/394674/commits/a4d355342976e9e9823fb94f133bc43ebec9da5b
__structuredAttrs = separateDebugInfo;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
};

Expand Down
1 change: 1 addition & 0 deletions scripts/install-systemd-multi-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ escape_systemd_env() {
create_systemd_proxy_env() {
vars="http_proxy https_proxy ftp_proxy all_proxy no_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY ALL_PROXY NO_PROXY"
for v in $vars; do
# shellcheck disable=SC2268
if [ "x${!v:-}" != "x" ]; then
echo "Environment=${v}=$(escape_systemd_env "${!v}")"
fi
Expand Down
4 changes: 2 additions & 2 deletions src/libexpr/include/nix/expr/value.hh
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ inline constexpr bool useBitPackedValueStorage = (ptrSize == 8) && (__STDCPP_DEF
* Packs discriminator bits into the pointer alignment niches.
*/
template<std::size_t ptrSize>
class alignas(16) ValueStorage<ptrSize, std::enable_if_t<detail::useBitPackedValueStorage<ptrSize>>>
: public detail::ValueBase
class alignas(16)
ValueStorage<ptrSize, std::enable_if_t<detail::useBitPackedValueStorage<ptrSize>>> : public detail::ValueBase
{
/* Needs a dependent type name in order for member functions (and
* potentially ill-formed bit casts) to be SFINAE'd out.
Expand Down
4 changes: 2 additions & 2 deletions src/perl/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ perl.pkgs.toPerlModule (
nix-store
bzip2
libsodium
perlPackages.DBI
perlPackages.DBDSQLite
];

# `perlPackages.Test2Harness` is marked broken for Darwin
Expand All @@ -64,8 +66,6 @@ perl.pkgs.toPerlModule (
'';

mesonFlags = [
(lib.mesonOption "dbi_path" "${perlPackages.DBI}/${perl.libPrefix}")
(lib.mesonOption "dbd_sqlite_path" "${perlPackages.DBDSQLite}/${perl.libPrefix}")
(lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
];

Expand Down
5 changes: 4 additions & 1 deletion tests/functional/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ test "$status" = 1
# Precise number of errors depends on daemon version / goal refactorings
(( "$(<<<"$out" grep -cE '^error:')" >= 2 ))

if isDaemonNewer "2.29pre"; then
if isDaemonNewer "2.31"; then
<<<"$out" grepQuiet -E "error: Cannot build '.*-x4\\.drv'"
<<<"$out" grepQuiet -E "Reason: 1 dependency failed."
elif isDaemonNewer "2.29pre"; then
<<<"$out" grepQuiet -E "error: Cannot build '.*-x4\\.drv'"
<<<"$out" grepQuiet -E "Reason: 1 dependency failed."
<<<"$out" grepQuiet -E "Build failed due to failed dependency"
Comment on lines -184 to 190
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I remove the last line from the isDaemonNewer "2.29pre" branch instead?

Expand Down
4 changes: 2 additions & 2 deletions tests/functional/ca/issue-13247.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ buildViaSubstitute use-a-more-outputs^first

delete

# Failure with 2.28 encountered in CI
requireDaemonNewerThan "2.29"
# Failure with 2.34 encountered in CI
requireDaemonNewerThan "2.34"

# Substitue just the first output
#
Expand Down
1 change: 1 addition & 0 deletions tests/functional/local-overlay-store/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ mountOverlayfs () {
"$storeBRoot/nix/store" \
|| skipTest "overlayfs is not supported"

# shellcheck disable=SC2329
cleanupOverlay () {
# shellcheck disable=2317
umount -n "$storeBRoot/nix/store"
Expand Down
6 changes: 3 additions & 3 deletions tests/functional/test-infra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ expectStderr 1 noisyFalse | grepQuiet NAY

# `set -o pipefile` is enabled

# shellcheck disable=SC2317# shellcheck disable=SC2317
# shellcheck disable=SC2329
pipefailure () {
# shellcheck disable=SC2216
true | false | true
}
expect 1 pipefailure
unset pipefailure

# shellcheck disable=SC2317
# shellcheck disable=2329
pipefailure () {
# shellcheck disable=SC2216
false | true | true
Expand Down Expand Up @@ -84,7 +84,7 @@ expect 1 useUnbound
# ! alone unfortunately negates `set -e`, but it works in functions:
# shellcheck disable=SC2251
! true
# shellcheck disable=SC2317
# shellcheck disable=SC2329
funBang () {
! true
}
Expand Down
15 changes: 8 additions & 7 deletions tests/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ let
{
imports = [ checkOverrideNixVersion ];
nix.package = lib.mkForce (
pkgs.nixVersions.nix_2_3.overrideAttrs (o: {
meta = o.meta // {
# This version shouldn't be used by end-users, but we run tests against
# it to ensure we don't break protocol compatibility.
knownVulnerabilities = [ ];
};
})
nixpkgs-23-11.legacyPackages.${pkgs.stdenv.hostPlatform.system}.nixVersions.nix_2_3.overrideAttrs
(o: {
meta = o.meta // {
# This version shouldn't be used by end-users, but we run tests against
# it to ensure we don't break protocol compatibility.
knownVulnerabilities = [ ];
};
})
);
};

Expand Down
16 changes: 16 additions & 0 deletions tests/nixos/fetchers-substitute.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@
nodes.substituter =
{ pkgs, ... }:
{
# nix-serve is broken while cross-compiling in nixpkgs 25.11. It's been
# fixed since, but while we're pinning 25.11 we use this workaround.
nixpkgs.overlays = [
(final: prev: {
nix-serve =
final.lib.warnIf (final.lib.versions.majorMinor final.lib.version != "25.11")
"remove the hack in fetchers-substitute.nix when updating nixpkgs from 25.11"
(
prev.nix-serve.override {
nix = prev.nix // {
libs.nix-perl-bindings = prev.nix.nix-perl-bindings or null;
};
}
);
})
];
virtualisation.writableStore = true;

nix.settings.extra-experimental-features = [
Expand Down
11 changes: 1 addition & 10 deletions tests/nixos/functional/common.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
{ lib, nixComponents, ... }:

let
# FIXME (roberth) reference issue
inputDerivation =
pkg:
(pkg.overrideAttrs (o: {
disallowedReferences = [ ];
})).inputDerivation;

in
{
# We rarely change the script in a way that benefits from type checking, so
# we skip it to save time.
Expand All @@ -20,7 +11,7 @@ in

virtualisation.writableStore = true;
system.extraDependencies = [
(inputDerivation config.nix.package)
config.nix.package.inputDerivation
];

nix.settings.substituters = lib.mkForce [ ];
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/s3-binary-cache-store.nix
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ in
server.wait_for_unit("minio")
server.wait_for_unit("network-addresses-eth1.service")
server.wait_for_open_port(9000)
server.succeed(f"mc config host add minio http://localhost:9000 {ACCESS_KEY} {SECRET_KEY} --api s3v4")
server.succeed(f"mc alias set minio http://localhost:9000 {ACCESS_KEY} {SECRET_KEY} --api s3v4")

# Run tests (each gets isolated bucket via decorator)
test_credential_caching()
Expand Down
Loading