mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-09 03:56:05 +01:00
tests: move pkgsForTests definition to tests/default.nix
This commit is contained in:
parent
a04b93fa7b
commit
dac1623067
2 changed files with 11 additions and 8 deletions
|
|
@ -7,7 +7,15 @@
|
||||||
system ? pkgs.stdenv.hostPlatform.system,
|
system ? pkgs.stdenv.hostPlatform.system,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
autoArgs = pkgs // {
|
|
||||||
|
# Use a single common instance of nixpkgs, with allowUnfree
|
||||||
|
# Having a single shared instance should speed up tests a little
|
||||||
|
pkgsForTest = import self.inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
autoArgs = pkgsForTest // {
|
||||||
inherit
|
inherit
|
||||||
helpers
|
helpers
|
||||||
self
|
self
|
||||||
|
|
@ -25,6 +33,7 @@ let
|
||||||
;
|
;
|
||||||
# Recursive:
|
# Recursive:
|
||||||
inherit callTest callTests;
|
inherit callTest callTests;
|
||||||
|
inherit pkgsForTest;
|
||||||
};
|
};
|
||||||
|
|
||||||
callTest = lib.callPackageWith autoArgs;
|
callTest = lib.callPackageWith autoArgs;
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
self,
|
||||||
system,
|
system,
|
||||||
|
pkgsForTest,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
fetchTests = callTest ./fetch-tests.nix { };
|
fetchTests = callTest ./fetch-tests.nix { };
|
||||||
|
|
||||||
# Use a single common instance of nixpkgs, with allowUnfree
|
|
||||||
# Having a single shared instance should speed up tests a little
|
|
||||||
pkgsForTest = import self.inputs.nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
moduleToTest =
|
moduleToTest =
|
||||||
file: name: module:
|
file: name: module:
|
||||||
let
|
let
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue