disko/flake.nix

37 lines
1.0 KiB
Nix
Raw Normal View History

2022-08-17 15:53:51 +03:00
{
2022-12-09 16:22:45 +03:00
description = "Disko - declarative disk partitioning";
2022-08-17 15:53:51 +03:00
2022-11-06 08:30:18 +03:00
# don't lock to give precedence to a USB live-installer's registry
inputs.nixpkgs.url = "nixpkgs";
2022-08-17 15:53:51 +03:00
2022-12-09 16:22:45 +03:00
outputs = { self, nixpkgs, ... }: let
supportedSystems = [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
2022-10-23 13:29:30 +03:00
nixosModules.disko = import ./module.nix;
2022-08-17 15:53:51 +03:00
lib = import ./. {
inherit (nixpkgs) lib;
};
2022-12-09 16:22:45 +03: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 16:16:26 +03:00
in
2022-08-17 15:53:51 +03:00
# Run tests: nix flake check -L
2022-08-25 16:16:26 +03:00
import ./tests {
inherit pkgs;
2022-08-17 15:53:51 +03:00
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
2022-12-09 16:22:45 +03:00
});
2022-08-17 15:53:51 +03:00
};
}