diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..811c8a2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,28 @@ +root = true +["*"] +charset = "utf-8" +curly_bracket_next_line = true +end_of_line = "lf" +indent_brace_style = "K&R" +indent_size = 4 +indent_style = "space" +insert_final_newline = true +max_line_length = 80 +tab_width = 4 +trim_trailing_whitespace = true + +["*.md"] +max_line_length = "off" + +["package.json"] +indent_size = 2 +indent_style = "space" +tab_width = 2 + +["{LICENSES/**,LICENSE}"] +charset = "unset" +end_of_line = "unset" +indent_size = "unset" +indent_style = "unset" +insert_final_newline = "unset" +trim_trailing_whitespace = "unset" diff --git a/.gitignore b/.gitignore index 6961396..3691364 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,11 @@ dist/ schema.graphql *.log .direnv -/SatisfactoryDedicatedServer \ No newline at end of file +/SatisfactoryDedicatedServer +# nixago: ignore-linked-files +/treefmt.toml +/.prettierrc.json +/lefthook.yml +/.conform.yaml +# mfgames-project-setup: ignore-files +/.direnv/ \ No newline at end of file diff --git a/README.md b/README.md index 39b5ebe..918cb35 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,8 @@ To add installations from the command line, use `ficsit-cli installation add you ## Troubleshooting -* Profile and installation records are located in `%APPDATA%\ficsit\` -* Downloads are cached in `%LOCALAPPDATA%\ficsit\downloadCache\` +- Profile and installation records are located in `%APPDATA%\ficsit\` +- Downloads are cached in `%LOCALAPPDATA%\ficsit\downloadCache\` Get help on the [modding Discord](https://discord.ficsit.app/). @@ -106,8 +106,8 @@ Get help on the [modding Discord](https://discord.ficsit.app/). ### Dependencies -* [Go 1.21](https://go.dev/doc/install) -* IDE of Choice. Goland or VSCode suggested. +- [Go 1.21](https://go.dev/doc/install) +- IDE of Choice. Goland or VSCode suggested. ### Code Generation diff --git a/cspell.json b/cspell.json index 430c2df..ac31470 100644 --- a/cspell.json +++ b/cspell.json @@ -1,27 +1,25 @@ // https://cspell.org/configuration/ { - // Version of the setting file. Always 0.2 - "version": "0.2", - // language - current active spelling language - "language": "en", - // words - list of words to be always considered correct - "words": [ - "armv", - "ficsit", - "gofumpt", - "Goland", - "golangci", - "goquery", - "graphqurl", - "mvdan", - "pgdn", - "pgup", - "wordwrap" - ], - // flagWords - list of words to be always considered incorrect - // This is useful for offensive words and common spelling errors. - // cSpell:disable (don't complain about the words we listed here) - "flagWords": [ - "hte" - ] + // Version of the setting file. Always 0.2 + "version": "0.2", + // language - current active spelling language + "language": "en", + // words - list of words to be always considered correct + "words": [ + "armv", + "ficsit", + "gofumpt", + "Goland", + "golangci", + "goquery", + "graphqurl", + "mvdan", + "pgdn", + "pgup", + "wordwrap" + ], + // flagWords - list of words to be always considered incorrect + // This is useful for offensive words and common spelling errors. + // cSpell:disable (don't complain about the words we listed here) + "flagWords": ["hte"] } diff --git a/docs/ficsit.md b/docs/ficsit.md index 4bf3b7b..6b23a2e 100644 --- a/docs/ficsit.md +++ b/docs/ficsit.md @@ -24,12 +24,12 @@ cli mod manager for satisfactory ### SEE ALSO -* [ficsit apply](ficsit_apply.md) - Apply profiles to all installations -* [ficsit cli](ficsit_cli.md) - Start interactive CLI (default) -* [ficsit installation](ficsit_installation.md) - Manage installations -* [ficsit profile](ficsit_profile.md) - Manage profiles -* [ficsit search](ficsit_search.md) - Search mods -* [ficsit smr](ficsit_smr.md) - Manage mods on SMR -* [ficsit version](ficsit_version.md) - Print current version information +- [ficsit apply](ficsit_apply.md) - Apply profiles to all installations +- [ficsit cli](ficsit_cli.md) - Start interactive CLI (default) +- [ficsit installation](ficsit_installation.md) - Manage installations +- [ficsit profile](ficsit_profile.md) - Manage profiles +- [ficsit search](ficsit_search.md) - Search mods +- [ficsit smr](ficsit_smr.md) - Manage mods on SMR +- [ficsit version](ficsit_version.md) - Print current version information ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_apply.md b/docs/ficsit_apply.md index 0a135a7..5afbec1 100644 --- a/docs/ficsit_apply.md +++ b/docs/ficsit_apply.md @@ -33,6 +33,6 @@ ficsit apply [installation] ... [flags] ### SEE ALSO -* [ficsit](ficsit.md) - cli mod manager for satisfactory +- [ficsit](ficsit.md) - cli mod manager for satisfactory ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_cli.md b/docs/ficsit_cli.md index e1a1a61..1717e58 100644 --- a/docs/ficsit_cli.md +++ b/docs/ficsit_cli.md @@ -33,6 +33,6 @@ ficsit cli [flags] ### SEE ALSO -* [ficsit](ficsit.md) - cli mod manager for satisfactory +- [ficsit](ficsit.md) - cli mod manager for satisfactory ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_installation.md b/docs/ficsit_installation.md index f82afd9..b1e15d5 100644 --- a/docs/ficsit_installation.md +++ b/docs/ficsit_installation.md @@ -29,11 +29,11 @@ Manage installations ### SEE ALSO -* [ficsit](ficsit.md) - cli mod manager for satisfactory -* [ficsit installation add](ficsit_installation_add.md) - Add an installation -* [ficsit installation ls](ficsit_installation_ls.md) - List all installations -* [ficsit installation remove](ficsit_installation_remove.md) - Remove an installation -* [ficsit installation set-profile](ficsit_installation_set-profile.md) - Change the profile of an installation -* [ficsit installation set-vanilla](ficsit_installation_set-vanilla.md) - Set the installation to vanilla mode or not +- [ficsit](ficsit.md) - cli mod manager for satisfactory +- [ficsit installation add](ficsit_installation_add.md) - Add an installation +- [ficsit installation ls](ficsit_installation_ls.md) - List all installations +- [ficsit installation remove](ficsit_installation_remove.md) - Remove an installation +- [ficsit installation set-profile](ficsit_installation_set-profile.md) - Change the profile of an installation +- [ficsit installation set-vanilla](ficsit_installation_set-vanilla.md) - Set the installation to vanilla mode or not ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_installation_add.md b/docs/ficsit_installation_add.md index 07f0908..45a5dc5 100644 --- a/docs/ficsit_installation_add.md +++ b/docs/ficsit_installation_add.md @@ -33,6 +33,6 @@ ficsit installation add [profile] [flags] ### SEE ALSO -* [ficsit installation](ficsit_installation.md) - Manage installations +- [ficsit installation](ficsit_installation.md) - Manage installations ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_installation_ls.md b/docs/ficsit_installation_ls.md index f6a5cc8..1677285 100644 --- a/docs/ficsit_installation_ls.md +++ b/docs/ficsit_installation_ls.md @@ -33,6 +33,6 @@ ficsit installation ls [flags] ### SEE ALSO -* [ficsit installation](ficsit_installation.md) - Manage installations +- [ficsit installation](ficsit_installation.md) - Manage installations ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_installation_remove.md b/docs/ficsit_installation_remove.md index d6e15e3..4373f4f 100644 --- a/docs/ficsit_installation_remove.md +++ b/docs/ficsit_installation_remove.md @@ -33,6 +33,6 @@ ficsit installation remove [flags] ### SEE ALSO -* [ficsit installation](ficsit_installation.md) - Manage installations +- [ficsit installation](ficsit_installation.md) - Manage installations ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_installation_set-profile.md b/docs/ficsit_installation_set-profile.md index 0ef9ccf..8f63616 100644 --- a/docs/ficsit_installation_set-profile.md +++ b/docs/ficsit_installation_set-profile.md @@ -33,6 +33,6 @@ ficsit installation set-profile [flags] ### SEE ALSO -* [ficsit installation](ficsit_installation.md) - Manage installations +- [ficsit installation](ficsit_installation.md) - Manage installations ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_installation_set-vanilla.md b/docs/ficsit_installation_set-vanilla.md index 862f730..41cdaf9 100644 --- a/docs/ficsit_installation_set-vanilla.md +++ b/docs/ficsit_installation_set-vanilla.md @@ -34,6 +34,6 @@ ficsit installation set-vanilla [flags] ### SEE ALSO -* [ficsit installation](ficsit_installation.md) - Manage installations +- [ficsit installation](ficsit_installation.md) - Manage installations ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_profile.md b/docs/ficsit_profile.md index 93cdd69..9cd0fb4 100644 --- a/docs/ficsit_profile.md +++ b/docs/ficsit_profile.md @@ -29,11 +29,11 @@ Manage profiles ### SEE ALSO -* [ficsit](ficsit.md) - cli mod manager for satisfactory -* [ficsit profile delete](ficsit_profile_delete.md) - Delete a profile -* [ficsit profile ls](ficsit_profile_ls.md) - List all profiles -* [ficsit profile mods](ficsit_profile_mods.md) - List all mods in a profile -* [ficsit profile new](ficsit_profile_new.md) - Create a new profile -* [ficsit profile rename](ficsit_profile_rename.md) - Rename a profile +- [ficsit](ficsit.md) - cli mod manager for satisfactory +- [ficsit profile delete](ficsit_profile_delete.md) - Delete a profile +- [ficsit profile ls](ficsit_profile_ls.md) - List all profiles +- [ficsit profile mods](ficsit_profile_mods.md) - List all mods in a profile +- [ficsit profile new](ficsit_profile_new.md) - Create a new profile +- [ficsit profile rename](ficsit_profile_rename.md) - Rename a profile ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_profile_delete.md b/docs/ficsit_profile_delete.md index 32c940c..3f713db 100644 --- a/docs/ficsit_profile_delete.md +++ b/docs/ficsit_profile_delete.md @@ -33,6 +33,6 @@ ficsit profile delete [flags] ### SEE ALSO -* [ficsit profile](ficsit_profile.md) - Manage profiles +- [ficsit profile](ficsit_profile.md) - Manage profiles ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_profile_ls.md b/docs/ficsit_profile_ls.md index 6d6f669..e1c1a69 100644 --- a/docs/ficsit_profile_ls.md +++ b/docs/ficsit_profile_ls.md @@ -33,6 +33,6 @@ ficsit profile ls [flags] ### SEE ALSO -* [ficsit profile](ficsit_profile.md) - Manage profiles +- [ficsit profile](ficsit_profile.md) - Manage profiles ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_profile_mods.md b/docs/ficsit_profile_mods.md index 1e9b780..667952c 100644 --- a/docs/ficsit_profile_mods.md +++ b/docs/ficsit_profile_mods.md @@ -33,6 +33,6 @@ ficsit profile mods [flags] ### SEE ALSO -* [ficsit profile](ficsit_profile.md) - Manage profiles +- [ficsit profile](ficsit_profile.md) - Manage profiles ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_profile_new.md b/docs/ficsit_profile_new.md index d3d2d34..b4e29ee 100644 --- a/docs/ficsit_profile_new.md +++ b/docs/ficsit_profile_new.md @@ -33,6 +33,6 @@ ficsit profile new [flags] ### SEE ALSO -* [ficsit profile](ficsit_profile.md) - Manage profiles +- [ficsit profile](ficsit_profile.md) - Manage profiles ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_profile_rename.md b/docs/ficsit_profile_rename.md index 60099c5..18b0969 100644 --- a/docs/ficsit_profile_rename.md +++ b/docs/ficsit_profile_rename.md @@ -33,6 +33,6 @@ ficsit profile rename [flags] ### SEE ALSO -* [ficsit profile](ficsit_profile.md) - Manage profiles +- [ficsit profile](ficsit_profile.md) - Manage profiles ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_search.md b/docs/ficsit_search.md index 211cd48..06648d9 100644 --- a/docs/ficsit_search.md +++ b/docs/ficsit_search.md @@ -38,6 +38,6 @@ ficsit search [query] [flags] ### SEE ALSO -* [ficsit](ficsit.md) - cli mod manager for satisfactory +- [ficsit](ficsit.md) - cli mod manager for satisfactory ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_smr.md b/docs/ficsit_smr.md index 4b14124..8f9bab8 100644 --- a/docs/ficsit_smr.md +++ b/docs/ficsit_smr.md @@ -29,7 +29,7 @@ Manage mods on SMR ### SEE ALSO -* [ficsit](ficsit.md) - cli mod manager for satisfactory -* [ficsit smr upload](ficsit_smr_upload.md) - Upload a new mod version +- [ficsit](ficsit.md) - cli mod manager for satisfactory +- [ficsit smr upload](ficsit_smr_upload.md) - Upload a new mod version ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_smr_upload.md b/docs/ficsit_smr_upload.md index 4f71fae..2cec0da 100644 --- a/docs/ficsit_smr_upload.md +++ b/docs/ficsit_smr_upload.md @@ -35,6 +35,6 @@ ficsit smr upload [flags] ### SEE ALSO -* [ficsit smr](ficsit_smr.md) - Manage mods on SMR +- [ficsit smr](ficsit_smr.md) - Manage mods on SMR ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/docs/ficsit_version.md b/docs/ficsit_version.md index fbd5c1c..216f1f6 100644 --- a/docs/ficsit_version.md +++ b/docs/ficsit_version.md @@ -33,6 +33,6 @@ ficsit version [flags] ### SEE ALSO -* [ficsit](ficsit.md) - cli mod manager for satisfactory +- [ficsit](ficsit.md) - cli mod manager for satisfactory ###### Auto generated by spf13/cobra on 7-Dec-2023 diff --git a/ficsit-cli b/ficsit-cli new file mode 100755 index 0000000..7b075e9 Binary files /dev/null and b/ficsit-cli differ diff --git a/flake.lock b/flake.lock index 0c52fe0..cb6f7ea 100644 --- a/flake.lock +++ b/flake.lock @@ -18,18 +18,396 @@ "type": "github" } }, - "nixpkgs": { + "flake-utils_10": { "locked": { - "lastModified": 1700014976, - "narHash": "sha256-dSGpS2YeJrXW5aH9y7Abd235gGufY3RuZFth6vuyVtU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "592047fc9e4f7b74a4dc85d1b9f5243dfe4899e3", + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_7": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_8": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_9": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "mfgames-project-setup": { + "inputs": { + "nixago": "nixago", + "nixago-exts": "nixago-exts_3", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1723051996, + "narHash": "sha256-pcWXdsdAbD0U9b93V/I+eJREbgZ5TWYkFc26gmSz46E=", + "ref": "refs/heads/main", + "rev": "f378dedc71e3b2b82f95041069bec56fce9e9524", + "revCount": 29, + "type": "git", + "url": "https://src.mfgames.com/nixos-contrib/mfgames-project-setup-flake.git" + }, + "original": { + "type": "git", + "url": "https://src.mfgames.com/nixos-contrib/mfgames-project-setup-flake.git" + } + }, + "nixago": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixago-exts": "nixago-exts", + "nixpkgs": [ + "mfgames-project-setup", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1687381756, + "narHash": "sha256-IUMIlYfrvj7Yli4H2vvyig8HEPpfCeMaE6+kBGPzFyk=", + "owner": "jmgilman", + "repo": "nixago", + "rev": "dacceb10cace103b3e66552ec9719fa0d33c0dc9", + "type": "github" + }, + "original": { + "owner": "jmgilman", + "repo": "nixago", + "type": "github" + } + }, + "nixago-exts": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixago": "nixago_2", + "nixpkgs": [ + "mfgames-project-setup", + "nixago", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1676070308, + "narHash": "sha256-QaJ65oc2l8iwQIGWUJ0EKjCeSuuCM/LqR8RauxZUUkc=", + "owner": "nix-community", + "repo": "nixago-extensions", + "rev": "e5380cb0456f4ea3c86cf94e3039eb856bf07d0b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago-extensions", + "type": "github" + } + }, + "nixago-exts_2": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixago": "nixago_3", + "nixpkgs": [ + "mfgames-project-setup", + "nixago", + "nixago-exts", + "nixago", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1655508669, + "narHash": "sha256-BDDdo5dZQMmwNH/GNacy33nPBnCpSIydWFPZs0kkj/g=", + "owner": "nix-community", + "repo": "nixago-extensions", + "rev": "3022a932ce109258482ecc6568c163e8d0b426aa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago-extensions", + "type": "github" + } + }, + "nixago-exts_3": { + "inputs": { + "flake-utils": "flake-utils_7", + "nixago": "nixago_4", + "nixpkgs": [ + "mfgames-project-setup", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1676070308, + "narHash": "sha256-QaJ65oc2l8iwQIGWUJ0EKjCeSuuCM/LqR8RauxZUUkc=", + "owner": "nix-community", + "repo": "nixago-extensions", + "rev": "e5380cb0456f4ea3c86cf94e3039eb856bf07d0b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago-extensions", + "type": "github" + } + }, + "nixago-exts_4": { + "inputs": { + "flake-utils": "flake-utils_9", + "nixago": "nixago_5", + "nixpkgs": [ + "mfgames-project-setup", + "nixago-exts", + "nixago", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1655508669, + "narHash": "sha256-BDDdo5dZQMmwNH/GNacy33nPBnCpSIydWFPZs0kkj/g=", + "owner": "nix-community", + "repo": "nixago-extensions", + "rev": "3022a932ce109258482ecc6568c163e8d0b426aa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago-extensions", + "type": "github" + } + }, + "nixago_2": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixago-exts": "nixago-exts_2", + "nixpkgs": [ + "mfgames-project-setup", + "nixago", + "nixago-exts", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1676070010, + "narHash": "sha256-iYzJIWptE1EUD8VINAg66AAMUajizg8JUYN3oBmb8no=", + "owner": "nix-community", + "repo": "nixago", + "rev": "d480ba6c0c16e2c5c0bd2122852d6a0c9ad1ed0e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "rename-config-data", + "repo": "nixago", + "type": "github" + } + }, + "nixago_3": { + "inputs": { + "flake-utils": "flake-utils_6", + "nixpkgs": [ + "mfgames-project-setup", + "nixago", + "nixago-exts", + "nixago", + "nixago-exts", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1655405483, + "narHash": "sha256-Crd49aZWNrpczlRTOwWGfwBMsTUoG9vlHDKQC7cx264=", + "owner": "nix-community", + "repo": "nixago", + "rev": "e6a9566c18063db5b120e69e048d3627414e327d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago", + "type": "github" + } + }, + "nixago_4": { + "inputs": { + "flake-utils": "flake-utils_8", + "nixago-exts": "nixago-exts_4", + "nixpkgs": [ + "mfgames-project-setup", + "nixago-exts", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1676070010, + "narHash": "sha256-iYzJIWptE1EUD8VINAg66AAMUajizg8JUYN3oBmb8no=", + "owner": "nix-community", + "repo": "nixago", + "rev": "d480ba6c0c16e2c5c0bd2122852d6a0c9ad1ed0e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "rename-config-data", + "repo": "nixago", + "type": "github" + } + }, + "nixago_5": { + "inputs": { + "flake-utils": "flake-utils_10", + "nixpkgs": [ + "mfgames-project-setup", + "nixago-exts", + "nixago", + "nixago-exts", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1655405483, + "narHash": "sha256-Crd49aZWNrpczlRTOwWGfwBMsTUoG9vlHDKQC7cx264=", + "owner": "nix-community", + "repo": "nixago", + "rev": "e6a9566c18063db5b120e69e048d3627414e327d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1706098335, + "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", + "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", + "revCount": 554858, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2311.554858%2Brev-a77ab169a83a4175169d78684ddd2e54486ac651/018d46f0-798f-71dc-a8c5-4689c46f7d12/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz" } }, "nixpkgs-unstable": { @@ -47,10 +425,25 @@ "type": "indirect" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1700014976, + "narHash": "sha256-dSGpS2YeJrXW5aH9y7Abd235gGufY3RuZFth6vuyVtU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "592047fc9e4f7b74a4dc85d1b9f5243dfe4899e3", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", + "mfgames-project-setup": "mfgames-project-setup", + "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable" } }, diff --git a/flake.nix b/flake.nix index 0de54ec..263ee7a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,19 +1,35 @@ { - description = "smr-cli"; + description = "ficsit-cli"; inputs = { flake-utils.url = "github:numtide/flake-utils"; nixpkgs-unstable.url = "flake:nixpkgs/nixpkgs-unstable"; + mfgames-project-setup.url = "git+https://src.mfgames.com/nixos-contrib/mfgames-project-setup-flake.git"; }; - outputs = { self, nixpkgs, flake-utils, nixpkgs-unstable }: + outputs = { self, nixpkgs, flake-utils, nixpkgs-unstable, mfgames-project-setup }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; - unstable = nixpkgs-unstable.legacyPackages.${system}; in + pkgs = nixpkgs.legacyPackages.${system}; + unstable = nixpkgs-unstable.legacyPackages.${system}; + in { - devShells.default = import ./shell.nix { inherit pkgs unstable; }; + devShells.default = import ./shell.nix { inherit system pkgs unstable mfgames-project-setup; }; + + defaultPackage = pkgs.buildGoModule { + pname = "ficsit-cli"; + version = "0.6.0"; + doCheck = false; # Tests are failing in this flake. + vendorHash = "sha256-vmA3jvxOLRYj5BmvWMhSEnCTEoe8BLm8lpm2kruIEv4="; #pkgs.lib.fakeHash; + + src = pkgs.fetchFromGitHub { + owner = "satisfactorymodding"; + repo = "ficsit-cli"; + rev = "v0.6.0"; + hash = "sha256-Zwidx0war3hos9NEmk9dEzPBgDGdUtWvZb7FIF5OZMA="; #pkgs.lib.fakeHash; + }; + }; } ); -} \ No newline at end of file +} diff --git a/genqlient.yaml b/genqlient.yaml index eab5955..015152d 100644 --- a/genqlient.yaml +++ b/genqlient.yaml @@ -1,7 +1,7 @@ # https://github.com/Khan/genqlient/blob/main/docs/genqlient.yaml schema: schema.graphql operations: -- ficsit/queries/*.graphql + - ficsit/queries/*.graphql generated: ficsit/types.go package: ficsit bindings: @@ -21,4 +21,4 @@ bindings: type: time.Time unmarshaler: github.com/satisfactorymodding/ficsit-cli/ficsit/utils.UnmarshalDateTime TagID: - type: string \ No newline at end of file + type: string diff --git a/shell.nix b/shell.nix index 5d349dc..f38c983 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,13 @@ -{ pkgs, unstable }: - +{ system, pkgs, unstable, mfgames-project-setup }: +let + project-config = mfgames-project-setup.lib.mkConfig { + inherit system pkgs; + }; +in pkgs.mkShell { + buildInputs = project-config.packages; + shellHook = project-config.shellHook; + nativeBuildInputs = with pkgs.buildPackages; [ unstable.go_1_21 unstable.golangci-lint