nix-packages/flake.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

2022-06-11 12:32:09 +00:00
{
description = "Lottes nix packages";
inputs = {
2022-07-08 10:46:38 +00:00
nixpkgs.url = "github:NixOS/nixpkgs";
2022-06-11 12:32:09 +00:00
flake-utils.url = "github:numtide/flake-utils";
};
2022-06-13 05:53:33 +00:00
outputs = {
self,
nixpkgs,
flake-utils,
...
} @ inputs:
2022-11-27 14:06:17 +00:00
flake-utils.lib.eachSystem ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" "riscv64-linux"] (
2022-06-13 05:53:33 +00:00
system: let
2022-07-03 09:58:04 +00:00
pkgs = import nixpkgs {
inherit system;
2022-09-25 13:57:21 +00:00
config.allowUnfree = true;
2022-07-03 09:58:04 +00:00
};
2022-09-25 13:06:44 +00:00
inherit (pkgs) lib;
nur = import ./default.nix {inherit pkgs;};
packages = lib.filterAttrs (n: _: n != "overlays" && n != "modules" && n != "lib") nur;
2022-06-13 05:53:33 +00:00
in rec {
2022-06-11 12:32:09 +00:00
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
statix
nix-prefetch
2022-06-11 12:32:09 +00:00
];
};
2022-06-11 12:36:59 +00:00
2022-09-25 13:06:44 +00:00
inherit packages;
inherit (nur) overlays modules lib;
2022-06-11 12:36:59 +00:00
2022-06-18 07:56:50 +00:00
hydraJobs =
2022-08-08 07:15:02 +00:00
if (system == "x86_64-linux") || (system == "aarch64-linux")
2022-06-18 07:56:50 +00:00
then {
2022-07-03 09:58:04 +00:00
inherit packages devShells formatter;
2022-06-18 07:56:50 +00:00
}
else {};
2022-06-11 12:32:09 +00:00
}
);
}