2.home-manager/tests/modules/programs/mpv/stubs.nix
Bruno BELANYI ccd5351436 tests: mpv: refactor stubs definition
I am about to introduce more tests making use of the stubs, let's
centralize them in one file.
2026-02-26 21:39:23 -06:00

40 lines
853 B
Nix

{ lib, pkgs, ... }:
{
test.stubs = {
mpv-unwrapped = {
name = "mpv-unwrapped";
outPath = null;
buildScript = ''
mkdir -p $out/bin $out/share/applications
echo "Name=mpv" > $out/share/applications/mpv.desktop
cp ${pkgs.writeShellScript "mpv" "exit 0"} $out/bin/mpv
chmod +x $out/bin/mpv
'';
extraAttrs = {
meta =
let
stub = "stub";
in
{
description = stub;
longDescription = stub;
homepage = stub;
mainProgram = stub;
license = [ stub ];
maintainers = [ stub ];
teams = [ stub ];
platforms = lib.platforms.all;
};
};
};
mpvScript = {
extraAttrs = {
scriptName = "mpvScript";
};
};
};
}