Skip to content

Commit 983051f

Browse files
author
nix
committed
add nix remote support
1 parent 28b2087 commit 983051f

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

contrib/Installer/assets/main.lua

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
json = require "json"
2-
-- MTFG LUA Wrappper Version 2.0.2
2+
-- MTFG LUA Wrappper Version 2.0.3
33

44
-- global var
55
processHandleMTFG = nil
@@ -88,8 +88,19 @@ function exec_mtfg(no_tracking)
8888
cmd = "/usr/bin/bash"
8989
table.insert(args, ofs.ExtensionDir() .. "/Python-Funscript-Editor/conda_wrapper.sh")
9090
elseif platform == "Linux, Nix" then
91-
os.execute("chmod +x \"" .. ofs.ExtensionDir() .. "/Python-Funscript-Editor/nix_wrapper.sh" .. "\"")
92-
cmd = ofs.ExtensionDir() .. "/Python-Funscript-Editor/nix_wrapper.sh"
91+
-- old code:
92+
-- os.execute("chmod +x \"" .. ofs.ExtensionDir() .. "/Python-Funscript-Editor/nix_wrapper.sh" .. "\"")
93+
-- cmd = ofs.ExtensionDir() .. "/Python-Funscript-Editor/nix_wrapper.sh"
94+
95+
file = io.open("/tmp/nix-mtfg.sh", "w")
96+
file:write("#!/usr/bin/env bash\n")
97+
file:write("unset LD_LIBRARY_PATH\n")
98+
file:write("nix run github:michael-mueller-git/Python-Funscript-Editor --refresh -- \"$@\"\n")
99+
file:close()
100+
101+
os.execute("chmod +x /tmp/nix-mtfg.sh")
102+
103+
cmd = "/tmp/nix-mtfg.sh"
93104
else
94105
print("ERROR: Platform Not Implemented (", platform, ")")
95106
end

0 commit comments

Comments
 (0)