From c8b6a598d3e24055fb0adaae80333b0189a8d007 Mon Sep 17 00:00:00 2001 From: mhoffm Date: Sun, 13 Jun 2021 14:27:31 +0200 Subject: [PATCH] adapt shell.nix --- shell.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/shell.nix b/shell.nix index fa0c01f..b5ec4f9 100644 --- a/shell.nix +++ b/shell.nix @@ -1,16 +1,19 @@ -{ nixpkgs ? import { } }: - let - pkgs = [ - nixpkgs.nodejs - ]; - + nixpkgs = fetchTarball { + name = "nixpkgs"; + url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz"; + sha256 = "1ckzhh24mgz6jd1xhfgx0i9mijk6xjqxwsshnvq789xsavrmsc36"; + }; + pkgs = import nixpkgs {}; in - nixpkgs.stdenv.mkDerivation { + pkgs.mkShell { name = "env"; - buildInputs = pkgs; + buildInputs = with pkgs; [ + nodejs + ]; shellHook = '' - PATH=./node_modules/.bin:$PATH - command -v tree-sitter >/dev/null 2>&1 || npm install tree-sitter-cli +PATH=./node_modules/.bin:$PATH +command -v tree-sitter >/dev/null 2>&1 || npm install tree-sitter-cli ''; } +