mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-08 18:20:48 +00:00
Merge pull request #717 from hercules-ci/fix-doc-revision
Fix doc revision eval error
This commit is contained in:
commit
48b07e266b
2 changed files with 16 additions and 3 deletions
|
@ -10,10 +10,15 @@ let
|
|||
|
||||
eval = evalConfig {
|
||||
inherit system;
|
||||
modules = [ configuration ];
|
||||
modules = [ configuration nixpkgsRevisionModule ];
|
||||
inputs = { inherit nixpkgs; };
|
||||
};
|
||||
|
||||
nixpkgsRevisionModule =
|
||||
if nixpkgs?rev && lib.isString nixpkgs.rev
|
||||
then { system.nixpkgsRevision = nixpkgs.rev; }
|
||||
else { };
|
||||
|
||||
# The source code of this repo needed by the [un]installers.
|
||||
nix-darwin = lib.cleanSource (
|
||||
lib.cleanSourceWith {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, baseModules, modules, ... }:
|
||||
toplevel@{ config, lib, pkgs, baseModules, modules, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -25,7 +25,15 @@ let
|
|||
inherit pkgs config;
|
||||
version = config.system.darwinVersion;
|
||||
revision = config.system.darwinRevision;
|
||||
nixpkgsRevision = config.system.nixpkgsRevision;
|
||||
nixpkgsRevision =
|
||||
if toplevel.options.system.nixpkgsRevision.isDefined
|
||||
then config.system.nixpkgsRevision
|
||||
|
||||
# If user does not use flakes and does not add rev to nixpkgs, we don't
|
||||
# know which revision or even branch they're on. In this case we still want
|
||||
# to link somewhere, so we hope that master hasn't changed too much.
|
||||
else "master";
|
||||
|
||||
options =
|
||||
let
|
||||
scrubbedEval = evalModules {
|
||||
|
|
Loading…
Add table
Reference in a new issue