adapt shell.nix
This commit is contained in:
23
shell.nix
23
shell.nix
@@ -1,16 +1,19 @@
|
|||||||
{ nixpkgs ? import <nixpkgs> { } }:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = [
|
nixpkgs = fetchTarball {
|
||||||
nixpkgs.nodejs
|
name = "nixpkgs";
|
||||||
];
|
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz";
|
||||||
|
sha256 = "1ckzhh24mgz6jd1xhfgx0i9mijk6xjqxwsshnvq789xsavrmsc36";
|
||||||
|
};
|
||||||
|
pkgs = import nixpkgs {};
|
||||||
in
|
in
|
||||||
nixpkgs.stdenv.mkDerivation {
|
pkgs.mkShell {
|
||||||
name = "env";
|
name = "env";
|
||||||
buildInputs = pkgs;
|
buildInputs = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
PATH=./node_modules/.bin:$PATH
|
PATH=./node_modules/.bin:$PATH
|
||||||
command -v tree-sitter >/dev/null 2>&1 || npm install tree-sitter-cli
|
command -v tree-sitter >/dev/null 2>&1 || npm install tree-sitter-cli
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user