This commit is contained in:
mtgmonkey
2025-11-28 21:36:04 +01:00
commit d419b0f40d
5 changed files with 90 additions and 0 deletions

37
package.nix Normal file
View File

@@ -0,0 +1,37 @@
{
haskellPackages,
lib,
stdenv,
...
}: let
ghcExeOptions = "-O -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.relude
];
in
stdenv.mkDerivation {
pname = "hs-glsl";
version = "0.1.0";
src = ./src;
nativeBuildInputs = [
(haskellPackages.ghcWithPackages ghcPackages)
];
buildInputs = [
];
configurePhase = ''
'';
buildPhase = ''
ghc ${ghcExeOptions} ./Main.hs -o ./Main
'';
installPhase = ''
mkdir -p $out/bin
cp ./Main $out/bin/hs-glsl
'';
meta = {
homepage = "https://mtgmonkey.net";
license = lib.licenses.wtfpl;
mainProgram = "hs-glsl";
platforms = ["x86_64-linux"];
};
}