-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Nix flake for development (#199)
- Loading branch information
1 parent
864ec25
commit 0b54630
Showing
4 changed files
with
292 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake . --impure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
description = "Conference Bot"; | ||
|
||
inputs = { | ||
utils.url = "github:numtide/flake-utils"; | ||
nixpkgs.url = "nixpkgs/nixos-23.05"; | ||
devenv.url = "github:cachix/devenv/v0.6.3"; | ||
}; | ||
|
||
outputs = inputs @ { self, nixpkgs, utils, devenv }: | ||
utils.lib.eachDefaultSystem (system: let | ||
pkgs = nixpkgs.legacyPackages."${system}"; | ||
in rec { | ||
# `nix develop` | ||
devShell = devenv.lib.mkShell { | ||
inherit inputs pkgs; | ||
modules = [ | ||
{ | ||
languages = { | ||
javascript.enable = true; | ||
typescript.enable = true; | ||
}; | ||
|
||
env = { | ||
# Work around 'digital envelope routines::unsupported' | ||
# source: https://stackoverflow.com/a/75536711 | ||
NODE_OPTIONS = "--openssl-legacy-provider"; | ||
}; | ||
|
||
packages = with pkgs; [ | ||
yarn | ||
]; | ||
} | ||
]; | ||
}; | ||
}); | ||
} |