love-cellular-automata/flake.nix

33 lines
990 B
Nix

{
description = "cellular automata experiments written in lua with löve";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit self; } {
imports = [ ];
systems = [ "x86_64-linux" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
devShells.default =
let
pkgs' = import ./nix { inherit pkgs; };
inherit (pkgs') love lume lurker;
in
pkgs.mkShell {
LUA_PATH = "vendor/?.lua;;";
name = "love";
packages = [ love ];
shellHook = ''
mkdir -p vendor
ln -snf ${lume}/lume.lua vendor/lume.lua
ln -snf ${lurker}/lurker.lua vendor/lurker.lua
'';
};
};
};
}