diff --git a/README.md b/README.md index a21d7f8..01f5b9a 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,28 @@ Hopefully a more comprehensive guide will be written at some point, but for now ## Contributing -1. [Install required dependencies](https://luckyframework.org/guides/getting-started/installing#install-required-dependencies) +1. Install required dependencies (see sub-sections below) 1. Run `script/setup` 1. Run `lucky dev` to start the app 1. [Send a patch](https://man.sr.ht/git.sr.ht/#sending-patches-upstream) to `~edwardloveall/Scribe@lists.sr.ht` (yes that's an email address). * To be honest, I'm not sure how I feel about the send patch git workflow as opposed to the GitHub style pull request workflow. I'm trying it out for now. If you can't figure it out, get in contact and we can figure out a way to get your contributions in. +### Installing dependencies + +General instructions for installing Lucky and its dependencies can be found at . + +### Installing dependencies with Nix + +If you are using the [Nix](https://nixos.org/) package manager, you can get a shell with all dependencies with the following command(s): + +``` shell +nix-shell + +# Or if you are using the (still experimental) Nix Flakes feature +nix flake update # Update dependencies (optional) +nix develop +``` + ### Learning Lucky Lucky uses the [Crystal](https://crystal-lang.org) programming language. You can learn about Lucky from the [Lucky Guides](https://luckyframework.org/guides/getting-started/why-lucky). diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c6658b2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,41 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1631561581, + "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1634282420, + "narHash": "sha256-YOI78SSF4Q/ZFoEgfO8Xy3EnjCW/F9VgB2Qz9YljzhI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0a68ef410b40f49de76aecb5c8b5cc5111bac91d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..390bccc --- /dev/null +++ b/flake.nix @@ -0,0 +1,8 @@ +{ + inputs = { flake-utils.url = "github:numtide/flake-utils"; }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { devShell = import ./shell.nix { inherit pkgs; }; }); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..06da585 --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +{ pkgs ? import { } }: + +pkgs.mkShell { + shellHook = '' + export PKG_CONFIG_PATH=${pkgs.openssl.dev}/lib/pkgconfig + ''; + buildInputs = with pkgs; [ + crystal + lucky-cli + overmind + nodejs + openssl.dev + postgresql + shards + yarn + ]; +}