Skip to content

Commit 5dbb862

Browse files
committed
avoid building local packages in interpret shells
1 parent 2c50b8b commit 5dbb862

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/command/src/Obelisk/Command/Project.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ mkObNixShellProc root isPure chdirToRoot packageNamesAndPaths shellAttr command
354354
let setCwd_ = if chdirToRoot then setCwd (Just root) else id
355355
pure $ setCwd_ $ nixShellRunProc $ defShellConfig
356356
& nixShellConfig_common . nixCmdConfig_target . target_expr ?~
357-
"{root, pkgs, shell}: let shellPackages = builtins.mapAttrs (name: path: builtins.path { inherit path; name = \"shell-package-${name}\"; }) (builtins.fromJSON pkgs); in ((import root {}).passthru.__unstable__.self.extend (_: _: {shellPackages = shellPackages;})).project.shells.${shell}"
357+
"{root, pkgs, shell}: let shellPackages = builtins.mapAttrs (name: path: builtins.path { inherit path; name = \"shell-package-${name}\"; }) (builtins.fromJSON pkgs); shellNames = builtins.attrNames shellPackages; in ((import root {}).passthru.__unstable__.self.extend (_: _: {shellPackages = shellPackages; shells-ghc = shellNames; shells-ghcjs = shellNames; shells-ghcSavedSplices = shellNames;})).project.shells.${shell}"
358358
& nixShellConfig_common . nixCmdConfig_args .~
359359
[ rawArg "root" $ toNixPath $ if chdirToRoot then "." else root
360360
, strArg "pkgs" (T.unpack $ decodeUtf8 $ BSL.toStrict $ Json.encode packageNamesAndAbsPaths)
@@ -370,8 +370,8 @@ nixShellWithoutPkgs
370370
-> String -- ^ Shell attribute to use (e.g. @"ghc"@, @"ghcjs"@, etc.)
371371
-> Maybe String -- ^ If 'Just' run the given command; otherwise just open the interactive shell
372372
-> m ()
373-
nixShellWithoutPkgs root isPure chdirToRoot packageNamesAndPaths shellAttr command = do
374-
runProcess_ =<< mkObNixShellProc root isPure chdirToRoot packageNamesAndPaths shellAttr command
373+
nixShellWithoutPkgs root isPure chdirToRoot _packageNamesAndPaths shellAttr command = do
374+
runProcess_ =<< mkObNixShellProc root isPure chdirToRoot mempty shellAttr command
375375

376376
nixShellWithHoogle :: MonadObelisk m => FilePath -> Bool -> String -> Maybe String -> m ()
377377
nixShellWithHoogle root isPure shell' command = do

0 commit comments

Comments
 (0)