diff --git a/.envrc b/.envrc index 051d09d..3550a30 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -eval "$(lorri direnv)" +use flake diff --git a/README.md b/README.md index b26bcc9..379a0b0 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,16 @@ A Quil sketch designed to ... well, that part is up to you. +## Development Environment + +The repository contains a couple of files that help set up a solid development environment. + +- `flake.nix` and `flake.lock` describe how to set up an environment using [Nix Flakes](https://nixos.wiki/wiki/Flakes). To use those set up `nix` with experimental flake support and run `nix develop`. +- `.envrc` is set up so that the development environment is automatically set up via direnv + ## Usage -LightTable - open `core.clj` and press `Ctrl+Shift+Enter` to evaluate the file. - -Emacs - run cider, open `core.clj` and press `C-c C-k` to evaluate the file. - -REPL - run `(require 'aphorisms.core)`. +There are individual files in `src/aphorisms`, each containing one sketch or variations of the same sketch. ## License diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..fdc39b3 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1623662708, + "narHash": "sha256-70k/89Pr935xNSkUeiLUWavk6fGaFWM+HgClQPHU4YY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "799cdbd8342c5ad3adbede25caf6d544c56f019b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c0248c9 --- /dev/null +++ b/flake.nix @@ -0,0 +1,11 @@ +{ + inputs.nixpkgs.url = github:NixOS/nixpkgs; + + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell.${system} = import ./shell.nix { inherit pkgs; }; + }; +} diff --git a/shell.nix b/shell.nix index ffbb507..7e3cd5d 100644 --- a/shell.nix +++ b/shell.nix @@ -1,9 +1,12 @@ -{ pkgs ? import { }, lib ? pkgs.stdenv.lib }: +{ pkgs ? import { }, }: -pkgs.mkShell rec { +let + lib = pkgs.lib; +in pkgs.mkShell rec { name = "quil-env"; buildInputs = with pkgs; [ xorg_sys_opengl + clojure ]; LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";