about summary refs log tree commit diff
path: root/nixpkgs/lib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-17 17:44:14 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-17 17:44:14 +0100
commit778336429cc37ad5b0d736336141d09bf227653d (patch)
tree4aa85bd5d87d5bb5fb2c35ab9313987606abca89 /nixpkgs/lib
parent6b8e2555ef013b579cda57025b17d662e0f1fe1f (diff)
parent7d6929828a2d28eda9d37254ff6be3b6819506ca (diff)
downloadnixlib-778336429cc37ad5b0d736336141d09bf227653d.tar
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.gz
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.bz2
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.lz
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.xz
nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.zst
nixlib-778336429cc37ad5b0d736336141d09bf227653d.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/lib')
-rw-r--r--nixpkgs/lib/generators.nix2
-rw-r--r--nixpkgs/lib/tests/release.nix14
-rw-r--r--nixpkgs/lib/types.nix1
3 files changed, 16 insertions, 1 deletions
diff --git a/nixpkgs/lib/generators.nix b/nixpkgs/lib/generators.nix
index 8e93ed04916e..ed59654cc07e 100644
--- a/nixpkgs/lib/generators.nix
+++ b/nixpkgs/lib/generators.nix
@@ -525,6 +525,8 @@ ${expr "" v}
           "(${v.expr})"
         else if v == { } then
           "{}"
+        else if libAttr.isDerivation v then
+          ''"${toString v}"''
         else
           "{${introSpace}${concatItems (
             lib.attrsets.mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v
diff --git a/nixpkgs/lib/tests/release.nix b/nixpkgs/lib/tests/release.nix
index 843180490bb2..96d34be8c2d3 100644
--- a/nixpkgs/lib/tests/release.nix
+++ b/nixpkgs/lib/tests/release.nix
@@ -67,5 +67,17 @@ let
 in
   pkgs.symlinkJoin {
     name = "nixpkgs-lib-tests";
-    paths = map testWithNix nixVersions;
+    paths = map testWithNix nixVersions ++
+
+      #
+      # TEMPORARY MIGRATION MECHANISM
+      #
+      # This comment and the expression which follows it should be
+      # removed as part of resolving this issue:
+      #
+      #   https://github.com/NixOS/nixpkgs/issues/272591
+      #
+      [(import ../../pkgs/test/release {})]
+    ;
+
   }
diff --git a/nixpkgs/lib/types.nix b/nixpkgs/lib/types.nix
index 51e58eaa8ab5..4378568c141f 100644
--- a/nixpkgs/lib/types.nix
+++ b/nixpkgs/lib/types.nix
@@ -67,6 +67,7 @@ let
     ;
   outer_types =
 rec {
+  __attrsFailEvaluation = true;
   isType = type: x: (x._type or "") == type;
 
   setType = typeName: value: value // {