Skip to content

Commit

Permalink
Add hydraJobs.tests.nix-serve
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Sep 18, 2024
1 parent cf5592c commit 6275529
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@

nix = final.nixComponents.nix;

nix-serve =
prev.nix-serve.override {
# undo potential version pinning
nix = final.nix;
};

# See https://github.com/NixOS/nixpkgs/pull/214409
# Remove when fixed in this flake's nixpkgs
pre-commit =
Expand Down
5 changes: 5 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
, mdbook
, mdbook-linkcheck
, mercurial
, nix-perl-bindings
, openssh
, openssl
, pkg-config
Expand Down Expand Up @@ -334,6 +335,10 @@ in {

hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";

passthru = lib.optionals (stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
perl-bindings = nix-perl-bindings;
};

meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows;
mainProgram = "nix";
Expand Down
3 changes: 3 additions & 0 deletions packaging/everything.nix
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,8 @@
nix-main-c
;
};
}
// lib.optionals (stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
perl-bindings = nix-perl-bindings;
};
})
7 changes: 7 additions & 0 deletions tests/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,10 @@ in

cgroups = runNixOSTestFor "x86_64-linux" ./cgroups;
}
// (let
inherit (nixpkgsFor."x86_64-linux".native) nixosTests;
in {
nix-serve =
assert nixosTests.nix-serve.config.nodes.machine.services.nix-serve.package.nix == self.packages.x86_64-linux.nix;
nixosTests.nix-serve;
})

0 comments on commit 6275529

Please sign in to comment.