mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-28 02:37:09 +00:00
flake: expose jobs
from release.nix
as a flattened attrset
This commit is contained in:
parent
c13549d7a6
commit
68637ee7db
4 changed files with 15 additions and 24 deletions
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
|
@ -19,8 +19,8 @@ jobs:
|
|||
with:
|
||||
install_url: https://releases.nixos.org/nix/nix-2.18.8/install
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A tests
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A manpages
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples.simple
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A docs
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples
|
||||
|
||||
test-unstable:
|
||||
runs-on: macos-13
|
||||
|
@ -32,8 +32,8 @@ jobs:
|
|||
with:
|
||||
install_url: https://releases.nixos.org/nix/nix-2.24.9/install
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A tests
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A manpages
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples.simple
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A docs
|
||||
- run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples
|
||||
|
||||
install-against-stable:
|
||||
runs-on: macos-13
|
||||
|
|
2
.github/workflows/update-manual.yml
vendored
2
.github/workflows/update-manual.yml
vendored
|
@ -21,7 +21,7 @@ jobs:
|
|||
|
||||
- name: Build manual
|
||||
run: |
|
||||
nix-build ./release.nix -I nixpkgs=channel:nixpkgs-24.05-darwin -I darwin=. -A manualHTML
|
||||
nix build .#manualHTML --override-input nixpkgs nixpkgs/nixpkgs-24.05-darwin
|
||||
|
||||
- name: Push update to manual
|
||||
run: |
|
||||
|
|
23
flake.nix
23
flake.nix
|
@ -1,9 +1,12 @@
|
|||
{
|
||||
# WARNING this is very much still experimental.
|
||||
description = "A collection of darwin modules";
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-darwin" "x86_64-darwin" ];
|
||||
|
||||
jobs = forAllSystems (system: import ./release.nix {
|
||||
inherit nixpkgs system;
|
||||
});
|
||||
in {
|
||||
lib = {
|
||||
evalConfig = import ./eval-config.nix;
|
||||
|
@ -55,21 +58,7 @@
|
|||
description = "nix flake init -t nix-darwin";
|
||||
};
|
||||
|
||||
checks = forAllSystems (system: let
|
||||
simple = self.lib.darwinSystem {
|
||||
modules = [
|
||||
self.darwinModules.simple
|
||||
{ nixpkgs.hostPlatform = system; }
|
||||
];
|
||||
};
|
||||
in {
|
||||
simple = simple.system;
|
||||
|
||||
inherit (simple.config.system.build.manual)
|
||||
optionsJSON
|
||||
manualHTML
|
||||
manpages;
|
||||
});
|
||||
checks = forAllSystems (system: jobs.${system}.tests // jobs.${system}.examples);
|
||||
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -80,6 +69,8 @@
|
|||
default = self.packages.${system}.darwin-rebuild;
|
||||
|
||||
inherit (pkgs) darwin-option darwin-rebuild darwin-version darwin-uninstaller;
|
||||
|
||||
inherit (jobs.${system}.docs) manualHTML manpages optionsJSON;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -59,9 +59,9 @@ let
|
|||
}) (config: config.system.build.manual);
|
||||
|
||||
in {
|
||||
manualHTML = manual.manualHTML;
|
||||
manpages = manual.manpages;
|
||||
options = manual.optionsJSON;
|
||||
docs = {
|
||||
inherit (manual) manualHTML manpages optionsJSON;
|
||||
};
|
||||
|
||||
examples.hydra = makeSystem ./modules/examples/hydra.nix;
|
||||
examples.lnl = makeSystem ./modules/examples/lnl.nix;
|
||||
|
|
Loading…
Add table
Reference in a new issue