mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-04 01:55:11 +02:00
modules/nixpkgs: construct an instance of nixpkgs.source
This commit is contained in:
parent
8dc8fa38b0
commit
912841c1a7
3 changed files with 81 additions and 37 deletions
15
tests/nixpkgs-mock.nix
Normal file
15
tests/nixpkgs-mock.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
# This mock nixpkgs can be used as `nixpkgs.source` in nixpkgs-module-test
|
||||
# if we want/need to avoid importing & instantiating a real nixpkgs
|
||||
{
|
||||
config ? { },
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs = {
|
||||
_type = "pkgs";
|
||||
__splicedPackages = pkgs;
|
||||
inherit config pkgs;
|
||||
mock = true;
|
||||
};
|
||||
in
|
||||
pkgs
|
Loading…
Add table
Add a link
Reference in a new issue