v1.0.0 - Breaking Changes (MfGames Writing Setup Flake)

As the chained updates go through, we've managed to update this project to use the new options-based format of mfgames-project-setup-flake.

This release changes a few things:

  • We are now switching to semver with this being tagged as v1.0.0
  • Moving from the mkConfig to a NixOS-style configuration
  • Embracing Justfile as the default build process

Importing

Importing is slightly differen than before. Inputs should include the tags:

flake-parts.url = "github:hercules-ci/flake-parts";
mfgames-writing-setup.url = "git+https://src.mfgames.com/nixos-contrib/mfgames-writing-setup-flake.git?ref=refs/tags/v1.0.0";
mfgames-writing-setup.inputs.nixpkgs.follows = "nixpkgs"; # Optional

This flake needs to be imported into the module:

  outputs =
    inputs@{ flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      imports = [
        inputs.mfgames-writing-setup.flakeModules.default
      ];

While we haven't figured out how to get this to play with flake-utils, we've changed our flake to use flake-parts which gave us a better framework for figuring out the options. As a note, configuration is done outside of the perSystem, but the results (config.mfgames.writing) are provided inside perSystem.

      mfgames.writing.enable = true;

      perSystem =
        { config, pkgs, ... }:
        {
          devShells.default = pkgs.mkShell {
            packages = [ ] ++ config.mfgames.writing.packages;
            shellHook = config.mfgames.writing.shellHook;
          };
        };

Project Setup

If you notice, this no longer requires adding the mfgames-project-setup-flake settings, this flake will now automatically include that unless you need to specifically override it. However, you don't have to import the project setup if you want to use its current functionality, such as using mfgames.project.reuse to license your work:

      mfgames.project.reuse.enable = true;
      mfgames.writing.enable = true;

At the moment, there is no specific settings under mfgames.writing other than enable. The above example still imports everything you need to set up mfgames-writing-js except that library itself. That is going to be the next change, to automatically package everything including the JS libraries, but not quite yet. Until then, you still need to set up your package.json to include those projects. When that does it, this will be another breaking change because 99% of the time, anyone using this flake is also going to be using mfgames-writing to build the projects.

Metadata

Project

  • Project Home
  • Project ID: 019530c5-8880-77e3-9e41-83db8b5a49ba

Categories: