From 3dd8f3baf19ed0de973aeafe9c3be5488512b2f1 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Wed, 18 Sep 2024 20:44:23 +0530 Subject: bin/nixpkgs_dag: clean up --- bin/nixpkgs_dag.py | 13 +++++++++++-- 1 file 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 -- cgit v1.2.3