mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-15 08:46:25 +00:00
Merge pull request #1149 from Enzime/push-lorzxpskntmx
flake: expose docs on Linux as well
This commit is contained in:
commit
814f2c2ab4
2 changed files with 20 additions and 6 deletions
15
flake.nix
15
flake.nix
|
@ -2,10 +2,13 @@
|
|||
description = "A collection of darwin modules";
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-darwin" "x86_64-darwin" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-darwin" "x86_64-darwin" "aarch64-linux" "x86_64-linux" ];
|
||||
forDarwinSystems = nixpkgs.lib.genAttrs [ "aarch64-darwin" "x86_64-darwin" ];
|
||||
|
||||
jobs = forAllSystems (system: import ./release.nix {
|
||||
inherit nixpkgs system;
|
||||
|
||||
nix-darwin = self;
|
||||
});
|
||||
in {
|
||||
lib = {
|
||||
|
@ -58,9 +61,11 @@
|
|||
description = "nix flake init -t nix-darwin";
|
||||
};
|
||||
|
||||
checks = forAllSystems (system: jobs.${system}.tests // jobs.${system}.examples);
|
||||
checks = forDarwinSystems (system: jobs.${system}.tests // jobs.${system}.examples);
|
||||
|
||||
packages = forAllSystems (system: let
|
||||
packages = forAllSystems (system: {
|
||||
inherit (jobs.${system}.docs) manualHTML manpages optionsJSON;
|
||||
} // (nixpkgs.lib.optionalAttrs (nixpkgs.lib.hasSuffix "darwin" system) (let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
|
@ -69,8 +74,6 @@
|
|||
default = self.packages.${system}.darwin-rebuild;
|
||||
|
||||
inherit (pkgs) darwin-option darwin-rebuild darwin-version darwin-uninstaller;
|
||||
|
||||
inherit (jobs.${system}.docs) manualHTML manpages optionsJSON;
|
||||
});
|
||||
})));
|
||||
};
|
||||
}
|
||||
|
|
11
release.nix
11
release.nix
|
@ -1,4 +1,6 @@
|
|||
{ nixpkgs ? <nixpkgs>
|
||||
# Adapted from https://github.com/NixOS/nixpkgs/blob/e818264fe227ad8861e0598166cf1417297fdf54/pkgs/top-level/release.nix#L11
|
||||
, nix-darwin ? { }
|
||||
, system ? builtins.currentSystem
|
||||
, supportedSystems ? [ "x86_64-darwin" "aarch64-darwin" ]
|
||||
, scrubJobs ? true
|
||||
|
@ -56,6 +58,15 @@ let
|
|||
|
||||
manual = buildFromConfig ({ lib, config, ... }: {
|
||||
system.stateVersion = lib.mkDefault config.system.maxStateVersion;
|
||||
|
||||
system.darwinVersionSuffix = let
|
||||
shortRev = nix-darwin.shortRev or nix-darwin.dirtyShortRev or null;
|
||||
in
|
||||
lib.mkIf (shortRev != null) ".${shortRev}";
|
||||
system.darwinRevision = let
|
||||
rev = nix-darwin.rev or nix-darwin.dirtyRev or null;
|
||||
in
|
||||
lib.mkIf (rev != null) rev;
|
||||
}) (config: config.system.build.manual);
|
||||
|
||||
in {
|
||||
|
|
Loading…
Add table
Reference in a new issue