| { pkgs, ... }: let |
| |
| signageForPkgs = pkgs: with { inherit (pkgs) love fetchFromGitHub stdenv curl; }; let |
| # Build LÖVE2D 12, currently still in development. This gives us https |
| # support. |
| love12 = (love.overrideAttrs (oa: { |
| version = "12.0-dev"; |
| src = fetchFromGitHub { |
| owner = "love2d"; |
| repo = "love"; |
| rev = "d586d1847446f5212d5f7e9efb94e50fcfba7d77"; |
| sha256 = "sha256-gTpVtyqXV6/GsezuCpooaY+x5tPfOF9p1b83v4kKR4E="; |
| }; |
| makeFlags = [ |
| "CPPFLAGS=-DHTTPS_BACKEND_CURL" |
| ]; |
| buildInputs = oa.buildInputs ++ [ curl ]; |
| NIX_LDFLAGS = "-lcurl"; |
| enableParallelBuilding = true; |
| })); |
| |
| signage = stdenv.mkDerivation { |
| name = "signage"; |
| src = ./.; |
| |
| installPhase = '' |
| mkdir -p $out/share/signage |
| cp -rv $src/* $out/share/signage/ |
| |
| mkdir -p $out/bin/ |
| cat <<EOF >$out/bin/signage |
| #!/usr/bin/env bash |
| ${love12}/bin/love $out/share/signage |
| EOF |
| chmod +x $out/bin/signage |
| ''; |
| |
| passthru.runtime = love12; |
| }; |
| in signage; |
| |
| in { |
| prod = signageForPkgs pkgs; |
| local = signageForPkgs (import <nixpkgs> {}); |
| } |