Skip to content

Commit

Permalink
feat: Support Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Mar 18, 2024
1 parent 3f53dc9 commit a06105f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
build
build
/node
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ bm-create-pr --target
Add --individual flag to import layer into standalone individual config file, otherwise import into aerial map.
Add --vector flag to import new layer into vector map.

## Development environment

Prerequisite: [Nix](https://nixos.org/download/)

When entering the project directory, run `nix-shell` to activate the development environment.

On initial use, and when `package-lock.json` changes, run `npm i` to install Node.js packages. This will create a `node` executable in the root of the repo which you can use as the IDE interpreter.

## Versioning and Release

To publish a release, the Pull Request opened by `release-please` bot needs to be merged:
Expand Down
18 changes: 18 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
let
pkgs = import (
builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/d934204a0f8d9198e1e4515dd6fec76a139c87f0.tar.gz";
sha256 = "1zfby2jsfkag275aibp81bx1g1cc305qbcy94gqw0g6zki70k1lx";
}
) {};

in
pkgs.mkShell {
packages = [
pkgs.bashInteractive
pkgs.nodejs_20
];
shellHook = ''
ln --force --no-target-directory --symbolic "${pkgs.nodejs}/bin/node" node
'';
}

0 comments on commit a06105f

Please sign in to comment.