Compare commits
52
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
920f14a360 | ||
|
|
775c045a9e | ||
|
|
9febd9f84b | ||
|
|
064c141fc8 | ||
|
|
af298ee53f | ||
|
|
4dfe5eb587 | ||
|
|
b23189061e | ||
|
|
025c935ba2 | ||
|
|
29d37eb2db | ||
|
|
d0f98c76f9 | ||
|
|
eb97d69f0d | ||
|
|
92b4578a65 | ||
|
|
6733f72ea4 | ||
|
|
ad814e7b93 | ||
|
|
82a47978db | ||
|
|
f02ce07682 | ||
|
|
f0bf94fe29 | ||
|
|
22168ff57d | ||
|
|
bfa581fcff | ||
|
|
8d1c97a55a | ||
|
|
71aad3ad44 | ||
|
|
aa5ffba310 | ||
|
|
bb104e9b28 | ||
|
|
c73c503d5f | ||
|
|
95cd6c1e48 | ||
|
|
635a9975fd | ||
|
|
45aba8d640 | ||
|
|
fa140349b8 | ||
|
|
2c02b58617 | ||
|
|
cb3c8bba70 | ||
|
|
5ecb8a12ee | ||
|
|
a6a621c8ff | ||
|
|
f1cb0e6ddb | ||
|
|
7ef0eddfdc | ||
|
|
c0b4fb0de8 | ||
|
|
2b4ddbbf47 | ||
|
|
d653225a24 | ||
|
|
398c4136c2 | ||
|
|
084e75ed2f | ||
|
|
ae2bd40d06 | ||
|
|
9b87c4f806 | ||
|
|
5671175a5e | ||
|
|
f33a435329 | ||
|
|
07309b497a | ||
|
|
a42345a1ff | ||
|
|
9ee7318a23 | ||
|
|
b1826f720c | ||
|
|
da1b5599b7 | ||
|
|
8c5107a640 | ||
|
|
a5f003555e | ||
|
|
668e09f74a | ||
|
|
67aa608856 |
No files matched your search
@@ -38,6 +38,15 @@
|
||||
|
||||
Curl created sockets without setting `FD_CLOEXEC`/`SOCK_CLOEXEC`. This could previously cause connections to remain open forever when using commands like `nix shell`. This change sets the `FD_CLOEXEC` flag using a `CURLOPT_SOCKOPTFUNCTION` callback.
|
||||
|
||||
- Add BLAKE3 hash algorithm [#12379](https://github.com/NixOS/nix/pull/12379)
|
||||
|
||||
Nix now supports the BLAKE3 hash algorithm as an experimental feature (`blake3-hashes`):
|
||||
|
||||
```console
|
||||
# nix hash file ./file --type blake3 --extra-experimental-features blake3-hashes
|
||||
blake3-34P4p+iZXcbbyB1i4uoF7eWCGcZHjmaRn6Y7QdynLwU=
|
||||
```
|
||||
|
||||
# Contributors
|
||||
|
||||
This release was made possible by the following 21 contributors:
|
||||
|
||||
Generated
+4
-4
@@ -63,16 +63,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1734359947,
|
||||
"narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=",
|
||||
"lastModified": 1743315132,
|
||||
"narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a",
|
||||
"rev": "52faf482a3889b7619003c0daec593a1912fddc1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-24.11",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
description = "The purely functional package manager";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
inputs.nixpkgs-regression.url = "github:NixOS/nixpkgs/215d4d0fd80ca5163643b03a33fde804a29cc1e2";
|
||||
inputs.nixpkgs-23-11.url = "github:NixOS/nixpkgs/a62e6edd6d5e1fa0329b8653c801147986f8d446";
|
||||
@@ -156,6 +156,13 @@
|
||||
inherit officialRelease;
|
||||
pkgs = final;
|
||||
src = self;
|
||||
maintainers = with lib.maintainers; [
|
||||
edolstra
|
||||
Ericson2314
|
||||
Mic92
|
||||
roberth
|
||||
tomberek
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -230,24 +237,28 @@
|
||||
This shouldn't build anything significant; just check that things
|
||||
(including derivations) are _set up_ correctly.
|
||||
*/
|
||||
packaging-overriding =
|
||||
let
|
||||
pkgs = nixpkgsFor.${system}.native;
|
||||
nix = self.packages.${system}.nix;
|
||||
in
|
||||
assert (nix.appendPatches [ pkgs.emptyFile ]).libs.nix-util.src.patches == [ pkgs.emptyFile ];
|
||||
if pkgs.stdenv.buildPlatform.isDarwin then
|
||||
lib.warn "packaging-overriding check currently disabled because of a permissions issue on macOS" pkgs.emptyFile
|
||||
else
|
||||
# If this fails, something might be wrong with how we've wired the scope,
|
||||
# or something could be broken in Nixpkgs.
|
||||
pkgs.testers.testEqualContents {
|
||||
assertion = "trivial patch does not change source contents";
|
||||
expected = "${./.}";
|
||||
actual =
|
||||
# Same for all components; nix-util is an arbitrary pick
|
||||
(nix.appendPatches [ pkgs.emptyFile ]).libs.nix-util.src;
|
||||
};
|
||||
# Disabled due to a bug in `testEqualContents` (see
|
||||
# https://github.com/NixOS/nix/issues/12690).
|
||||
/*
|
||||
packaging-overriding =
|
||||
let
|
||||
pkgs = nixpkgsFor.${system}.native;
|
||||
nix = self.packages.${system}.nix;
|
||||
in
|
||||
assert (nix.appendPatches [ pkgs.emptyFile ]).libs.nix-util.src.patches == [ pkgs.emptyFile ];
|
||||
if pkgs.stdenv.buildPlatform.isDarwin then
|
||||
lib.warn "packaging-overriding check currently disabled because of a permissions issue on macOS" pkgs.emptyFile
|
||||
else
|
||||
# If this fails, something might be wrong with how we've wired the scope,
|
||||
# or something could be broken in Nixpkgs.
|
||||
pkgs.testers.testEqualContents {
|
||||
assertion = "trivial patch does not change source contents";
|
||||
expected = "${./.}";
|
||||
actual =
|
||||
# Same for all components; nix-util is an arbitrary pick
|
||||
(nix.appendPatches [ pkgs.emptyFile ]).libs.nix-util.src;
|
||||
};
|
||||
*/
|
||||
}
|
||||
// (lib.optionalAttrs (builtins.elem system linux64BitSystems)) {
|
||||
dockerImage = self.hydraJobs.dockerImage.${system};
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# vim: set filetype=bash:
|
||||
#!nix shell .#changelog-d --command bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# --- CONFIGURATION ---
|
||||
|
||||
# This does double duty for
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
pkgs,
|
||||
src,
|
||||
officialRelease,
|
||||
maintainers,
|
||||
}:
|
||||
|
||||
scope:
|
||||
@@ -110,7 +111,7 @@ let
|
||||
let
|
||||
n = lib.length finalScope.patches;
|
||||
in
|
||||
if n == 0 then finalAttrs.version else finalAttrs.version + "+${toString n}";
|
||||
if n == 0 then prevAttrs.version else prevAttrs.version + "+${toString n}";
|
||||
|
||||
# Clear what `derivation` can't/shouldn't serialize; see prevAttrs.workDir.
|
||||
fileset = null;
|
||||
@@ -180,9 +181,24 @@ let
|
||||
mesonFlags = [ (lib.mesonBool "b_asneeded" false) ] ++ prevAttrs.mesonFlags or [ ];
|
||||
};
|
||||
|
||||
miscGoodPractice = finalAttrs: prevAttrs: {
|
||||
nixDefaultsLayer = finalAttrs: prevAttrs: {
|
||||
strictDeps = prevAttrs.strictDeps or true;
|
||||
enableParallelBuilding = true;
|
||||
pos = builtins.unsafeGetAttrPos "pname" prevAttrs;
|
||||
meta = prevAttrs.meta or { } // {
|
||||
homepage = prevAttrs.meta.homepage or "https://nixos.org/nix";
|
||||
longDescription =
|
||||
prevAttrs.longDescription or ''
|
||||
Nix is a powerful package manager for mainly Linux and other Unix systems that
|
||||
makes package management reliable and reproducible. It provides atomic
|
||||
upgrades and rollbacks, side-by-side installation of multiple versions of
|
||||
a package, multi-user package management and easy setup of build
|
||||
environments.
|
||||
'';
|
||||
license = prevAttrs.meta.license or lib.licenses.lgpl21Plus;
|
||||
maintainers = prevAttrs.meta.maintainers or [ ] ++ scope.maintainers;
|
||||
platforms = prevAttrs.meta.platforms or (lib.platforms.unix ++ lib.platforms.windows);
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -202,6 +218,7 @@ in
|
||||
{
|
||||
version = baseVersion + versionSuffix;
|
||||
inherit versionSuffix;
|
||||
inherit maintainers;
|
||||
|
||||
inherit filesetToSource;
|
||||
|
||||
@@ -237,6 +254,10 @@ in
|
||||
but it does make the build non-granular; all components will use a complete source.
|
||||
|
||||
Packaging expressions will be ignored.
|
||||
|
||||
Single argument: the source to use.
|
||||
|
||||
See also `appendPatches`
|
||||
*/
|
||||
overrideSource =
|
||||
src:
|
||||
@@ -265,6 +286,7 @@ in
|
||||
}
|
||||
);
|
||||
resolvePath = p: finalScope.patchedSrc + "/${resolveRelPath p}";
|
||||
filesetToSource = { root, fileset }: finalScope.resolvePath root;
|
||||
appendPatches = appendPatches finalScope;
|
||||
}
|
||||
);
|
||||
@@ -281,14 +303,14 @@ in
|
||||
(scope.overrideSource "${./..}").appendPatches patches;
|
||||
|
||||
mkMesonDerivation = mkPackageBuilder [
|
||||
miscGoodPractice
|
||||
nixDefaultsLayer
|
||||
scope.sourceLayer
|
||||
setVersionLayer
|
||||
mesonLayer
|
||||
scope.mesonComponentOverrides
|
||||
];
|
||||
mkMesonExecutable = mkPackageBuilder [
|
||||
miscGoodPractice
|
||||
nixDefaultsLayer
|
||||
bsdNoLinkAsNeeded
|
||||
scope.sourceLayer
|
||||
setVersionLayer
|
||||
@@ -297,7 +319,7 @@ in
|
||||
scope.mesonComponentOverrides
|
||||
];
|
||||
mkMesonLibrary = mkPackageBuilder [
|
||||
miscGoodPractice
|
||||
nixDefaultsLayer
|
||||
bsdNoLinkAsNeeded
|
||||
scope.sourceLayer
|
||||
mesonLayer
|
||||
@@ -347,7 +369,7 @@ in
|
||||
nix-perl-bindings = callPackage ../src/perl/package.nix { };
|
||||
|
||||
nix-everything = callPackage ../packaging/everything.nix { } // {
|
||||
# Note: no `passthru.overrideAllMesonComponents`
|
||||
# Note: no `passthru.overrideAllMesonComponents` etc
|
||||
# This would propagate into `nix.overrideAttrs f`, but then discard
|
||||
# `f` when `.overrideAllMesonComponents` is used.
|
||||
# Both "methods" should be views on the same fixpoint overriding mechanism
|
||||
@@ -355,6 +377,8 @@ in
|
||||
# two-fixpoint solution.
|
||||
/**
|
||||
Apply an extension function (i.e. overlay-shaped) to all component derivations, and return the nix package.
|
||||
|
||||
Single argument: the extension function to apply (finalAttrs: prevAttrs: { ... })
|
||||
*/
|
||||
overrideAllMesonComponents = f: (scope.overrideAllMesonComponents f).nix-everything;
|
||||
|
||||
@@ -363,6 +387,10 @@ in
|
||||
This affects all components.
|
||||
|
||||
Changes to the packaging expressions will be ignored.
|
||||
|
||||
Single argument: list of patches to apply
|
||||
|
||||
See also `overrideSource`
|
||||
*/
|
||||
appendPatches = ps: (scope.appendPatches ps).nix-everything;
|
||||
|
||||
@@ -371,8 +399,26 @@ in
|
||||
but it does make the build non-granular; all components will use a complete source.
|
||||
|
||||
Packaging expressions will be ignored.
|
||||
|
||||
Filesets in the packaging expressions will be ignored.
|
||||
|
||||
Single argument: the source to use.
|
||||
|
||||
See also `appendPatches`
|
||||
*/
|
||||
overrideSource = src: (scope.overrideSource src).nix-everything;
|
||||
|
||||
/**
|
||||
Override any internals of the Nix package set.
|
||||
|
||||
Single argument: the extension function to apply to the package set (finalScope: prevScope: { ... })
|
||||
|
||||
Example:
|
||||
```
|
||||
overrideScope (finalScope: prevScope: { aws-sdk-cpp = null; })
|
||||
```
|
||||
*/
|
||||
overrideScope = f: (scope.overrideScope f).nix-everything;
|
||||
|
||||
};
|
||||
}
|
||||
+36
-35
@@ -26,6 +26,9 @@ let
|
||||
# Despite the use of the 10.13 deployment target here, the aligned
|
||||
# allocation function Clang uses with this setting actually works
|
||||
# all the way back to 10.6.
|
||||
# NOTE: this is not just a version constraint, but a request to make Darwin
|
||||
# provide this version level of support. Removing this minimum version
|
||||
# request will regress the above error.
|
||||
darwinStdenv = pkgs.overrideSDK prevStdenv { darwinMinVersion = "10.13"; };
|
||||
|
||||
in
|
||||
@@ -65,39 +68,37 @@ scope: {
|
||||
installPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.installPhase;
|
||||
});
|
||||
|
||||
libgit2 = pkgs.libgit2.overrideAttrs (
|
||||
attrs:
|
||||
{
|
||||
cmakeFlags = attrs.cmakeFlags or [ ] ++ [ "-DUSE_SSH=exec" ];
|
||||
}
|
||||
# libgit2: Nixpkgs 24.11 has < 1.9.0, which needs our patches
|
||||
// lib.optionalAttrs (!lib.versionAtLeast pkgs.libgit2.version "1.9.0") {
|
||||
nativeBuildInputs =
|
||||
attrs.nativeBuildInputs or [ ]
|
||||
# gitMinimal does not build on Windows. See packbuilder patch.
|
||||
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
||||
# Needed for `git apply`; see `prePatch`
|
||||
pkgs.buildPackages.gitMinimal
|
||||
];
|
||||
# Only `git apply` can handle git binary patches
|
||||
prePatch =
|
||||
attrs.prePatch or ""
|
||||
+ lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
||||
patch() {
|
||||
git apply
|
||||
}
|
||||
'';
|
||||
patches =
|
||||
attrs.patches or [ ]
|
||||
++ [
|
||||
./patches/libgit2-mempack-thin-packfile.patch
|
||||
]
|
||||
# gitMinimal does not build on Windows, but fortunately this patch only
|
||||
# impacts interruptibility
|
||||
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
||||
# binary patch; see `prePatch`
|
||||
./patches/libgit2-packbuilder-callback-interruptible.patch
|
||||
];
|
||||
}
|
||||
);
|
||||
libgit2 =
|
||||
if lib.versionAtLeast pkgs.libgit2.version "1.9.0" then
|
||||
pkgs.libgit2
|
||||
else
|
||||
pkgs.libgit2.overrideAttrs (attrs: {
|
||||
# libgit2: Nixpkgs 24.11 has < 1.9.0, which needs our patches
|
||||
nativeBuildInputs =
|
||||
attrs.nativeBuildInputs or [ ]
|
||||
# gitMinimal does not build on Windows. See packbuilder patch.
|
||||
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
||||
# Needed for `git apply`; see `prePatch`
|
||||
pkgs.buildPackages.gitMinimal
|
||||
];
|
||||
# Only `git apply` can handle git binary patches
|
||||
prePatch =
|
||||
attrs.prePatch or ""
|
||||
+ lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
||||
patch() {
|
||||
git apply
|
||||
}
|
||||
'';
|
||||
patches =
|
||||
attrs.patches or [ ]
|
||||
++ [
|
||||
./patches/libgit2-mempack-thin-packfile.patch
|
||||
]
|
||||
# gitMinimal does not build on Windows, but fortunately this patch only
|
||||
# impacts interruptibility
|
||||
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
||||
# binary patch; see `prePatch`
|
||||
./patches/libgit2-packbuilder-callback-interruptible.patch
|
||||
];
|
||||
});
|
||||
}
|
||||
@@ -114,9 +114,6 @@ pkgs.nixComponents.nix-util.overrideAttrs (
|
||||
(pkgs.writeScriptBin "pre-commit-hooks-install" modular.pre-commit.settings.installationScript)
|
||||
pkgs.buildPackages.nixfmt-rfc-style
|
||||
]
|
||||
# TODO: Remove the darwin check once
|
||||
# https://github.com/NixOS/nixpkgs/pull/291814 is available
|
||||
++ lib.optional (stdenv.cc.isClang && !stdenv.buildPlatform.isDarwin) pkgs.buildPackages.bear
|
||||
++ lib.optional (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) (
|
||||
lib.hiPrio pkgs.buildPackages.clang-tools
|
||||
);
|
||||
|
||||
+34
-44
@@ -4,6 +4,8 @@
|
||||
lndir,
|
||||
buildEnv,
|
||||
|
||||
maintainers,
|
||||
|
||||
nix-util,
|
||||
nix-util-c,
|
||||
nix-util-tests,
|
||||
@@ -39,6 +41,8 @@
|
||||
nix-perl-bindings,
|
||||
|
||||
testers,
|
||||
|
||||
patchedSrc ? null,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -68,48 +72,6 @@ let
|
||||
;
|
||||
};
|
||||
|
||||
dev = stdenv.mkDerivation (finalAttrs: {
|
||||
name = "nix-${nix-cli.version}-dev";
|
||||
pname = "nix";
|
||||
version = nix-cli.version;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
libs = map lib.getDev (lib.attrValues libs);
|
||||
installPhase = ''
|
||||
mkdir -p $out/nix-support
|
||||
echo $libs >> $out/nix-support/propagated-build-inputs
|
||||
'';
|
||||
passthru = {
|
||||
tests = {
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
# If we were to fully emulate output selection here, we'd confuse the Nix CLIs,
|
||||
# because they rely on `drvPath`.
|
||||
dev = finalAttrs.finalPackage.out;
|
||||
|
||||
libs = throw "`nix.dev.libs` is not meant to be used; use `nix.libs` instead.";
|
||||
};
|
||||
meta = {
|
||||
mainProgram = "nix";
|
||||
pkgConfigModules = [
|
||||
"nix-cmd"
|
||||
"nix-expr"
|
||||
"nix-expr-c"
|
||||
"nix-fetchers"
|
||||
"nix-flake"
|
||||
"nix-flake-c"
|
||||
"nix-main"
|
||||
"nix-main-c"
|
||||
"nix-store"
|
||||
"nix-store-c"
|
||||
"nix-util"
|
||||
"nix-util-c"
|
||||
];
|
||||
};
|
||||
});
|
||||
devdoc = buildEnv {
|
||||
name = "nix-${nix-cli.version}-devdoc";
|
||||
paths = [
|
||||
@@ -192,10 +154,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
devPaths = lib.mapAttrsToList (_k: lib.getDev) finalAttrs.finalPackage.libs;
|
||||
in
|
||||
''
|
||||
mkdir -p $out $dev
|
||||
mkdir -p $out $dev/nix-support
|
||||
|
||||
# Custom files
|
||||
echo $libs >> $dev/nix-support/propagated-build-inputs
|
||||
echo ${nix-cli} ${lib.escapeShellArgs devPaths} >> $dev/nix-support/propagated-build-inputs
|
||||
|
||||
# Merged outputs
|
||||
lndir ${nix-cli} $out
|
||||
|
||||
for lib in ${lib.escapeShellArgs devPaths}; do
|
||||
lndir $lib $dev
|
||||
done
|
||||
@@ -207,6 +174,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
passthru = {
|
||||
inherit (nix-cli) version;
|
||||
src = patchedSrc;
|
||||
|
||||
/**
|
||||
These are the libraries that are part of the Nix project. They are used
|
||||
@@ -248,7 +216,29 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
meta = {
|
||||
mainProgram = "nix";
|
||||
description = "The Nix package manager";
|
||||
pkgConfigModules = dev.meta.pkgConfigModules;
|
||||
longDescription = nix-cli.meta.longDescription;
|
||||
homepage = nix-cli.meta.homepage;
|
||||
license = nix-cli.meta.license;
|
||||
maintainers = maintainers;
|
||||
platforms = nix-cli.meta.platforms;
|
||||
outputsToInstall = [
|
||||
"out"
|
||||
"man"
|
||||
];
|
||||
pkgConfigModules = [
|
||||
"nix-cmd"
|
||||
"nix-expr"
|
||||
"nix-expr-c"
|
||||
"nix-fetchers"
|
||||
"nix-flake"
|
||||
"nix-flake-c"
|
||||
"nix-main"
|
||||
"nix-main-c"
|
||||
"nix-store"
|
||||
"nix-store-c"
|
||||
"nix-util"
|
||||
"nix-util-c"
|
||||
];
|
||||
};
|
||||
|
||||
})
|
||||
@@ -1,7 +1,7 @@
|
||||
# Only execute this file once per shell.
|
||||
# This file is tested by tests/installer/default.nix.
|
||||
if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi
|
||||
__ETC_PROFILE_NIX_SOURCED=1
|
||||
export __ETC_PROFILE_NIX_SOURCED=1
|
||||
|
||||
NIX_LINK=$HOME/.nix-profile
|
||||
if [ -n "${XDG_STATE_HOME-}" ]; then
|
||||
|
||||
@@ -237,12 +237,13 @@ void StorePathCommand::run(ref<Store> store, StorePaths && storePaths)
|
||||
|
||||
MixProfile::MixProfile()
|
||||
{
|
||||
addFlag(
|
||||
{.longName = "profile",
|
||||
.description = "The profile to operate on.",
|
||||
.labels = {"path"},
|
||||
.handler = {&profile},
|
||||
.completer = completePath});
|
||||
addFlag({
|
||||
.longName = "profile",
|
||||
.description = "The profile to operate on.",
|
||||
.labels = {"path"},
|
||||
.handler = {&profile},
|
||||
.completer = completePath,
|
||||
});
|
||||
}
|
||||
|
||||
void MixProfile::updateProfile(const StorePath & storePath)
|
||||
|
||||
@@ -63,7 +63,7 @@ MixEvalArgs::MixEvalArgs()
|
||||
.description = "Pass the value *expr* as the argument *name* to Nix functions.",
|
||||
.category = category,
|
||||
.labels = {"name", "expr"},
|
||||
.handler = {[&](std::string name, std::string expr) { autoArgs.insert_or_assign(name, AutoArg{AutoArgExpr{expr}}); }}
|
||||
.handler = {[&](std::string name, std::string expr) { autoArgs.insert_or_assign(name, AutoArg{AutoArgExpr{expr}}); }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -80,7 +80,7 @@ MixEvalArgs::MixEvalArgs()
|
||||
.category = category,
|
||||
.labels = {"name", "path"},
|
||||
.handler = {[&](std::string name, std::string path) { autoArgs.insert_or_assign(name, AutoArg{AutoArgFile{path}}); }},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -105,7 +105,7 @@ MixEvalArgs::MixEvalArgs()
|
||||
.labels = {"path"},
|
||||
.handler = {[&](std::string s) {
|
||||
lookupPath.elements.emplace_back(LookupPath::Elem::parse(s));
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -131,7 +131,7 @@ MixEvalArgs::MixEvalArgs()
|
||||
}},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeRef(completions, openStore(), prefix);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
|
||||
+13
-13
@@ -64,21 +64,21 @@ MixFlakeOptions::MixFlakeOptions()
|
||||
.handler = {[&]() {
|
||||
lockFlags.recreateLockFile = true;
|
||||
warn("'--recreate-lock-file' is deprecated and will be removed in a future version; use 'nix flake update' instead.");
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "no-update-lock-file",
|
||||
.description = "Do not allow any updates to the flake's lock file.",
|
||||
.category = category,
|
||||
.handler = {&lockFlags.updateLockFile, false}
|
||||
.handler = {&lockFlags.updateLockFile, false},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "no-write-lock-file",
|
||||
.description = "Do not write the flake's newly generated lock file.",
|
||||
.category = category,
|
||||
.handler = {&lockFlags.writeLockFile, false}
|
||||
.handler = {&lockFlags.writeLockFile, false},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -94,14 +94,14 @@ MixFlakeOptions::MixFlakeOptions()
|
||||
.handler = {[&]() {
|
||||
lockFlags.useRegistries = false;
|
||||
warn("'--no-registries' is deprecated; use '--no-use-registries'");
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "commit-lock-file",
|
||||
.description = "Commit changes to the flake's lock file.",
|
||||
.category = category,
|
||||
.handler = {&lockFlags.commitLockFile, true}
|
||||
.handler = {&lockFlags.commitLockFile, true},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -121,7 +121,7 @@ MixFlakeOptions::MixFlakeOptions()
|
||||
}},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeInputAttrPath(completions, getEvalState(), getFlakeRefsForCompletion(), prefix);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -141,7 +141,7 @@ MixFlakeOptions::MixFlakeOptions()
|
||||
} else if (n == 1) {
|
||||
completeFlakeRef(completions, getEvalState()->store, prefix);
|
||||
}
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -152,7 +152,7 @@ MixFlakeOptions::MixFlakeOptions()
|
||||
.handler = {[&](std::string lockFilePath) {
|
||||
lockFlags.referenceLockFilePath = {getFSSourceAccessor(), CanonPath(absPath(lockFilePath))};
|
||||
}},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -163,7 +163,7 @@ MixFlakeOptions::MixFlakeOptions()
|
||||
.handler = {[&](std::string lockFilePath) {
|
||||
lockFlags.outputLockFilePath = lockFilePath;
|
||||
}},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -190,7 +190,7 @@ MixFlakeOptions::MixFlakeOptions()
|
||||
}},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeRef(completions, getEvalState()->store, prefix);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ SourceExprCommand::SourceExprCommand()
|
||||
.category = installablesCategory,
|
||||
.labels = {"file"},
|
||||
.handler = {&file},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -214,7 +214,7 @@ SourceExprCommand::SourceExprCommand()
|
||||
.description = "Interpret [*installables*](@docroot@/command-ref/new-cli/nix.md#installables) as attribute paths relative to the Nix expression *expr*.",
|
||||
.category = installablesCategory,
|
||||
.labels = {"expr"},
|
||||
.handler = {&expr}
|
||||
.handler = {&expr},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -834,7 +834,7 @@ RawInstallablesCommand::RawInstallablesCommand()
|
||||
addFlag({
|
||||
.longName = "stdin",
|
||||
.description = "Read installables from the standard input. No default installable applied.",
|
||||
.handler = {&readFromStdIn, true}
|
||||
.handler = {&readFromStdIn, true},
|
||||
});
|
||||
|
||||
expectArgs({
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ EvalState::EvalState(
|
||||
|
||||
/* Apply access control if needed. */
|
||||
if (settings.restrictEval || settings.pureEval)
|
||||
accessor = AllowListSourceAccessor::create(accessor, {},
|
||||
accessor = AllowListSourceAccessor::create(accessor, {}, {},
|
||||
[&settings](const CanonPath & path) -> RestrictedPathError {
|
||||
auto modeInformation = settings.pureEval
|
||||
? "in pure evaluation mode (use '--impure' to override)"
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
#include "fetch-to-store.hh"
|
||||
#include "fetchers.hh"
|
||||
#include "cache.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
fetchers::Cache::Key makeFetchToStoreCacheKey(
|
||||
const std::string &name,
|
||||
const std::string &fingerprint,
|
||||
ContentAddressMethod method,
|
||||
const std::string &path)
|
||||
{
|
||||
return fetchers::Cache::Key{"fetchToStore", {
|
||||
{"name", name},
|
||||
{"fingerprint", fingerprint},
|
||||
{"method", std::string{method.render()}},
|
||||
{"path", path}
|
||||
}};
|
||||
|
||||
}
|
||||
|
||||
StorePath fetchToStore(
|
||||
Store & store,
|
||||
const SourcePath & path,
|
||||
@@ -19,12 +33,7 @@ StorePath fetchToStore(
|
||||
std::optional<fetchers::Cache::Key> cacheKey;
|
||||
|
||||
if (!filter && path.accessor->fingerprint) {
|
||||
cacheKey = fetchers::Cache::Key{"fetchToStore", {
|
||||
{"name", std::string{name}},
|
||||
{"fingerprint", *path.accessor->fingerprint},
|
||||
{"method", std::string{method.render()}},
|
||||
{"path", path.path.abs()}
|
||||
}};
|
||||
cacheKey = makeFetchToStoreCacheKey(std::string{name}, *path.accessor->fingerprint, method, path.path.abs());
|
||||
if (auto res = fetchers::getCache()->lookupStorePath(*cacheKey, store)) {
|
||||
debug("store path cache hit for '%s'", path);
|
||||
return res->storePath;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "file-system.hh"
|
||||
#include "repair-flag.hh"
|
||||
#include "file-content-address.hh"
|
||||
#include "cache.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
@@ -22,4 +23,7 @@ StorePath fetchToStore(
|
||||
PathFilter * filter = nullptr,
|
||||
RepairFlag repair = NoRepair);
|
||||
|
||||
fetchers::Cache::Key makeFetchToStoreCacheKey(
|
||||
const std::string & name, const std::string & fingerprint, ContentAddressMethod method, const std::string & path);
|
||||
|
||||
}
|
||||
@@ -323,6 +323,8 @@ std::pair<ref<SourceAccessor>, Input> Input::getAccessorUnchecked(ref<Store> sto
|
||||
|
||||
accessor->fingerprint = getFingerprint(store);
|
||||
|
||||
accessor->setPathDisplay("«" + to_string() + "»");
|
||||
|
||||
return {accessor, *this};
|
||||
} catch (Error & e) {
|
||||
debug("substitution of input '%s' failed: %s", to_string(), e.what());
|
||||
|
||||
@@ -58,18 +58,23 @@ void FilteringSourceAccessor::checkAccess(const CanonPath & path)
|
||||
struct AllowListSourceAccessorImpl : AllowListSourceAccessor
|
||||
{
|
||||
std::set<CanonPath> allowedPrefixes;
|
||||
std::unordered_set<CanonPath> allowedPaths;
|
||||
|
||||
AllowListSourceAccessorImpl(
|
||||
ref<SourceAccessor> next,
|
||||
std::set<CanonPath> && allowedPrefixes,
|
||||
std::unordered_set<CanonPath> && allowedPaths,
|
||||
MakeNotAllowedError && makeNotAllowedError)
|
||||
: AllowListSourceAccessor(SourcePath(next), std::move(makeNotAllowedError))
|
||||
, allowedPrefixes(std::move(allowedPrefixes))
|
||||
, allowedPaths(std::move(allowedPaths))
|
||||
{ }
|
||||
|
||||
bool isAllowed(const CanonPath & path) override
|
||||
{
|
||||
return path.isAllowed(allowedPrefixes);
|
||||
return
|
||||
allowedPaths.contains(path)
|
||||
|| path.isAllowed(allowedPrefixes);
|
||||
}
|
||||
|
||||
void allowPrefix(CanonPath prefix) override
|
||||
@@ -81,9 +86,14 @@ struct AllowListSourceAccessorImpl : AllowListSourceAccessor
|
||||
ref<AllowListSourceAccessor> AllowListSourceAccessor::create(
|
||||
ref<SourceAccessor> next,
|
||||
std::set<CanonPath> && allowedPrefixes,
|
||||
std::unordered_set<CanonPath> && allowedPaths,
|
||||
MakeNotAllowedError && makeNotAllowedError)
|
||||
{
|
||||
return make_ref<AllowListSourceAccessorImpl>(next, std::move(allowedPrefixes), std::move(makeNotAllowedError));
|
||||
return make_ref<AllowListSourceAccessorImpl>(
|
||||
next,
|
||||
std::move(allowedPrefixes),
|
||||
std::move(allowedPaths),
|
||||
std::move(makeNotAllowedError));
|
||||
}
|
||||
|
||||
bool CachingFilteringSourceAccessor::isAllowed(const CanonPath & path)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "source-path.hh"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
namespace nix {
|
||||
|
||||
/**
|
||||
@@ -70,6 +72,7 @@ struct AllowListSourceAccessor : public FilteringSourceAccessor
|
||||
static ref<AllowListSourceAccessor> create(
|
||||
ref<SourceAccessor> next,
|
||||
std::set<CanonPath> && allowedPrefixes,
|
||||
std::unordered_set<CanonPath> && allowedPaths,
|
||||
MakeNotAllowedError && makeNotAllowedError);
|
||||
|
||||
using FilteringSourceAccessor::FilteringSourceAccessor;
|
||||
|
||||
@@ -44,10 +44,11 @@ static void downloadToSink(
|
||||
|
||||
static std::string getLfsApiToken(const ParsedURL & url)
|
||||
{
|
||||
auto [status, output] = runProgram(RunOptions{
|
||||
.program = "ssh",
|
||||
.args = {*url.authority, "git-lfs-authenticate", url.path, "download"},
|
||||
});
|
||||
auto [status, output] = runProgram(
|
||||
RunOptions{
|
||||
.program = "ssh",
|
||||
.args = {*url.authority, "git-lfs-authenticate", url.path, "download"},
|
||||
});
|
||||
|
||||
if (output.empty())
|
||||
throw Error(
|
||||
|
||||
@@ -1215,16 +1215,12 @@ ref<SourceAccessor> GitRepoImpl::getAccessor(
|
||||
ref<SourceAccessor> GitRepoImpl::getAccessor(const WorkdirInfo & wd, bool exportIgnore, MakeNotAllowedError makeNotAllowedError)
|
||||
{
|
||||
auto self = ref<GitRepoImpl>(shared_from_this());
|
||||
/* In case of an empty workdir, return an empty in-memory tree. We
|
||||
cannot use AllowListSourceAccessor because it would return an
|
||||
error for the root (and we can't add the root to the allow-list
|
||||
since that would allow access to all its children). */
|
||||
ref<SourceAccessor> fileAccessor =
|
||||
wd.files.empty()
|
||||
? makeEmptySourceAccessor()
|
||||
: AllowListSourceAccessor::create(
|
||||
AllowListSourceAccessor::create(
|
||||
makeFSSourceAccessor(path),
|
||||
std::set<CanonPath> { wd.files },
|
||||
std::set<CanonPath>{ wd.files },
|
||||
// Always allow access to the root, but not its children.
|
||||
std::unordered_set<CanonPath>{CanonPath::root},
|
||||
std::move(makeNotAllowedError)).cast<SourceAccessor>();
|
||||
if (exportIgnore)
|
||||
return make_ref<GitExportIgnoreSourceAccessor>(self, fileAccessor, std::nullopt);
|
||||
|
||||
+13
-7
@@ -532,14 +532,20 @@ struct GitInputScheme : InputScheme
|
||||
return *head;
|
||||
}
|
||||
|
||||
static MakeNotAllowedError makeNotAllowedError(std::string url)
|
||||
static MakeNotAllowedError makeNotAllowedError(std::filesystem::path repoPath)
|
||||
{
|
||||
return [url{std::move(url)}](const CanonPath & path) -> RestrictedPathError
|
||||
{
|
||||
if (nix::pathExists(path.abs()))
|
||||
return RestrictedPathError("access to path '%s' is forbidden because it is not under Git control; maybe you should 'git add' it to the repository '%s'?", path, url);
|
||||
return [repoPath{std::move(repoPath)}](const CanonPath & path) -> RestrictedPathError {
|
||||
if (nix::pathExists(repoPath / path.rel()))
|
||||
return RestrictedPathError(
|
||||
"Path '%1%' in the repository %2% is not tracked by Git.\n"
|
||||
"\n"
|
||||
"To make it visible to Nix, run:\n"
|
||||
"\n"
|
||||
"git -C %2% add \"%1%\"",
|
||||
path.rel(),
|
||||
repoPath);
|
||||
else
|
||||
return RestrictedPathError("path '%s' does not exist in Git repository '%s'", path, url);
|
||||
return RestrictedPathError("Path '%s' does not exist in Git repository %s.", path.rel(), repoPath);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -747,7 +753,7 @@ struct GitInputScheme : InputScheme
|
||||
ref<SourceAccessor> accessor =
|
||||
repo->getAccessor(repoInfo.workdirInfo,
|
||||
exportIgnore,
|
||||
makeNotAllowedError(repoInfo.locationToArg()));
|
||||
makeNotAllowedError(repoPath));
|
||||
|
||||
/* If the repo has submodules, return a mounted input accessor
|
||||
consisting of the accessor for the top-level repo and the
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#include "store-api.hh"
|
||||
#include "archive.hh"
|
||||
#include "store-path-accessor.hh"
|
||||
#include "store-path-accessor.hh"
|
||||
#include "cache.hh"
|
||||
#include "fetch-to-store.hh"
|
||||
|
||||
namespace nix::fetchers {
|
||||
|
||||
@@ -142,6 +145,14 @@ struct PathInputScheme : InputScheme
|
||||
storePath = store->addToStoreFromDump(*src, "source");
|
||||
}
|
||||
|
||||
// To avoid copying the path again to the /nix/store, we need to add a cache entry.
|
||||
ContentAddressMethod method = ContentAddressMethod::Raw::NixArchive;
|
||||
auto fp = getFingerprint(store, input);
|
||||
if (fp) {
|
||||
auto cacheKey = makeFetchToStoreCacheKey(input.getName(), *fp, method, "/");
|
||||
fetchers::getCache()->upsert(cacheKey, *store, {}, *storePath);
|
||||
}
|
||||
|
||||
/* Trust the lastModified value supplied by the user, if
|
||||
any. It's not a "secure" attribute so we don't care. */
|
||||
if (!input.getLastModified())
|
||||
|
||||
@@ -39,7 +39,7 @@ FlakeRef FlakeRef::resolve(
|
||||
ref<Store> store,
|
||||
const fetchers::RegistryFilter & filter) const
|
||||
{
|
||||
auto [input2, extraAttrs] = lookupInRegistries(store, input);
|
||||
auto [input2, extraAttrs] = lookupInRegistries(store, input, filter);
|
||||
return FlakeRef(std::move(input2), fetchers::maybeGetStrAttr(extraAttrs, "dir").value_or(subdir));
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ MixCommonArgs::MixCommonArgs(const std::string & programName)
|
||||
if (hasPrefix(s.first, prefix))
|
||||
completions.add(s.first, fmt("Set the `%s` setting.", s.first));
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -75,7 +75,7 @@ MixCommonArgs::MixCommonArgs(const std::string & programName)
|
||||
.labels = Strings{"jobs"},
|
||||
.handler = {[=](std::string s) {
|
||||
settings.set("max-jobs", s);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
std::string cat = "Options to override configuration settings";
|
||||
|
||||
@@ -228,7 +228,7 @@ LegacyArgs::LegacyArgs(const std::string & programName,
|
||||
.handler = {[=](std::string s) {
|
||||
auto n = string2IntWithUnitPrefix<uint64_t>(s);
|
||||
settings.set(dest, std::to_string(n));
|
||||
}}
|
||||
}},
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#include "nix/tests/outputs-spec.hh"
|
||||
|
||||
#include <rapidcheck.h>
|
||||
|
||||
namespace rc {
|
||||
using namespace nix;
|
||||
|
||||
Gen<OutputsSpec> Arbitrary<OutputsSpec>::arbitrary()
|
||||
{
|
||||
return gen::mapcat(
|
||||
gen::inRange<uint8_t>(0, std::variant_size_v<OutputsSpec::Raw>), [](uint8_t n) -> Gen<OutputsSpec> {
|
||||
switch (n) {
|
||||
case 0:
|
||||
return gen::just((OutputsSpec) OutputsSpec::All{});
|
||||
case 1:
|
||||
return gen::map(
|
||||
gen::nonEmpty(
|
||||
gen::container<StringSet>(
|
||||
gen::map(gen::arbitrary<StorePathName>(), [](StorePathName n) { return n.name; }))),
|
||||
[](StringSet names) { return (OutputsSpec) OutputsSpec::Names{names}; });
|
||||
default:
|
||||
assert(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1025,6 +1025,7 @@ void processConnection(
|
||||
{
|
||||
#ifndef _WIN32 // TODO need graceful async exit support on Windows?
|
||||
auto monitor = !recursive ? std::make_unique<MonitorFdHup>(from.fd) : nullptr;
|
||||
(void) monitor; // suppress warning
|
||||
#endif
|
||||
|
||||
/* Exchange the greeting. */
|
||||
|
||||
@@ -278,21 +278,21 @@ template<> void BaseSetting<SandboxMode>::convertToArg(Args & args, const std::s
|
||||
.aliases = aliases,
|
||||
.description = "Enable sandboxing.",
|
||||
.category = category,
|
||||
.handler = {[this]() { override(smEnabled); }}
|
||||
.handler = {[this]() { override(smEnabled); }},
|
||||
});
|
||||
args.addFlag({
|
||||
.longName = "no-" + name,
|
||||
.aliases = aliases,
|
||||
.description = "Disable sandboxing.",
|
||||
.category = category,
|
||||
.handler = {[this]() { override(smDisabled); }}
|
||||
.handler = {[this]() { override(smDisabled); }},
|
||||
});
|
||||
args.addFlag({
|
||||
.longName = "relaxed-" + name,
|
||||
.aliases = aliases,
|
||||
.description = "Enable sandboxing, but allow builds to disable it.",
|
||||
.category = category,
|
||||
.handler = {[this]() { override(smRelaxed); }}
|
||||
.handler = {[this]() { override(smRelaxed); }},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ LocalStore::LocalStore(
|
||||
else if (curSchema == 0) { /* new store */
|
||||
curSchema = nixSchemaVersion;
|
||||
openDB(*state, true);
|
||||
writeFile(schemaPath, fmt("%1%", nixSchemaVersion), 0666, true);
|
||||
writeFile(schemaPath, fmt("%1%", curSchema), 0666, true);
|
||||
}
|
||||
|
||||
else if (curSchema < nixSchemaVersion) {
|
||||
|
||||
@@ -29,7 +29,17 @@
|
||||
|
||||
namespace nix {
|
||||
|
||||
namespace fs { using namespace std::filesystem; }
|
||||
namespace fs {
|
||||
using namespace std::filesystem;
|
||||
|
||||
bool symlink_exists(const std::filesystem::path & path) {
|
||||
try {
|
||||
return std::filesystem::exists(std::filesystem::symlink_status(path));
|
||||
} catch (const std::filesystem::filesystem_error & e) {
|
||||
throw SysError("cannot check existence of %1%", path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isAbsolute(PathView path)
|
||||
{
|
||||
|
||||
@@ -134,6 +134,7 @@ bool pathExists(const Path & path);
|
||||
namespace fs {
|
||||
|
||||
/**
|
||||
* TODO: we may actually want to use pathExists instead of this function
|
||||
* ```
|
||||
* symlink_exists(p) = std::filesystem::exists(std::filesystem::symlink_status(p))
|
||||
* ```
|
||||
@@ -142,9 +143,7 @@ namespace fs {
|
||||
* std::filesystem::exists(p) = std::filesystem::exists(std::filesystem::status(p))
|
||||
* ```
|
||||
*/
|
||||
inline bool symlink_exists(const std::filesystem::path & path) {
|
||||
return std::filesystem::exists(std::filesystem::symlink_status(path));
|
||||
}
|
||||
bool symlink_exists(const std::filesystem::path & path);
|
||||
|
||||
} // namespace fs
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ std::optional<Mode> decodeMode(RawMode m) {
|
||||
static std::string getStringUntil(Source & source, char byte)
|
||||
{
|
||||
std::string s;
|
||||
char n[1];
|
||||
char n[1] = { 0 };
|
||||
source(std::string_view { n, 1 });
|
||||
while (*n != byte) {
|
||||
s += *n;
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
|
||||
.description = "Use *path* as prefix for the symlinks to the build results. It defaults to `result`.",
|
||||
.labels = {"path"},
|
||||
.handler = {&outLink},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
|
||||
addFlag({
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ struct CmdBundle : InstallableValueCommand
|
||||
.handler = {&bundler},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeRef(completions, getStore(), prefix);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -33,7 +33,7 @@ struct CmdBundle : InstallableValueCommand
|
||||
.description = "Override the name of the symlink to the build result. It defaults to the base name of the app.",
|
||||
.labels = {"path"},
|
||||
.handler = {&outLink},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ struct CmdCopy : virtual CopyCommand, virtual BuiltPathsCommand, MixProfile
|
||||
.description = "Create symlinks prefixed with *path* to the top-level store paths fetched from the source store.",
|
||||
.labels = {"path"},
|
||||
.handler = {&outLink},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
|
||||
addFlag({
|
||||
|
||||
@@ -21,7 +21,7 @@ struct CmdShowDerivation : InstallablesCommand
|
||||
.longName = "recursive",
|
||||
.shortName = 'r',
|
||||
.description = "Include the dependencies of the specified derivations.",
|
||||
.handler = {&recursive, true}
|
||||
.handler = {&recursive, true},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -334,7 +334,7 @@ struct Common : InstallableCommand, MixProfile
|
||||
.labels = {"installable", "outputs-dir"},
|
||||
.handler = {[&](std::string installable, std::string outputsDir) {
|
||||
redirects.push_back({installable, outputsDir});
|
||||
}}
|
||||
}},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -524,7 +524,7 @@ struct CmdDevelop : Common, MixEnvironment
|
||||
.handler = {[&](std::vector<std::string> ss) {
|
||||
if (ss.empty()) throw UsageError("--command requires at least one argument");
|
||||
command = ss;
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
|
||||
+11
-10
@@ -38,16 +38,17 @@ struct CmdShell : InstallablesCommand, MixEnvironment
|
||||
|
||||
CmdShell()
|
||||
{
|
||||
addFlag(
|
||||
{.longName = "command",
|
||||
.shortName = 'c',
|
||||
.description = "Command and arguments to be executed, defaulting to `$SHELL`",
|
||||
.labels = {"command", "args"},
|
||||
.handler = {[&](std::vector<std::string> ss) {
|
||||
if (ss.empty())
|
||||
throw UsageError("--command requires at least one argument");
|
||||
command = ss;
|
||||
}}});
|
||||
addFlag({
|
||||
.longName = "command",
|
||||
.shortName = 'c',
|
||||
.description = "Command and arguments to be executed, defaulting to `$SHELL`",
|
||||
.labels = {"command", "args"},
|
||||
.handler = {[&](std::vector<std::string> ss) {
|
||||
if (ss.empty())
|
||||
throw UsageError("--command requires at least one argument");
|
||||
command = ss;
|
||||
}},
|
||||
});
|
||||
}
|
||||
|
||||
std::string description() override
|
||||
|
||||
+10
-10
@@ -90,7 +90,7 @@ public:
|
||||
.handler={&flakeUrl},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeRef(completions, getStore(), prefix);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
expectArgs({
|
||||
.label="inputs",
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
}},
|
||||
.completer = {[&](AddCompletions & completions, size_t, std::string_view prefix) {
|
||||
completeFlakeInputAttrPath(completions, getEvalState(), getFlakeRefsForCompletion(), prefix);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
/* Remove flags that don't make sense. */
|
||||
@@ -336,12 +336,12 @@ struct CmdFlakeCheck : FlakeCommand
|
||||
addFlag({
|
||||
.longName = "no-build",
|
||||
.description = "Do not build checks.",
|
||||
.handler = {&build, false}
|
||||
.handler = {&build, false},
|
||||
});
|
||||
addFlag({
|
||||
.longName = "all-systems",
|
||||
.description = "Check the outputs for all systems.",
|
||||
.handler = {&checkAllSystems, true}
|
||||
.handler = {&checkAllSystems, true},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -874,7 +874,7 @@ struct CmdFlakeInitCommon : virtual Args, EvalCommand
|
||||
defaultTemplateAttrPathsPrefixes,
|
||||
defaultTemplateAttrPaths,
|
||||
prefix);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1034,7 +1034,7 @@ struct CmdFlakeClone : FlakeCommand
|
||||
.shortName = 'f',
|
||||
.description = "Clone the flake to path *dest*.",
|
||||
.labels = {"path"},
|
||||
.handler = {&destDir}
|
||||
.handler = {&destDir},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1057,7 +1057,7 @@ struct CmdFlakeArchive : FlakeCommand, MixJSON, MixDryRun
|
||||
.longName = "to",
|
||||
.description = "URI of the destination Nix store",
|
||||
.labels = {"store-uri"},
|
||||
.handler = {&dstUri}
|
||||
.handler = {&dstUri},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1137,12 +1137,12 @@ struct CmdFlakeShow : FlakeCommand, MixJSON
|
||||
addFlag({
|
||||
.longName = "legacy",
|
||||
.description = "Show the contents of the `legacyPackages` output.",
|
||||
.handler = {&showLegacy, true}
|
||||
.handler = {&showLegacy, true},
|
||||
});
|
||||
addFlag({
|
||||
.longName = "all-systems",
|
||||
.description = "Show the contents of outputs for all systems.",
|
||||
.handler = {&showAllSystems, true}
|
||||
.handler = {&showAllSystems, true},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ struct CmdFlakePrefetch : FlakeCommand, MixJSON
|
||||
.description = "Create symlink named *path* to the resulting store path.",
|
||||
.labels = {"path"},
|
||||
.handler = {&outLink},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -274,7 +274,7 @@ struct CmdStorePrefetchFile : StoreCommand, MixJSON
|
||||
.longName = "name",
|
||||
.description = "Override the name component of the resulting store path. It defaults to the base name of *url*.",
|
||||
.labels = {"name"},
|
||||
.handler = {&name}
|
||||
.handler = {&name},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -283,7 +283,7 @@ struct CmdStorePrefetchFile : StoreCommand, MixJSON
|
||||
.labels = {"hash"},
|
||||
.handler = {[&](std::string s) {
|
||||
expectedHash = Hash::parseAny(s, hashAlgo);
|
||||
}}
|
||||
}},
|
||||
});
|
||||
|
||||
addFlag(flag::hashAlgo("hash-type", &hashAlgo));
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ struct CmdSign : StorePathsCommand
|
||||
.description = "File containing the secret signing key.",
|
||||
.labels = {"file"},
|
||||
.handler = {&secretKeyFile},
|
||||
.completer = completePath
|
||||
.completer = completePath,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ struct CmdStoreDelete : StorePathsCommand
|
||||
addFlag({
|
||||
.longName = "ignore-liveness",
|
||||
.description = "Do not check whether the paths are reachable from a root.",
|
||||
.handler = {&options.ignoreLiveness, true}
|
||||
.handler = {&options.ignoreLiveness, true},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ struct CmdStoreGC : StoreCommand, MixDryRun
|
||||
.longName = "max",
|
||||
.description = "Stop after freeing *n* bytes of disk space.",
|
||||
.labels = {"n"},
|
||||
.handler = {&options.maxFreed}
|
||||
.handler = {&options.maxFreed},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@ struct CmdUpgradeNix : MixDryRun, StoreCommand
|
||||
.shortName = 'p',
|
||||
.description = "The path to the Nix profile to upgrade.",
|
||||
.labels = {"profile-dir"},
|
||||
.handler = {&profileDir}
|
||||
.handler = {&profileDir},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
.longName = "nix-store-paths-url",
|
||||
.description = "The URL of the file that contains the store paths of the latest Nix release.",
|
||||
.labels = {"url"},
|
||||
.handler = {&(std::string&) settings.upgradeNixStorePathUrl}
|
||||
.handler = {&(std::string&) settings.upgradeNixStorePathUrl},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ struct CmdVerify : StorePathsCommand
|
||||
.shortName = 's',
|
||||
.description = "Use signatures from the specified store.",
|
||||
.labels = {"store-uri"},
|
||||
.handler = {[&](std::string s) { substituterUris.push_back(s); }}
|
||||
.handler = {[&](std::string s) { substituterUris.push_back(s); }},
|
||||
});
|
||||
|
||||
addFlag({
|
||||
@@ -45,7 +45,7 @@ struct CmdVerify : StorePathsCommand
|
||||
.shortName = 'n',
|
||||
.description = "Require that each path is signed by at least *n* different keys.",
|
||||
.labels = {"n"},
|
||||
.handler = {&sigsNeeded}
|
||||
.handler = {&sigsNeeded},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ perl.pkgs.toPerlModule (
|
||||
./meson.build
|
||||
./meson.options
|
||||
]
|
||||
++ lib.optionals finalAttrs.doCheck [
|
||||
++ lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
./.yath.rc.in
|
||||
./t
|
||||
]
|
||||
@@ -70,7 +70,7 @@ 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.doCheck)
|
||||
(lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
mesonCheckFlags = [
|
||||
|
||||
@@ -220,6 +220,13 @@ nix store gc
|
||||
nix registry list --flake-registry "file://$registry" --refresh | grepQuiet flake3
|
||||
mv "$registry.tmp" "$registry"
|
||||
|
||||
# Ensure that locking ignores the user registry.
|
||||
mkdir -p "$TEST_HOME/.config/nix"
|
||||
ln -sfn "$registry" "$TEST_HOME/.config/nix/registry.json"
|
||||
nix flake metadata flake1
|
||||
expectStderr 1 nix flake update --flake-registry '' --flake "$flake3Dir" | grepQuiet "cannot find flake 'flake:flake1' in the flake registries"
|
||||
rm "$TEST_HOME/.config/nix/registry.json"
|
||||
|
||||
# Test whether flakes are registered as GC roots for offline use.
|
||||
# FIXME: use tarballs rather than git.
|
||||
rm -rf "$TEST_HOME/.cache"
|
||||
|
||||
@@ -29,7 +29,8 @@ suites += {
|
||||
'non-flake-inputs.sh',
|
||||
'relative-paths.sh',
|
||||
'symlink-paths.sh',
|
||||
'debugger.sh'
|
||||
'debugger.sh',
|
||||
'source-paths.sh',
|
||||
],
|
||||
'workdir': meson.current_source_dir(),
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source ./common.sh
|
||||
|
||||
requireGit
|
||||
|
||||
repo=$TEST_ROOT/repo
|
||||
|
||||
createGitRepo "$repo"
|
||||
|
||||
cat > "$repo/flake.nix" <<EOF
|
||||
{
|
||||
outputs = { ... }: {
|
||||
x = 1;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
expectStderr 1 nix eval "$repo#x" | grepQuiet "error: Path 'flake.nix' in the repository \"$repo\" is not tracked by Git."
|
||||
|
||||
git -C "$repo" add flake.nix
|
||||
|
||||
[[ $(nix eval "$repo#x") = 1 ]]
|
||||
@@ -158,15 +158,32 @@ foo + baz
|
||||
# - Modify the flake
|
||||
# - Re-eval it
|
||||
# - Check that the result has changed
|
||||
replResult=$( (
|
||||
echo "changingThing"
|
||||
sleep 1 # Leave the repl the time to eval 'foo'
|
||||
mkfifo repl_fifo
|
||||
nix repl ./flake --experimental-features 'flakes' < repl_fifo > repl_output 2>&1 &
|
||||
repl_pid=$!
|
||||
exec 3>repl_fifo # Open fifo for writing
|
||||
echo "changingThing" >&3
|
||||
for i in $(seq 1 1000); do
|
||||
if grep -q "beforeChange" repl_output; then
|
||||
break
|
||||
fi
|
||||
cat repl_output
|
||||
sleep 0.1
|
||||
done
|
||||
if [[ "$i" -eq 100 ]]; then
|
||||
echo "Timed out waiting for beforeChange"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i 's/beforeChange/afterChange/' flake/flake.nix
|
||||
echo ":reload"
|
||||
echo "changingThing"
|
||||
) | nix repl ./flake --experimental-features 'flakes')
|
||||
echo "$replResult" | grepQuiet -s beforeChange
|
||||
echo "$replResult" | grepQuiet -s afterChange
|
||||
|
||||
# Send reload and second command
|
||||
echo ":reload" >&3
|
||||
echo "changingThing" >&3
|
||||
echo "exit" >&3
|
||||
exec 3>&- # Close fifo
|
||||
wait $repl_pid # Wait for process to finish
|
||||
grep -q "afterChange" repl_output
|
||||
|
||||
# Test recursive printing and formatting
|
||||
# Normal output should print attributes in lexicographical order non-recursively
|
||||
|
||||
@@ -19,7 +19,7 @@ int main(int argc, char **argv) {
|
||||
struct sockaddr_un data;
|
||||
data.sun_family = AF_UNIX;
|
||||
data.sun_path[0] = 0;
|
||||
strcpy(data.sun_path + 1, argv[1]);
|
||||
strncpy(data.sun_path + 1, argv[1], sizeof(data.sun_path) - 2);
|
||||
|
||||
// Now try to connect, To ensure we work no matter what order we are
|
||||
// executed in, just busyloop here.
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
client.succeed("chmod 600 /root/.ssh/id_ed25519")
|
||||
|
||||
# Install the SSH key on the builders.
|
||||
client.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
remote.succeed("mkdir -p -m 700 /root/.ssh")
|
||||
remote.copy_from_host("key.pub", "/root/.ssh/authorized_keys")
|
||||
remote.wait_for_unit("sshd")
|
||||
remote.wait_for_unit("multi-user.target")
|
||||
remote.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-online.target")
|
||||
remote.wait_for_unit("network-addresses-eth1.service")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
client.succeed(f"ssh -o StrictHostKeyChecking=no {remote.name} 'echo hello world'")
|
||||
|
||||
remote.succeed("""
|
||||
|
||||
@@ -187,9 +187,9 @@ in
|
||||
github.succeed("cat /var/log/httpd/*.log >&2")
|
||||
|
||||
github.wait_for_unit("httpd.service")
|
||||
github.wait_for_unit("network-online.target")
|
||||
github.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
client.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
client.succeed("curl -v https://github.com/ >&2")
|
||||
out = client.succeed("nix registry list")
|
||||
print(out)
|
||||
|
||||
@@ -70,9 +70,9 @@ in
|
||||
server.copy_from_host("key.pub", "/root/.ssh/authorized_keys")
|
||||
server.wait_for_unit("sshd")
|
||||
server.wait_for_unit("multi-user.target")
|
||||
server.wait_for_unit("network-online.target")
|
||||
server.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
client.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
client.succeed(f"ssh -o StrictHostKeyChecking=no {server.name} 'echo hello world'")
|
||||
|
||||
# Copy the closure of package A from the client to the server.
|
||||
|
||||
@@ -79,9 +79,9 @@ in
|
||||
|
||||
server.wait_for_unit("sshd")
|
||||
server.wait_for_unit("multi-user.target")
|
||||
server.wait_for_unit("network-online.target")
|
||||
server.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
client.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
client.wait_for_unit("getty@tty1.service")
|
||||
# Either the prompt: ]#
|
||||
# or an OCR misreading of it: 1#
|
||||
|
||||
@@ -61,7 +61,7 @@ in
|
||||
{ nodes }:
|
||||
''
|
||||
cache.wait_for_unit("harmonia.service")
|
||||
cache.wait_for_unit("network-online.target")
|
||||
cache.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
machine.succeed("mkdir -p /etc/containers")
|
||||
machine.succeed("""echo '{"default":[{"type":"insecureAcceptAnything"}]}' > /etc/containers/policy.json""")
|
||||
|
||||
@@ -145,7 +145,7 @@ in
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
''
|
||||
http_dns.wait_for_unit("network-online.target")
|
||||
http_dns.wait_for_unit("network-addresses-eth1.service")
|
||||
http_dns.wait_for_unit("nginx")
|
||||
http_dns.wait_for_open_port(80)
|
||||
http_dns.wait_for_unit("unbound")
|
||||
@@ -153,7 +153,7 @@ in
|
||||
|
||||
client.start()
|
||||
client.wait_for_unit('multi-user.target')
|
||||
client.wait_for_unit('network-online.target')
|
||||
client.wait_for_unit('network-addresses-eth1.service')
|
||||
|
||||
with subtest("can fetch data from a remote server outside sandbox"):
|
||||
client.succeed("nix --version >&2")
|
||||
|
||||
@@ -102,12 +102,12 @@ in
|
||||
client.succeed("chmod 600 /root/.ssh/id_ed25519")
|
||||
|
||||
# Install the SSH key on the builder.
|
||||
client.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
builder.succeed("mkdir -p -m 700 /root/.ssh")
|
||||
builder.copy_from_host("key.pub", "/root/.ssh/authorized_keys")
|
||||
builder.wait_for_unit("sshd")
|
||||
builder.wait_for_unit("multi-user.target")
|
||||
builder.wait_for_unit("network-online.target")
|
||||
builder.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
client.succeed(f"ssh -o StrictHostKeyChecking=no {builder.name} 'echo hello world'")
|
||||
|
||||
|
||||
@@ -123,12 +123,12 @@ in
|
||||
client.succeed("chmod 600 /root/.ssh/id_ed25519")
|
||||
|
||||
# Install the SSH key on the builders.
|
||||
client.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
for builder in [builder1, builder2]:
|
||||
builder.succeed("mkdir -p -m 700 /root/.ssh")
|
||||
builder.copy_from_host("key.pub", "/root/.ssh/authorized_keys")
|
||||
builder.wait_for_unit("sshd")
|
||||
builder.wait_for_unit("network-online.target")
|
||||
builder.wait_for_unit("network-addresses-eth1.service")
|
||||
# Make sure the builder can handle our login correctly
|
||||
builder.wait_for_unit("multi-user.target")
|
||||
# Make sure there's no funny business on the client either
|
||||
|
||||
@@ -67,14 +67,14 @@ in
|
||||
|
||||
# Create a binary cache.
|
||||
server.wait_for_unit("minio")
|
||||
server.wait_for_unit("network-online.target")
|
||||
server.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
server.succeed("mc config host add minio http://localhost:9000 ${accessKey} ${secretKey} --api s3v4")
|
||||
server.succeed("mc mb minio/my-cache")
|
||||
|
||||
server.succeed("${env} nix copy --to '${storeUrl}' ${pkgA}")
|
||||
|
||||
client.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
# Test fetchurl on s3:// URLs while we're at it.
|
||||
client.succeed("${env} nix eval --impure --expr 'builtins.fetchurl { name = \"foo\"; url = \"s3://my-cache/nix-cache-info?endpoint=http://server:9000®ion=eu-west-1\"; }'")
|
||||
|
||||
@@ -139,8 +139,8 @@ in
|
||||
start_all()
|
||||
|
||||
sourcehut.wait_for_unit("httpd.service")
|
||||
sourcehut.wait_for_unit("network-online.target")
|
||||
client.wait_for_unit("network-online.target")
|
||||
sourcehut.wait_for_unit("network-addresses-eth1.service")
|
||||
client.wait_for_unit("network-addresses-eth1.service")
|
||||
|
||||
client.succeed("curl -v https://git.sr.ht/ >&2")
|
||||
client.succeed("nix registry list | grep nixpkgs")
|
||||
|
||||
Reference in new issue
Block a user