forked from TuanManhCao/digital-garden
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
25 lines (24 loc) · 791 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
corepack = with pkgs; stdenv.mkDerivation {
name = "corepack";
buildInputs = [ pkgs.nodejs-slim ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
corepack enable --install-directory=$out/bin
'';
};
in
{
devShells.default = with pkgs; mkShell {
packages = [ bashInteractive corepack ];
};
});
}