Migrate to use nix flakes

This commit is contained in:
arne 2021-06-14 11:41:16 +02:00
commit 54864dbac2
5 changed files with 50 additions and 7 deletions

2
.envrc
View file

@ -1 +1 @@
eval "$(lorri direnv)"
use flake

View file

@ -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

26
flake.lock generated Normal file
View file

@ -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
}

11
flake.nix Normal file
View file

@ -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; };
};
}

View file

@ -1,9 +1,12 @@
{ pkgs ? import <nixpkgs> { }, lib ? pkgs.stdenv.lib }:
{ pkgs ? import <nixpkgs> { }, }:
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}";