nix-community / nixpkgs-update

Updating nixpkgs packages since 2018
Creative Commons Zero v1.0 Universal
415 stars 68 forks source link

Literal escapes like `\n` included in package discription #165

Open Synthetica9 opened 4 years ago

Synthetica9 commented 4 years ago

meta.description for circleci-cli is: "Command to enable you to reproduce the CircleCI environment locally and\nrun jobs as if they were running on the hosted CirleCI application.\n"

See: https://github.com/NixOS/nixpkgs/pull/82528

Synthetica9 commented 4 years ago

Seems like the problem is here:

diff --git a/src/Nix.hs b/src/Nix.hs
index 67030c5..8ecfe58 100644
--- a/src/Nix.hs
+++ b/src/Nix.hs
@@ -185,7 +185,7 @@ getIsBroken attrPath =
 getDescription :: MonadIO m => Text -> ExceptT Text m Text
 getDescription attrPath =
   nixEvalET
-    (EvalOptions NoRaw (Env []))
+    (EvalOptions Raw (Env []))
     ( "(let pkgs = import ./. {}; in pkgs."
         <> attrPath
         <> ".meta.description or \"\")"