reorganisierung

This commit is contained in:
mtgmonkey
2025-11-30 18:31:17 +01:00
parent 00f69fcbb1
commit 117eb61428
4 changed files with 27 additions and 5 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "lib/hs-glsl"]
path = lib/hs-glsl
url = https://git.mtgmonkey.net/Andromeda/hs-glsl

View File

@@ -1,6 +1,7 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
self.submodules = true;
};
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";

1
lib/hs-glsl Submodule

Submodule lib/hs-glsl added at 2bc1cab2af

View File

@@ -4,10 +4,27 @@
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";
ghcExeOptions = lib.concatStringsSep " " ghcFlags;
ghcFlags = [
"-O"
"-Wall"
"-Widentities"
"-Widentities"
"-Wincomplete-record-updates"
"-Wincomplete-uni-patterns"
"-Wmissing-export-lists"
"-Wmossing-home-modules"
"-Wpartial-fields"
"-Wredundant-constraints"
"-threaded"
"-rtsopts"
"-with-rtsopts=-N"
# hs-glsl
"-i./lib/hs-glsl/src/Language/GLSL.hs"
# src
"-i./src"
];
ghcPackages = p: [
p.bytestring
p.data-default
p.GLFW-b
p.OpenGL
p.relude
@@ -16,7 +33,7 @@ in
stdenv.mkDerivation {
pname = "haskengl";
version = "0.1.0";
src = ./src;
src = ./.;
nativeBuildInputs = [
(haskellPackages.ghcWithPackages ghcPackages)
];
@@ -25,7 +42,7 @@ in
configurePhase = ''
'';
buildPhase = ''
ghc ${ghcExeOptions} ./Main.hs -o ./Main
ghc ${ghcExeOptions} ./src/Main.hs -o ./Main
'';
installPhase = ''
mkdir -p $out/bin