From 4c15b787432e2cb41a0cc63fe4cdac81679faec4 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 10 Aug 2025 16:42:20 +0200 Subject: Also run ledger with nix-portable --- scripts/p7s/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts/p7s/__init__.py') diff --git a/scripts/p7s/__init__.py b/scripts/p7s/__init__.py index e1dfa06c..9afc6ba7 100644 --- a/scripts/p7s/__init__.py +++ b/scripts/p7s/__init__.py @@ -1,4 +1,11 @@ -import pathlib +import os, pathlib, shutil, subprocess, sys + + +def nix_portable(command): + def main(): + os.environ["NP_RUNTIME"] = "bwrap" + sys.exit(subprocess.run([shutil.which("nix-portable"), "nix", "run", f"nixpkgs#{command}"] + sys.argv[1:]).returncode) + return main BASHRC_D = pathlib.Path.home() / ".bashrc.d" -- cgit v1.2.3