You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is a working example that uses nix-shell to run scriptisto as interpreter. nix-shell will install all the dependencies required to run the script (e.g. scriptisto, pkg-config, clang and glibmm) and then execute scriptisto. You can read more about that here: https://nixos.org/manual/nix/stable/command-ref/nix-shell.html#use-as-a--interpreter
Two shebangs are used, one to specify nix-shell as the script runner, and one that configures nix-shell to use scriptisto as the interpreter. The second shebang is "wrapped" in C++ comments, to avoid compile errors. Ideally, scriptisto should have an option to indicate other shebangs that also need to be replaced with comments, e.g. other_shebangs_prefixes: #!nix-shell #!some-other-prefix.
I did not have much time to look at the project, but now I will get back to it's development.
The initial "replace shebang" feature is more of a convenience rather than all powerful tool. For example, if I extend it as suggested, the next request could be to replace each shebang with different strings.
At that point I will be reimplementing sed -i.
Could using sed in build_cmd solve the problem as well? If yes, what I could do is to update the wiki with a recipe.
First of all, thanks for this project!
The following is a working example that uses
nix-shell
to runscriptisto
as interpreter.nix-shell
will install all the dependencies required to run the script (e.g.scriptisto, pkg-config, clang and glibmm
) and then executescriptisto
. You can read more about that here: https://nixos.org/manual/nix/stable/command-ref/nix-shell.html#use-as-a--interpreterTwo shebangs are used, one to specify
nix-shell
as the script runner, and one that configuresnix-shell
to usescriptisto
as the interpreter. The second shebang is "wrapped" in C++ comments, to avoid compile errors. Ideally,scriptisto
should have an option to indicate other shebangs that also need to be replaced with comments, e.g.other_shebangs_prefixes: #!nix-shell #!some-other-prefix
.The Nix derivation that installs
scriptisto
looks like this:The text was updated successfully, but these errors were encountered: