diff --git a/src/FlakeTemplate.hs b/src/FlakeTemplate.hs index 3060649..e0af2e1 100644 --- a/src/FlakeTemplate.hs +++ b/src/FlakeTemplate.hs @@ -24,4 +24,6 @@ flakeTemplate = [r|{ devShells.default = import ./shell.nix { $shell_args;separator=' '$ }; } ); -}|] +} + +|] diff --git a/src/ShellifyTemplate.hs b/src/ShellifyTemplate.hs index 1a549b0..77d307b 100644 --- a/src/ShellifyTemplate.hs +++ b/src/ShellifyTemplate.hs @@ -17,4 +17,5 @@ $if(shell_hook)$ ''; $endif$ } + |] diff --git a/test/TestHelpers.hs b/test/TestHelpers.hs index 2b928c8..1a3812b 100644 --- a/test/TestHelpers.hs +++ b/test/TestHelpers.hs @@ -136,11 +136,7 @@ theOptions = options "nix-shellify" . words instance Show Options readNixTemplate :: FilePath -> IO Text -readNixTemplate fileName = - stripTrailingNewline <$> readFile ("test/outputs/" <> fileName) - where stripTrailingNewline f = bool id stripLastChar (lastCharIsNewline f) f - lastCharIsNewline = (== '\n') . last - stripLastChar = reverse . tail . reverse +readNixTemplate fileName = readFile ("test/outputs/" <> fileName) flakeFile = (<> "-flake.nix") shellFile = (<> "-shell.nix")