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

25 lines
750 B
Nix

{
description = "CHANGE DESC";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs = { self, nixpkgs, systems, }:
let
pkgsFor = nixpkgs.legacyPackages;
forAllSystems = f:
nixpkgs.lib.genAttrs (import systems)
(system: f system pkgsFor.${system});
in {
packages = forAllSystems (system: pkgs: {
default = pkgs.callPackage ./nix/package.nix { };
CHANGE_NAME = self.packages.${system}.default;
});
devShells = forAllSystems
(_: pkgs: { default = pkgs.callPackage ./nix/shell.nix { }; });
formatter =
forAllSystems (_: pkgs: pkgs.callPackage ./nix/formatter.nix { });
};
}