From 17569b7509544ea23bf1fd926c4a06b4ed5f9c27 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 20 Nov 2024 11:48:08 -0600 Subject: [PATCH] support comments in ignored.txt --- pkgs/oizys/src/oizys/ignored.txt | 2 ++ pkgs/oizys/src/oizys/nix.nim | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/oizys/src/oizys/ignored.txt b/pkgs/oizys/src/oizys/ignored.txt index a2e309c..5702f1c 100644 --- a/pkgs/oizys/src/oizys/ignored.txt +++ b/pkgs/oizys/src/oizys/ignored.txt @@ -24,5 +24,7 @@ comma-with-db nix-index-with-db python net.conf +# unclear why these needed to be added llm rofi +atticd-atticadm diff --git a/pkgs/oizys/src/oizys/nix.nim b/pkgs/oizys/src/oizys/nix.nim index ad4dbad..3830f58 100644 --- a/pkgs/oizys/src/oizys/nix.nim +++ b/pkgs/oizys/src/oizys/nix.nim @@ -170,9 +170,13 @@ proc filterSeq( if filter(drv): result.yes.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 = - const ignoredPackages = (slurp "ignored.txt").strip().splitLines() + const ignoredPackages = getIgnoredPackages() let name = drv.split("-", 1)[1].replace(".drv","") result = name in ignoredPackages if not result: