Add `nixpkgs-derivation*'; use it in the distro.
[jackhill/guix/guix.git] / guix / utils.scm
index 3d92bac..66563c7 100644 (file)
@@ -43,6 +43,7 @@
 
             %nixpkgs-directory
             nixpkgs-derivation
+            nixpkgs-derivation*
 
             define-record-type*
             compile-time-value
@@ -457,6 +458,10 @@ starting from the right of S."
          (not (eof-object? l))
          l)))
 
+(define-syntax-rule (nixpkgs-derivation* attribute)
+  "Evaluate the given Nixpkgs derivation at compile-time."
+  (compile-time-value (nixpkgs-derivation attribute)))
+
 \f
 ;;;
 ;;; Miscellaneous.