Initial commit

main
mat ess 2022-09-09 15:44:37 -04:00
commit f23d3f992e
4 changed files with 94 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.direnv
result

48
flake.lock Normal file
View File

@ -0,0 +1,48 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1661009076,
"narHash": "sha256-phAE40gctVygRq3G3B6LhvD7u2qdQT21xsz8DdRDYFo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "850d8a76026127ef02f040fb0dcfdb8b749dd9d9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1662019588,
"narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2da64a81275b68fdad38af669afeda43d401e94b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

43
flake.nix Normal file
View File

@ -0,0 +1,43 @@
{
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 ];
};
};
};
}