From 6440e573b550d11f2592d26f7a1eb4ac8bef5127 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Thu, 12 Dec 2024 03:11:45 -0800 Subject: [PATCH] macOS fixes --- modules/shells/zsh/default.nix | 7 +++++-- sample_environments/mega.nix | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/shells/zsh/default.nix b/modules/shells/zsh/default.nix index d80bf8d..c4afcc9 100644 --- a/modules/shells/zsh/default.nix +++ b/modules/shells/zsh/default.nix @@ -9,6 +9,10 @@ let extraPaths = lib.optionals (!stdenv.targetPlatform.isDarwin) [glibc.bin]; + pathPrefixArg = if extraPaths == [] + then "" + else "--prefix PATH : ${lib.makeBinPath extraPaths}"; + in stdenv.mkDerivation { @@ -36,8 +40,7 @@ stdenv.mkDerivation { # Source the user's .zshrc if present echo "[ -f ~/.zshrc ] && source ~/.zshrc" >> .zshrc - makeWrapper ${zsh}/bin/zsh $out/bin/zsh-with-theme \ - --prefix PATH : ${lib.makeBinPath extraPaths} + makeWrapper ${zsh}/bin/zsh $out/bin/zsh-with-theme ${pathPrefixArg} \ --set ZDOTDIR $out ''; diff --git a/sample_environments/mega.nix b/sample_environments/mega.nix index 2be9914..eb43570 100644 --- a/sample_environments/mega.nix +++ b/sample_environments/mega.nix @@ -29,7 +29,7 @@ codedown.makeEnvironment { kernels.haskell.lsp.haskell-language-server.debug = true; kernels.octave.enable = true; - kernels.octave.packages = ["arduino"]; + kernels.octave.packages = ["doctest"]; kernels.octave.extraJupyterConfig = '' c.OctaveKernel.plot_settings = dict(format='svg') '';