flake-template-hell/templates/rust/flake.nix

26 lines
750 B
Nix
Raw Normal View History

2024-08-14 23:44:43 +01:00
{
2025-03-26 15:08:13 +00:00
description = "CHANGE DESC";
2024-08-14 23:44:43 +01:00
inputs = {
2024-12-04 17:35:06 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2025-03-26 15:08:13 +00:00
systems.url = "github:nix-systems/default";
2024-08-14 23:44:43 +01:00
};
2025-03-26 15:08:13 +00:00
outputs = { self, nixpkgs, systems, }:
let
pkgsFor = nixpkgs.legacyPackages;
forAllSystems = f:
nixpkgs.lib.genAttrs (import systems)
(system: f system pkgsFor.${system});
2024-08-14 23:44:43 +01:00
in {
2025-03-26 15:08:13 +00:00
packages = forAllSystems (system: pkgs: {
default = pkgs.callPackage ./nix/package.nix { };
CHANGE_NAME = self.packages.${system}.default;
});
2024-08-14 23:44:43 +01:00
2025-03-26 15:08:13 +00:00
devShells = forAllSystems
(_: pkgs: { default = pkgs.callPackage ./nix/shell.nix { }; });
formatter =
forAllSystems (_: pkgs: pkgs.callPackage ./nix/formatter.nix { });
};
2024-08-14 23:44:43 +01:00
}