on master help sign in
Always specify 'default.nix' when using obelisk project nix shells
commit9f44a92de2eaef9d53838289d489c14a813d655b authorAlexandre Esteves <alexandre.fmp.esteves@gmail.com> dateSat 14 Sep 2019, 15:43 (7 years ago) parentf02b2c3
4 files changed+4−2
lib/command/src/Obelisk/Command/Deploy.hs+1−1 lib/command/src/Obelisk/Command/Project.hs+1 lib/selftest/src/Obelisk/SelfTest.hs+1−1 skeleton/shell.nix+1
lib/command/src/Obelisk/Command/Deploy.hs+1−1
@@ -275,7 +275,7 @@ instance ToJSON KeytoolConfig
275275createKeystore :: MonadObelisk m => FilePath -> KeytoolConfig -> m ()
276276createKeystore root config = do
277277 let expr = "with (import " <> toImplDir root <> ").reflex-platform.nixpkgs; pkgs.mkShell { buildInputs = [ pkgs.jdk ]; }"
278− callProcessAndLogOutput (Notice,Notice) $ (proc "nix-shell" ["-E" , expr, "--run" , keytoolCmd]) { cwd = Just root }
278+ callProcessAndLogOutput (Notice,Notice) $ (proc "nix-shell" ["default.nix", "-E" , expr, "--run" , keytoolCmd]) { cwd = Just root }
279279 where
280280 keytoolCmd = processToShellString "keytool"
281281 [ "-genkeypair", "-noprompt"
lib/command/src/Obelisk/Command/Project.hs+1
@@ -205,6 +205,7 @@ inImpureProjectShell shellName command = withProjectRoot "." $ \root ->
205205projectShell :: MonadObelisk m => FilePath -> Bool -> String -> Maybe String -> m ()
206206projectShell root isPure shellName command = do
207207 (_, _, _, ph) <- createProcess_ "runNixShellAttr" $ setCtlc $ setCwd (Just root) $ proc "nix-shell" $
208+ [ "default.nix"] <>
208209 [ "--pure" | isPure ] <>
209210 [ "-A"
210211 , "shells." <> shellName
lib/selftest/src/Obelisk/SelfTest.hs+1−1
@@ -162,7 +162,7 @@ main = do
162162 forM_ ["ghc", "ghcjs"] $ \compiler -> do
163163 let
164164 shell = "shells." <> compiler
165− inShell cmd' = run "nix-shell" ["-A", fromString shell, "--run", cmd']
165+ inShell cmd' = run "nix-shell" ["default.nix", "-A", fromString shell, "--run", cmd']
166166 it ("can enter " <> shell) $ inTmpObInit $ \_ -> inShell "exit"
167167 it ("can build in " <> shell) $ inTmpObInit $ \_ -> inShell $ "cabal new-build --" <> fromString compiler <> " all"
168168
skeleton/shell.nixnew file+1
@@ -0,0 +1 @@
1+(import ./. {}).shells.ghc