mirror of
https://github.com/RGBCube/hjem
synced 2025-10-17 07:02:25 +00:00
flake: export smfh package as an output
This commit is contained in:
parent
d5bf1fd8f3
commit
272de1a114
1 changed files with 15 additions and 3 deletions
18
flake.nix
18
flake.nix
|
@ -12,6 +12,9 @@
|
|||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
# We should only specify the modules Hjem explicitly supports, or we risk
|
||||
# allowing not-so-defined behaviour. For example, adding nix-systems should
|
||||
# be avoided, because it allows specifying Hjem is not tested on.
|
||||
forAllSystems = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"];
|
||||
in {
|
||||
nixosModules = {
|
||||
|
@ -19,18 +22,27 @@
|
|||
default = self.nixosModules.hjem;
|
||||
};
|
||||
|
||||
packages = forAllSystems (system: {
|
||||
# Expose the 'smfh' instance used by Hjem as a package in the Hjem flake
|
||||
# outputs. This allows consuming the exact copy of smfh used by Hjem.
|
||||
smfh = inputs.smfh.packages.${system}.smfh;
|
||||
});
|
||||
|
||||
checks = forAllSystems (system: let
|
||||
checkArgs = {
|
||||
inherit self inputs;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
};
|
||||
in {
|
||||
# Build the 'smfh' package as a part of Hjem's test suite.
|
||||
# If 'nix flake check' is ran in the CI, this might inflate build times
|
||||
# *a lot*.
|
||||
inherit (self.packages.${system}) smfh;
|
||||
|
||||
# Hjem Integration Tests
|
||||
hjem-basic = import ./tests/basic.nix checkArgs;
|
||||
hjem-special-args = import ./tests/special-args.nix checkArgs;
|
||||
hjem-linker = import ./tests/linker.nix checkArgs;
|
||||
|
||||
# Build smfh as a part of 'nix flake check'
|
||||
smfh = inputs.smfh.packages.${system}.smfh;
|
||||
});
|
||||
|
||||
devShells = forAllSystems (system: let
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue