disko/flake.nix

37 lines
1 KiB
Nix
Raw Normal View History

2022-08-17 12:53:51 +00:00
{
2022-12-09 13:22:45 +00:00
description = "Disko - declarative disk partitioning";
2022-08-17 12:53:51 +00:00
2022-11-06 05:30:18 +00:00
# don't lock to give precedence to a USB live-installer's registry
inputs.nixpkgs.url = "nixpkgs";
2022-08-17 12:53:51 +00:00
2022-12-09 13:22:45 +00:00
outputs = { self, nixpkgs, ... }: let
supportedSystems = [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
2022-10-23 10:29:30 +00:00
nixosModules.disko = import ./module.nix;
2022-08-17 12:53:51 +00:00
lib = import ./. {
inherit (nixpkgs) lib;
};
2022-12-09 13:22:45 +00:00
packages = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
disko = pkgs.callPackage ./package.nix {};
default = self.packages.${system}.disko;
});
# TODO: disable bios-related tests on aarch64...
checks = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
2022-08-25 13:16:26 +00:00
in
2022-08-17 12:53:51 +00:00
# Run tests: nix flake check -L
2022-08-25 13:16:26 +00:00
import ./tests {
inherit pkgs;
2022-08-17 12:53:51 +00:00
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
2022-12-09 13:22:45 +00:00
});
2022-08-17 12:53:51 +00:00
};
}