Add Nix flake, devshell, package, and wrapper script #18
+379
−26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have added a Nix flake to this repository that includes a package description, and a development shell, as well as some of the standard tricks for Nix users.
I have also added a wrapper (
cli.nix
) so that if a user wants this installed on their system, they can install the packagefactorio-sat-cli
and get one command,factorio-sat
, instead of many scripts on theirPATH
.There is a significant change to the Python codebase, it fetches assets from
$XDG_DATA_HOME
. I made those changes a while ago now; if you want me to rebase to make a change, I can.nix run github:spikespaz-contrib/factorio-sat
will run the wrapper, and show you all of the commands. Then, pass arguments after--
, such asnix run github:spikespaz-contrib/factorio-sat -- belt_balancer
, which will show the help for thebelt_balancer
script.nix build github:spikespaz-contrib/factorio-sat
will fetch dependencies and install the scripts to./result/bin
. This is not the CLI wrapper.nix build 'github:spikespaz-contrib/factorio-sat#factorio-sat-cli'
will build the CLI wrapper, which lives at./result/bin/factorio-sat
. There are no other scripts or dependencies inbin
, the CLI script is self-contained.nix develop github:spikespaz-contrib/factorio-sat
will put you in a shell with all dependencies and the interpreter. This shell is dual-purpose: it provides the development environment yes, but users can also run this command to get the scripts temporarily on theirPATH
.nix develop
(in locally cloned repository) will open the development shell, same as before. Again, this can be used to work on Factorio-SAT itself, or to just run the scripts fromPATH
.