2024-05-06 21:40:26 +00:00
|
|
|
{
|
2024-05-06 22:21:40 +00:00
|
|
|
description = "Aux template for C project";
|
2024-05-06 21:40:26 +00:00
|
|
|
|
|
|
|
inputs.nixpkgs.url = "github:auxolotl/nixpkgs/nixos-unstable";
|
|
|
|
|
2024-05-06 21:46:22 +00:00
|
|
|
outputs =
|
|
|
|
{ self, nixpkgs }:
|
2024-05-06 21:40:26 +00:00
|
|
|
let
|
|
|
|
forAllSystems =
|
|
|
|
function:
|
|
|
|
nixpkgs.lib.genAttrs [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"i686-linux"
|
|
|
|
"mipsel-linux"
|
|
|
|
"powerpc64le-linux"
|
|
|
|
] (system: function nixpkgs.legacyPackages.${system});
|
2024-05-06 21:46:22 +00:00
|
|
|
in
|
|
|
|
rec {
|
2024-05-06 21:53:12 +00:00
|
|
|
devShells = forAllSystems (pkgs: {
|
|
|
|
default = pkgs.mkShell {
|
2024-05-06 21:40:26 +00:00
|
|
|
hardeningDisable = [ "fortify" ];
|
|
|
|
inputsFrom = pkgs.lib.attrsets.attrValues packages;
|
2024-05-06 21:53:12 +00:00
|
|
|
};
|
|
|
|
});
|
2024-05-06 21:40:26 +00:00
|
|
|
|
|
|
|
packages = forAllSystems (pkgs: rec {
|
|
|
|
default = hello;
|
2024-05-06 22:21:40 +00:00
|
|
|
hello = pkgs.callPackage ./default.nix { };
|
2024-05-06 21:40:26 +00:00
|
|
|
});
|
|
|
|
|
2024-05-06 22:21:40 +00:00
|
|
|
overlays.default = final: prev: { hello = final.callPackage ./default.nix { }; };
|
|
|
|
|
2024-05-06 21:53:12 +00:00
|
|
|
apps = forAllSystems (pkgs: rec {
|
2024-05-06 21:40:26 +00:00
|
|
|
default = hello;
|
2024-05-06 21:53:12 +00:00
|
|
|
hello = {
|
|
|
|
program = "${packages.${pkgs.system}.hello}/bin/hello";
|
|
|
|
type = "app";
|
|
|
|
};
|
|
|
|
});
|
2024-05-06 21:40:26 +00:00
|
|
|
};
|
|
|
|
}
|