templates/c/flake.nix

28 lines
712 B
Nix
Raw Normal View History

2024-05-06 21:40:26 +00:00
{
description = "Aux template for C project";
2024-05-06 21:40:26 +00:00
inputs.nixpkgs.url = "github:auxolotl/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs }:
2024-05-06 21:40:26 +00:00
let
forAllSystems =
function:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
system: function nixpkgs.legacyPackages.${system}
);
in
rec {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell { inputsFrom = [ packages.${pkgs.system}.hello ]; };
});
2024-05-06 21:40:26 +00:00
packages = forAllSystems (pkgs: rec {
default = hello;
hello = pkgs.callPackage ./hello.nix { };
2024-05-06 21:40:26 +00:00
});
overlays.default = final: prev: { hello = prev.callPackage ./default.nix { }; };
2024-05-06 21:40:26 +00:00
};
}