From dcfdb79b0984169e60142e52616b4cc3fe9908fc Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 9 Oct 2021 14:37:58 +0200 Subject: [PATCH] lib.{literalExpression, literalDocBook}: init as shims Compatibility shims for https://github.com/NixOS/nixpkgs/pull/136909 --- lib/default.nix | 4 ++-- lib/options.nix | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index ccae0bbc3ab..1a4c2c6d556 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -123,8 +123,8 @@ let inherit (self.options) isOption mkEnableOption mkSinkUndeclaredOptions mergeDefaultOption mergeOneOption mergeEqualOption getValues getFiles optionAttrSetToDocList optionAttrSetToDocList' - scrubOptionValue literalExample showOption showFiles - unknownModule mkOption; + scrubOptionValue literalExpression literalExample literalDocBook + showOption showFiles unknownModule mkOption; inherit (self.types) isType setType defaultTypeMerge defaultFunctor isOptionType mkOptionType; inherit (self.asserts) diff --git a/lib/options.nix b/lib/options.nix index 87cd8b79796..e8a020c8bf4 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -217,6 +217,10 @@ rec { */ literalExample = text: { _type = "literalExample"; inherit text; }; + # Compatibility shims for https://github.com/NixOS/nixpkgs/pull/136909 + literalExpression = literalExample; + literalDocBook = literalExample; + # Helper functions. /* Convert an option, described as a list of the option parts in to a