Skip to content

Commit

Permalink
test: use nixpkgs-unstable flake input for nix-bitcoin pkgs
Browse files Browse the repository at this point in the history
By using the `default` flake module for tests, `pkgsUnstable` in
`pkgs/default.nix` gets passed the `nixpkgs-unstable` flake input
instead of falling back to importing `nixpkgsPinned.nixpkgs-unstable`.

For some use cases this prevents importing `nixpkgs-unstable` twice
(once for the `nixpkgs-unstable` flake input, once via
`import nixpkgsPinned.nixpkgs-unstable`).
  • Loading branch information
erikarvstedt committed Jan 15, 2024
1 parent 88c2a1c commit 91ac468
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# "armv7l-linux"
];

test = import ./test/tests.nix nixpkgs.lib;
test = import ./test/tests.nix nixpkgs.lib self.nixosModules.default;
in {
lib = {
mkNbPkgs = {
Expand Down
4 changes: 2 additions & 2 deletions test/tests.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Integration tests, can be run without internet access.

lib:
lib: nixBitcoinModule:
let
# Included in all scenarios
baseConfig = { config, pkgs, ... }: with lib; let
Expand All @@ -9,7 +9,7 @@ let
in {
imports = [
./lib/test-lib.nix
../modules/modules.nix
nixBitcoinModule
{
# Features required by the Python test suite
nix-bitcoin.secretsDir = "/secrets";
Expand Down

0 comments on commit 91ac468

Please sign in to comment.