diff options
| author | alex <alex@pdp7.net> | 2025-08-10 16:42:20 +0200 |
|---|---|---|
| committer | alexpdp7 <alex@corcoles.net> | 2025-08-10 16:43:10 +0200 |
| commit | 4c15b787432e2cb41a0cc63fe4cdac81679faec4 (patch) | |
| tree | 218560f14fef2995cff5fe3af326be459fb1f80b /scripts/p7s/__init__.py | |
| parent | 023ba50fe6d115b859e5deb28120a0957fa50bcb (diff) | |
Also run ledger with nix-portable
Diffstat (limited to 'scripts/p7s/__init__.py')
| -rw-r--r-- | scripts/p7s/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
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" |
