love-cellular-automata/flake.nix

44 lines
1.3 KiB
Nix
Raw Normal View History

2022-09-09 19:44:37 +00:00
{
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 = pkgs.mkShell {
name = "love";
packages =
let
love = pkgs.stdenv.mkDerivation {
pname = "love";
version = "11.4";
src = pkgs.fetchzip {
url = "https://github.com/love2d/love/releases/download/11.4/love-11.4-macos.zip";
sha256 = "sha256-1YZVh0fl1sSpdEk+NR+J2IJ6G0rYXwdEuhBPJjhxx5o=";
};
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -r . $out/love.app
ln -s $out/love.app/Contents/MacOS/love $out/bin/love
'';
meta.platforms = pkgs.lib.platforms.darwin;
};
in
[ love ];
};
};
};
}