repo.or.cz
/
NixPkgs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git]
/
pkgs
/
by-name
/
ma
/
maid
/
test.nix
blob
722481f2dfcb2a98cd727a6f539815592b51899f
1
{ runCommandLocal, maid }:
2
3
runCommandLocal "test-maid-run" {
4
nativeBuildInputs = [ maid ];
5
}
6
''
7
mkdir -p $out/test
8
export HOME=$out
9
cd $out
10
touch test/a.iso test/b.txt
11
cat > rules.rb <<EOF
12
Maid.rules do
13
rule 'ISO' do
14
trash(dir('test/*.iso'))
15
end
16
end
17
EOF
18
maid clean --rules rules.rb --force
19
[ -f test/b.txt ] && [ ! -f test/a.iso ]
20
''