Files
haskengl/package.nix
mtgmonkey 23498c064a init
2025-11-26 01:34:43 +01:00

44 lines
967 B
Nix

{
haskellPackages,
lib,
stdenv,
pkgs,
...
}: let
ghcExeOptions = "-Wall -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N";
ghcPackages = p: [
p.OpenGL
p.GLFW-b
];
in
stdenv.mkDerivation {
pname = "haskengl";
version = "0.1.0";
src = ./src;
nativeBuildInputs = [
(haskellPackages.ghcWithPackages ghcPackages)
pkgs.libGL
pkgs.libGLU
];
buildInputs = [
pkgs.libGL
pkgs.libGLU
];
configurePhase = ''
'';
buildPhase = ''
ghc ${ghcExeOptions} ./Main.hs -o ./Main
'';
installPhase = ''
mkdir -p $out/bin
cp ./Main $out/bin/haskengl
'';
meta = {
homepage = "https://mtgmonkey.net";
license = lib.licenses.wtfpl;
mainProgram = "haskengl";
platforms = ["x86_64-linux"];
};
}