disko/flake.nix

39 lines
1.2 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-12-23 16:25:47 +00:00
# FIXME: in future we don't want lock here to give precedence to a USB live-installer's registry,
# but garnix currently does not allow this.
#inputs.nixpkgs.url = "nixpkgs";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
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
};
}