nix-module-wrapper-manager-fds/tests/default.nix
Gabriel Arazas 76d6dbb1d8 wrapper-manager-fds/tests: init derivation for tests
This is to make checking with flakes a bit easier. Though, there are
much better ways to integrate this even with just the nix-command
experimental feature.
2024-07-13 17:00:06 +08:00

20 lines
456 B
Nix

let
sources = import ../npins;
in
{ pkgs ? import sources.nixos-unstable { } }:
let
lib = import ./lib { inherit pkgs; };
in
{
inherit lib;
libTestPkg =
pkgs.runCommand "wrapper-manager-fds-lib-test" {
testData = builtins.toJSON lib;
passAsFile = [ "testData" ];
nativeBuildInputs = with pkgs; [ yajsv jq ];
} ''
yajsv -s "${./lib/tests.schema.json}" "$testDataPath" && touch $out || jq . "$testDataPath"
'';
}