1
0
Fork 0

Escape channel name

This commit is contained in:
Malte Brandy 2020-12-07 03:41:46 +01:00
parent 0fcabdd3ea
commit 09fc18233b

View file

@ -45,7 +45,7 @@ self: super: {
getNivPath :: Text -> Text -> IO Text
getNivPath sources channel = do
let expression = [i|(import #{sources}/nix/sources.nix).#{channel}|] :: String
let expression = [i|(import #{sources}/nix/sources.nix)."#{channel}"|] :: String
nix_build ["-Q", "-E", expression, "--no-out-link"] &> devNull
escaped <- nix_instantiate ["--eval" :: String, "-E", [i|toString #{expression}|]] |> captureTrim
pure . Text.dropAround ('"' ==) . decodeUtf8 . trim $ escaped