mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
lib/tests: simplify access to default system
This commit is contained in:
parent
9bf4c9d55b
commit
3172e48dbb
3 changed files with 11 additions and 7 deletions
|
@ -27,7 +27,9 @@
|
||||||
{ pkgs, system, ... }:
|
{ pkgs, system, ... }:
|
||||||
{
|
{
|
||||||
# NOTE: this is the publicly documented flake output we've had for a while
|
# NOTE: this is the publicly documented flake output we've had for a while
|
||||||
check = pkgs.callPackage ../lib/tests.nix { inherit self; };
|
check = pkgs.callPackage ../lib/tests.nix {
|
||||||
|
inherit lib self system;
|
||||||
|
};
|
||||||
|
|
||||||
# NOTE: no longer needs to be per-system
|
# NOTE: no longer needs to be per-system
|
||||||
helpers = lib.warn "nixvim: `<nixvim>.lib.${system}.helpers` has been moved to `<nixvim>.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim;
|
helpers = lib.warn "nixvim: `<nixvim>.lib.${system}.helpers` has been moved to `<nixvim>.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim;
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
pkgs,
|
system,
|
||||||
lib ? pkgs.lib,
|
lib,
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
defaultPkgs = pkgs;
|
defaultSystem = system;
|
||||||
|
|
||||||
# Create a nix derivation from a nixvim executable.
|
# Create a nix derivation from a nixvim executable.
|
||||||
# The build phase simply consists in running the provided nvim binary.
|
# The build phase simply consists in running the provided nvim binary.
|
||||||
|
@ -31,7 +30,7 @@ let
|
||||||
{
|
{
|
||||||
name ? null,
|
name ? null,
|
||||||
pkgs ? null,
|
pkgs ? null,
|
||||||
system ? defaultPkgs.stdenv.hostPlatform.system,
|
system ? defaultSystem,
|
||||||
module,
|
module,
|
||||||
extraSpecialArgs ? { },
|
extraSpecialArgs ? { },
|
||||||
}:
|
}:
|
||||||
|
|
|
@ -8,10 +8,13 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgsUnfree,
|
pkgsUnfree,
|
||||||
self,
|
self,
|
||||||
|
system,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
fetchTests = callTest ./fetch-tests.nix { };
|
fetchTests = callTest ./fetch-tests.nix { };
|
||||||
test-derivation = callPackage ../lib/tests.nix { inherit self; };
|
test-derivation = callPackage ../lib/tests.nix {
|
||||||
|
inherit lib self system;
|
||||||
|
};
|
||||||
inherit (test-derivation) mkTestDerivationFromNixvimModule;
|
inherit (test-derivation) mkTestDerivationFromNixvimModule;
|
||||||
|
|
||||||
moduleToTest =
|
moduleToTest =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue