43 lines
1.3 KiB
Nix
43 lines
1.3 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
|
|
mfgames-project-setup.url = "git+https://src.mfgames.com/nixos-contrib/mfgames-project-setup-flake.git";
|
|
};
|
|
|
|
outputs = inputs @ { self, nixpkgs, mfgames-project-setup, ... }:
|
|
let
|
|
# Helpers for producing system-specific outputs
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
|
inherit system;
|
|
pkgs = import nixpkgs { inherit system; };
|
|
});
|
|
in
|
|
rec
|
|
{
|
|
# Set up the developer shell.
|
|
devShells = forEachSupportedSystem ({ system, pkgs }:
|
|
let
|
|
project-config = mfgames-project-setup.lib.mkConfig {
|
|
inherit system pkgs;
|
|
contributorCovenant.enable = true;
|
|
contributorCovenant.contact = "contact@mfgames.com";
|
|
developerCertificateOfOrigin.enable = true;
|
|
};
|
|
in
|
|
{
|
|
# Shell
|
|
default = pkgs.mkShell {
|
|
packages = [
|
|
pkgs.deno
|
|
]
|
|
++ project-config.packages;
|
|
|
|
shellHook = project-config.shellHook;
|
|
};
|
|
});
|
|
|
|
# Formatting for the Nix files
|
|
formatter = forEachSupportedSystem ({ pkgs, ... }: pkgs.nixpkgs-fmt);
|
|
};
|
|
}
|