mineschemer/flake.nix
mehbark 86806ff5a0 okay you can run it now!
nix is nice still, i was doing something dumb
2023-12-24 13:43:16 -05:00

42 lines
1.2 KiB
Nix

# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.9)
{
inputs = {
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
};
outputs = { self, flake-schemas, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in {
schemas = flake-schemas.schemas;
packages = forEachSupportedSystem ({ pkgs }: {
default = pkgs.writeShellScriptBin "mineschemer" ''
LD_LIBRARY_PATH="${pkgs.raylib}/lib" \
${pkgs.chez}/bin/scheme \
--script ${./main.scm} \
${./skins/classic.bmp} \
$@
'';
});
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nixpkgs-fmt
chez
raylib
];
LD_LIBRARY_PATH="${pkgs.raylib}/lib";
# not necessary
LIBRARY_PATH="${pkgs.raylib}/include";
};
});
};
}