cli: fix nixpkgs unfree import

This commit is contained in:
Jörg Thalheim
2023-09-06 17:29:49 +02:00
parent 35c5f248d1
commit 3bdd3af248
7 changed files with 34 additions and 24 deletions

View File

@@ -1,4 +1,3 @@
import json
import os
import sys
from pathlib import Path
@@ -31,15 +30,12 @@ def module_root() -> Path:
return Path(__file__).parent
def deps_flake() -> Path:
return (module_root() / "deps_flake").resolve()
def nixpkgs_flake() -> Path:
return (module_root() / "nixpkgs").resolve()
def nixpkgs() -> Path:
# load the flake.lock json file from the deps_flake and return nodes.nixpkgs.path
with open(deps_flake() / "flake.lock") as f:
flake_lock = json.load(f)
return Path(flake_lock["nodes"]["nixpkgs"]["locked"]["path"])
def nixpkgs_source() -> Path:
return (module_root() / "nixpkgs" / "path").resolve()
def unfree_nixpkgs() -> Path: