init
This commit is contained in:
1
README.md
Normal file
1
README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
generate type-safe GLSL with this Haskell grammar. Under heavy development.
|
||||||
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764242076,
|
||||||
|
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
13
flake.nix
Normal file
13
flake.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
outputs = {nixpkgs, ...}: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
packages.${system} = {
|
||||||
|
default = pkgs.callPackage ./package.nix {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
37
package.nix
Normal file
37
package.nix
Normal 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"];
|
||||||
|
};
|
||||||
|
}
|
||||||
13
src/Main.hs
Normal file
13
src/Main.hs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
|
module Main (main) where
|
||||||
|
|
||||||
|
-- IMPORTS --
|
||||||
|
|
||||||
|
import Relude
|
||||||
|
|
||||||
|
-- MAIN --
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = putTextLn "hallo Welt"
|
||||||
Reference in New Issue
Block a user