1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-04-08 18:20:48 +00:00

Merge pull request from hercules-ci/fix-doc-revision

Fix doc revision eval error
This commit is contained in:
Domen Kožar 2023-06-30 18:22:09 +01:00 committed by GitHub
commit 48b07e266b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions
default.nix
modules/documentation

View file

@ -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 {

View file

@ -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 {