mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 06:00:45 -06:00
support comments in ignored.txt
This commit is contained in:
parent
8606ed4523
commit
17569b7509
2 changed files with 7 additions and 1 deletions
|
@ -24,5 +24,7 @@ comma-with-db
|
||||||
nix-index-with-db
|
nix-index-with-db
|
||||||
python
|
python
|
||||||
net.conf
|
net.conf
|
||||||
|
# unclear why these needed to be added
|
||||||
llm
|
llm
|
||||||
rofi
|
rofi
|
||||||
|
atticd-atticadm
|
||||||
|
|
|
@ -170,9 +170,13 @@ proc filterSeq(
|
||||||
if filter(drv): result.yes.add drv
|
if filter(drv): result.yes.add drv
|
||||||
else: result.no.add drv
|
else: result.no.add drv
|
||||||
|
|
||||||
|
func getIgnoredPackages(): seq[string] =
|
||||||
|
for l in slurp("ignored.txt").strip().splitLines():
|
||||||
|
if not l.startsWith("#"):
|
||||||
|
result.add l
|
||||||
|
|
||||||
func isIgnored(drv: string): bool =
|
func isIgnored(drv: string): bool =
|
||||||
const ignoredPackages = (slurp "ignored.txt").strip().splitLines()
|
const ignoredPackages = getIgnoredPackages()
|
||||||
let name = drv.split("-", 1)[1].replace(".drv","")
|
let name = drv.split("-", 1)[1].replace(".drv","")
|
||||||
result = name in ignoredPackages
|
result = name in ignoredPackages
|
||||||
if not result:
|
if not result:
|
||||||
|
|
Loading…
Reference in a new issue