nix: actually wrap properly

This commit is contained in:
ihaveahax 2024-02-11 01:24:48 -06:00
parent f7c678eeb1
commit db3e6fbae7
3 changed files with 11 additions and 6 deletions

View File

@ -18,9 +18,7 @@ buildPythonApplication rec {
haccrypto haccrypto
]; ];
postInstall = lib.optional (!stdenv.isDarwin) '' makeWrapperArgs = [
for f in $out/bin/*; do "--set FUSE_LIBRARY_PATH ${pkgs.fuse}/lib/libfuse.so.2"
wrapProgram "$f" --set FUSE_LIBRARY_PATH ${pkgs.fuse}/lib/libfuse.so.2 ];
done
'';
} }

View File

@ -9,7 +9,8 @@ from sys import argv, exit, path
if 'nix_run_setup' in argv: if 'nix_run_setup' in argv:
# I don't understand why this gets called with nix build! # I don't understand why this gets called with nix build!
print('nix build is calling me!') # This feels like a hack but I currently don't know a better solution.
print('nix build is calling me! (__main__)')
exit(0) exit(0)
# path fun times # path fun times

View File

@ -53,6 +53,12 @@ def exit_print_types():
def mount(mount_type: str, return_doc: bool = False) -> int: def mount(mount_type: str, return_doc: bool = False) -> int:
if 'nix_run_setup' in argv:
# I don't understand why this gets called with nix build!
# This feels like a hack but I currently don't know a better solution.
print('nix build is calling me! (main)')
return 0
if mount_type in {'gui', 'gui_i_want_to_be_an_admin_pls'}: if mount_type in {'gui', 'gui_i_want_to_be_an_admin_pls'}:
from gui import start_gui from gui import start_gui
return start_gui() return start_gui()