{ description = "Flake for rempl"; inputs = { flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; devshell.url = "github:numtide/devshell"; devshell-helpers.url = "sourcehut:~yuiyukihira/devshell"; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; crane = { url = "github:ipetkov/crane"; inputs.nixpkgs.follows = "nixpkgs"; }; advisory-db = { url = "github:rustsec/advisory-db"; flake = false; }; }; outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } #nightlyModule = importApply ./nix/rempl.nix { # inherit withSystem; # packageSet = p: p.rust-bin.nightly.latest.default; # nameSuffix = "-nightly"; # features = "--features nightly"; #}; { imports = [ inputs.devshell.flakeModule ]; systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-dawin" ]; perSystem = { config, pkgs, system, ... }: { _module.args.pkgs = import inputs.nixpkgs { inherit system; overlays = [ inputs.rust-overlay.overlays.default ]; }; checks = (import ./nix/rempl.nix { inherit inputs config pkgs; packageSet = p: p.rust-bin.stable.latest.default; }) // (import ./nix/rempl.nix { inherit inputs config pkgs; packageSet = p: p.rust-bin.nightly.latest.default; nameSuffix = "-nightly"; features = "--features nightly"; }); devshells.default = { imports = [ inputs.devshell-helpers.devshellProfiles.language.rust ]; language.rust.packageSet = pkgs.rust-bin.nightly.latest.default; commands = [{ name = "bump_version"; help = "increment the version"; package = pkgs.writers.writePython3Bin "bump_version" {} (builtins.readFile ./contrib/semver.py); }]; packages = with pkgs; [ git-cliff cargo-release ]; }; }; }; }