Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
20 lines
411 B
Nix
20 lines
411 B
Nix
{ runCommandLocal, maid }:
|
|
|
|
runCommandLocal "test-maid-run" {
|
|
nativeBuildInputs = [ maid ];
|
|
}
|
|
''
|
|
mkdir -p $out/test
|
|
export HOME=$out
|
|
cd $out
|
|
touch test/a.iso test/b.txt
|
|
cat > rules.rb <<EOF
|
|
Maid.rules do
|
|
rule 'ISO' do
|
|
trash(dir('test/*.iso'))
|
|
end
|
|
end
|
|
EOF
|
|
maid clean --rules rules.rb --force
|
|
[ -f test/b.txt ] && [ ! -f test/a.iso ]
|
|
''
|