restore backup and add opencode support
This commit is contained in:
20
shell.nix
20
shell.nix
@@ -1,9 +1,9 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/20.09.tar.gz") {} }:
|
||||
|
||||
let
|
||||
lib = import <nixpkgs/lib>;
|
||||
buildNodeJs = pkgs.callPackage "${<nixpkgs>}/pkgs/development/web/nodejs/nodejs.nix" {
|
||||
python = pkgs.python3;
|
||||
buildNodeJs = pkgs.callPackage "${pkgs.path}/pkgs/development/web/nodejs/nodejs.nix" {
|
||||
python = pkgs.python27Full;
|
||||
};
|
||||
|
||||
nodejsVersion = lib.fileContents ./.nvmrc;
|
||||
@@ -14,12 +14,18 @@ let
|
||||
sha256 = "032801kg24j04xmf09m0vxzlcz86sv21s24lv9l4cfv08k1c4byp";
|
||||
};
|
||||
|
||||
# Overlay to use custom nodejs for nodePackages
|
||||
customPkgs = pkgs // { inherit nodejs; };
|
||||
NPM_CONFIG_PREFIX = toString ./npm_config_prefix;
|
||||
|
||||
in customPkgs.mkShell {
|
||||
buildInputs = with customPkgs; [
|
||||
in pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
nodejs
|
||||
nodePackages."@angular/cli"
|
||||
];
|
||||
|
||||
inherit NPM_CONFIG_PREFIX;
|
||||
|
||||
shellHook = ''
|
||||
export PATH="${NPM_CONFIG_PREFIX}/bin:$PATH"
|
||||
echo "Node version: $(node --version)"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user