aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-09-18 20:44:23 +0530
committersinanmohd <sinan@sinanmohd.com>2024-09-18 20:44:23 +0530
commit3dd8f3baf19ed0de973aeafe9c3be5488512b2f1 (patch)
tree2a0248faf84e92fa3909eebb03fab291c8b08327
parentbc12a2224a79fa1460100338abe4dfc5938a1d6a (diff)
bin/nixpkgs_dag: clean up
-rwxr-xr-xbin/nixpkgs_dag.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/nixpkgs_dag.py b/bin/nixpkgs_dag.py
index 0805e4b..7b8adea 100755
--- a/bin/nixpkgs_dag.py
+++ b/bin/nixpkgs_dag.py
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
+# This script is used to evaluate Nixpkgs and store the relationships between
+# derivations and their input derivations in a directed acyclic graph (DAG).
+# The DAG is represented using an adjacency list and saved in a SQLite db
+
import re
import subprocess
import json
@@ -67,8 +71,13 @@ class drv:
return match.group(1)
if __name__ == '__main__':
- cmd = ['nix-eval-jobs', '--flake', 'github:nixos/nixpkgs#legacyPackages.x86_64-linux']
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
+ cmd = [
+ 'nix-eval-jobs',
+ '--flake',
+ 'github:nixos/nixpkgs#legacyPackages.x86_64-linux'
+ ]
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ stderr=subprocess.DEVNULL)
if proc.stdout is None:
raise TypeError