Skip to content
Merged
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
8 changes: 4 additions & 4 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 = "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";
Expand Down
9 changes: 5 additions & 4 deletions src/libfetchers/git-lfs-fetch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 3 additions & 2 deletions src/libstore-test-support/outputs-spec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Gen<OutputsSpec> Arbitrary<OutputsSpec>::arbitrary()
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; }))),
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);
Expand Down
6 changes: 3 additions & 3 deletions tests/nixos/git-submodules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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("""
Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/github-flakes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/nix-copy-closure.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/nix-copy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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#
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/nix-docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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""")
Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/nss-preload.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ 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")
http_dns.wait_for_open_port(53)

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")
Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/remote-builds-ssh-ng.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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'")

Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/remote-builds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/s3-binary-cache-store.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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&region=eu-west-1\"; }'")
Expand Down
4 changes: 2 additions & 2 deletions tests/nixos/sourcehut-flakes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading