-
-
Save cleverca22/9e77559fc256d5fbe319cbfd141bd752 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
lib.fix (self: { | |
ghc = haskellPackages.ghcWithPackages (ps: with ps; [ GLUT ]); | |
thing = runCommandCC "thing" { buildInputs = [ self.ghc ]; } '' | |
mkdir -pv $out/bin/ | |
ghc ${./Glut.hs} -o $out/bin/thing | |
''; | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Exit (exitWith, ExitCode(ExitSuccess)) | |
import Graphics.UI.GLUT | |
main = do | |
(progName, _args) <- getArgsAndInitialize | |
initialDisplayMode $= [ SingleBuffered, RGBMode ] | |
initialWindowSize $= Size 500 500 | |
_ <- createWindow progName | |
exitWith ExitSuccess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment