2024-07-31 13:51:40 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
self,
|
|
|
|
}:
|
2024-07-01 14:27:03 +00:00
|
|
|
|
2024-07-27 12:17:48 +00:00
|
|
|
let
|
|
|
|
neofetchWrapper = ../../configs/wrapper-neofetch.nix;
|
|
|
|
fastfetchWrapper = ../../configs/wrapper-fastfetch.nix;
|
|
|
|
in
|
2024-07-01 14:27:03 +00:00
|
|
|
lib.runTests {
|
2024-07-08 13:13:32 +00:00
|
|
|
testsEvaluateSampleConfiguration = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.eval {
|
|
|
|
inherit pkgs;
|
2024-07-27 12:17:48 +00:00
|
|
|
modules = [ neofetchWrapper ];
|
2024-07-08 13:13:32 +00:00
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
2024-07-31 13:51:40 +00:00
|
|
|
lib.isDerivation sampleConf.config.build.toplevel;
|
2024-07-08 13:13:32 +00:00
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testsEvaluateSampleConfiguration2 = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.eval {
|
|
|
|
inherit pkgs;
|
2024-07-27 12:17:48 +00:00
|
|
|
modules = [ fastfetchWrapper ];
|
2024-07-08 13:13:32 +00:00
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
2024-07-31 13:51:40 +00:00
|
|
|
lib.isDerivation sampleConf.config.build.toplevel;
|
2024-07-08 13:13:32 +00:00
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
|
2024-07-01 14:27:03 +00:00
|
|
|
testsBuildSampleConfiguration = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.build {
|
|
|
|
inherit pkgs;
|
2024-07-27 12:17:48 +00:00
|
|
|
modules = [ neofetchWrapper ];
|
2024-07-01 14:27:03 +00:00
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
2024-07-31 13:51:40 +00:00
|
|
|
lib.isDerivation sampleConf;
|
2024-07-01 14:27:03 +00:00
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testsBuildSampleConfiguration2 = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.build {
|
|
|
|
inherit pkgs;
|
2024-07-27 12:17:48 +00:00
|
|
|
modules = [ fastfetchWrapper ];
|
2024-07-01 14:27:03 +00:00
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
2024-07-31 13:51:40 +00:00
|
|
|
lib.isDerivation sampleConf;
|
2024-07-01 14:27:03 +00:00
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
}
|