Skip to content

Commit

Permalink
remove reliance on PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmistman committed Aug 31, 2023
1 parent 80eddba commit 4c9c6c3
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pkgs/modules/apl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ in
language = "APL";
extensions = [ ".apl" ];

start = "apl -q --OFF --noCIN -f $file";
start = "${apl}/bin/apl -q --OFF --noCIN -f $file";
fileParam = true;
};
}
6 changes: 4 additions & 2 deletions pkgs/modules/bash/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ pkgs, ... }:

let
bash = pkgs.bashInteractive;

extensions = [ ".bash" ".sh" ];
in

Expand All @@ -9,15 +11,15 @@ in
name = "Bash";

packages = [
pkgs.bashInteractive
bash
];

replit.runners.bash = {
name = "Bash";
language = "bash";
inherit extensions;
fileParam = true;
start = "bash $file";
start = "${bash}/bin/bash $file";
};

replit.languageServers.bash-language-server = {
Expand Down
5 changes: 3 additions & 2 deletions pkgs/modules/basic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
with pkgs;

let
electron-runner = writeShellScriptBin "basic-runner-electron" ''
electron-runner-name = "basic-runner-electron";
electron-runner = writeShellScriptBin electron-runner-name ''
ELECTRON_BASIC_TEMPLATE=''${BASIC_TEMPLATE:-${./template}}
exec ${electron}/bin/electron --no-sandbox $ELECTRON_BASIC_TEMPLATE $@ 2>/dev/null
'';
Expand Down Expand Up @@ -32,7 +33,7 @@ in
name = "Basic on Electron";
language = "basic";
fileParam = true;
start = "basic-runner-electron --ps1 '${replit-prompt}' $file";
start = "${electron-runner}/bin/basic-runner-electron --ps1 '${replit-prompt}' $file";
};

replit.packagers.upmNodejs = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/brainfuck/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ in
name = "brainfuck";
language = "brainfuck";
optionalFileParam = true;
start = "yabi \${file:-main.bf} && echo";
start = "${brainfuck}/bin/yabi \${file:-main.bf} && echo";
};
}
2 changes: 1 addition & 1 deletion pkgs/modules/c/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ in

replit.runners.clang-project = {
name = "Clang: Project";
compile = "clang-compile main.c c all";
compile = "${clang-compile}/bin/clang-compile main.c c all";
fileParam = false;
language = "c";
start = "./main.c.bin";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/clojure/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in
name = "Clojure";
language = "clojure";

start = "clojure -M $file";
start = "${clojure}/bin/clojure -M $file";
fileParam = true;
};

Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ in

replit.runners.clang-project = {
name = "Clang++: Project";
compile = "clang-compile main.cpp cpp all";
compile = "${clang-compile}/bin/clang-compile main.cpp cpp all";
fileParam = false;
language = "cpp";
start = "./main.cpp.bin";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/crystal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in
language = "crystal";
extensions = [ ".cr" ];
fileParam = true;
start = "crystal run $file";
start = "${crystal}/bin/crystal run $file";
};

# TODO: nixpkgs crystalline
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/dart/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in {
name = "dart";
language = "dart";

start = "dart main.dart";
start = "${dart}/bin/dart main.dart";
};

replit.languageServers.dart-pub = {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/modules/deno/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ in
language = "javascript";
inherit extensions;
optionalFileParam = true;
start = "${deno-runner-name} $file";
start = "${deno-runner}/bin/${deno-runner-name} $file";
};

replit.languageServers.deno = {
name = "deno";
language = "javascript";
inherit extensions;
start = "${pkgs.deno}/bin/deno lsp --quiet";
start = "${deno}/bin/deno lsp --quiet";
};
}
2 changes: 1 addition & 1 deletion pkgs/modules/dotnet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in
name = ".NET";
language = "dotnet";

start = "dotnet run";
start = "${dotnet}/bin/dotnet run";
};

replit.languageServers.omni-sharp = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/elisp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ in
language = "elisp";
optionalFileParam = true;
interpreter = true;
start = "${run-prybar-name} $file";
start = "${run-prybar}/bin/${run-prybar-name} $file";
};

replit.runners.elisp-script = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/elixir/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ in
language = "elixir";
inherit extensions;
fileParam = true;
start = "elixir $file";
start = "${elixir}/bin/elixir $file";
};

# TODO: LSP *and* DAP via pkgs.elixir-ls
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/emoticon/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ in
language = "emoticon";
interpreter = true;
fileParam = true;
start = "${run-replbox-name} $file";
start = "${run-replbox}/bin/${run-replbox-name} $file";
};
}
4 changes: 2 additions & 2 deletions pkgs/modules/erlang/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ in
language = "erlang";
inherit extensions;
fileParam = true;
compile = "erlc -o $REPL_HOME/.build $file";
start = "erl -noshell";
compile = "${erlang}/bin/erlc -o $REPL_HOME/.build $file";
start = "${erlang}/bin/erl -noshell";
};

# TODO: LSP via pkgs.erlang-ls
Expand Down

0 comments on commit 4c9c6c3

Please sign in to comment.