mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-30 22:57:58 +00:00
wrapper-manager-fds/tests: init for library set
This commit is contained in:
parent
a994a0cbac
commit
aed2769f77
9
tests/default.nix
Normal file
9
tests/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ branch ? "nixos-stable" }:
|
||||
|
||||
let
|
||||
sources = import ../npins;
|
||||
pkgs = import sources.${branch} { };
|
||||
in
|
||||
{
|
||||
lib = import ./lib { inherit pkgs; };
|
||||
}
|
12
tests/lib/default.nix
Normal file
12
tests/lib/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
lib = import ../../lib { inherit pkgs; };
|
||||
callLib = file: import file {
|
||||
inherit (pkgs) lib; inherit pkgs;
|
||||
self = lib;
|
||||
};
|
||||
in
|
||||
{
|
||||
env = callLib ./env;
|
||||
}
|
29
tests/lib/env/default.nix
vendored
Normal file
29
tests/lib/env/default.nix
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{ pkgs, lib, self }:
|
||||
|
||||
lib.runTests {
|
||||
testsBuildSampleConfiguration = {
|
||||
expr =
|
||||
let
|
||||
sampleConf = self.env.build {
|
||||
inherit pkgs;
|
||||
modules = [ ./wrapper-neofetch.nix ];
|
||||
specialArgs.yourMomName = "Joe Mama";
|
||||
};
|
||||
in
|
||||
lib.isDerivation sampleConf.config.build.toplevel;
|
||||
expected = true;
|
||||
};
|
||||
|
||||
testsBuildSampleConfiguration2 = {
|
||||
expr =
|
||||
let
|
||||
sampleConf = self.env.build {
|
||||
inherit pkgs;
|
||||
modules = [ ./wrapper-fastfetch.nix ];
|
||||
specialArgs.yourMomName = "Joe Mama";
|
||||
};
|
||||
in
|
||||
lib.isDerivation sampleConf.config.build.toplevel;
|
||||
expected = true;
|
||||
};
|
||||
}
|
7
tests/lib/env/wrapper-fastfetch.nix
vendored
Normal file
7
tests/lib/env/wrapper-fastfetch.nix
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
arg0 = lib.getExe' pkgs.fastfetch "fastfetch";
|
||||
appendArgs = [ "--logo" "Guix" ];
|
||||
env.NO_COLOR = "1";
|
||||
}
|
11
tests/lib/env/wrapper-neofetch.nix
vendored
Normal file
11
tests/lib/env/wrapper-neofetch.nix
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{ lib, pkgs, yourMomName, ... }:
|
||||
|
||||
{
|
||||
arg0 = lib.getExe' pkgs.neofetch "neofetch";
|
||||
executableName = yourMomName;
|
||||
appendArgs = [
|
||||
"--ascii_distro" "guix"
|
||||
"--title_fqdn" "off"
|
||||
"--os_arch" "off"
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user