Escape channel name
This commit is contained in:
parent
0fcabdd3ea
commit
09fc18233b
|
@ -45,7 +45,7 @@ self: super: {
|
||||||
|
|
||||||
getNivPath :: Text -> Text -> IO Text
|
getNivPath :: Text -> Text -> IO Text
|
||||||
getNivPath sources channel = do
|
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
|
nix_build ["-Q", "-E", expression, "--no-out-link"] &> devNull
|
||||||
escaped <- nix_instantiate ["--eval" :: String, "-E", [i|toString #{expression}|]] |> captureTrim
|
escaped <- nix_instantiate ["--eval" :: String, "-E", [i|toString #{expression}|]] |> captureTrim
|
||||||
pure . Text.dropAround ('"' ==) . decodeUtf8 . trim $ escaped
|
pure . Text.dropAround ('"' ==) . decodeUtf8 . trim $ escaped
|
||||||
|
|
Loading…
Reference in a new issue