27 lines
776 B
Nix
27 lines
776 B
Nix
{
|
|
description = "Sample Nix yarn build";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
gitignore = {
|
|
url = "github:hercules-ci/gitignore.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
outputs = { self, nixpkgs, flake-utils, gitignore, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
with pkgs; {
|
|
devShell = mkShell {
|
|
buildInputs = with pkgs; [ nodejs yarn yarn2nix ];
|
|
shellHook = ''
|
|
export PATH="$PWD/node_modules/.bin/:$PATH"
|
|
alias run='npm run'
|
|
alias scripts='jq ".scripts" package.json'
|
|
'';
|
|
};
|
|
});
|
|
}
|