Skip to content

Commit

Permalink
feat: Support Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Sep 24, 2024
1 parent f1b559c commit f7cbc13
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
build
json-schema-cache
json-schema-cache
/node
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,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
17 changes: 17 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
let
pkgs = import (builtins.fetchTarball {
name = "nixos-unstable-2024-09-17";
url = "https://github.com/nixos/nixpkgs/archive/345c263f2f53a3710abe117f28a5cb86d0ba4059.tar.gz";
sha256 = "1llzyzw7a0jqdn7p3px0sqa35jg24v5pklwxdybwbmbyr2q8cf5j";
}) { };
nodejs = pkgs.nodejs;
in
pkgs.mkShell {
packages = [
pkgs.bashInteractive
nodejs
];
shellHook = ''
ln --force --no-target-directory --symbolic "${nodejs}/bin/node" node
'';
}

0 comments on commit f7cbc13

Please sign in to comment.