commit 537377bd9432b812691ed12d699f629ef9a05caf Author: nek0 Date: Sat Feb 1 16:09:09 2020 +0100 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99225d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +*.hi +*.o +*.local +.hsenv* +.git +.cabal-sandbox/ +.ghc.* +cabal.sandbox.config +dist/ +dist-newstyle/ +*.prof +*.aux +*.hp +*.ps +*.pdf +*.html +*.swp +*.eventlog +*.*~ +.*autosave.kra +.envrc diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..12860d5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Revision history for canvas + +## 0.0.0.0 -- 2020-02-01 + +* First version. Released on an unsuspecting world. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..67ed06b --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2020, nek0 + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of nek0 nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..838cd6a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# canvas + +A test implementation for drawing images with SDL2 and OpenGL diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/app/Main.hs b/app/Main.hs new file mode 100644 index 0000000..65ae4a0 --- /dev/null +++ b/app/Main.hs @@ -0,0 +1,4 @@ +module Main where + +main :: IO () +main = putStrLn "Hello, Haskell!" diff --git a/canvas.cabal b/canvas.cabal new file mode 100644 index 0000000..c7134f1 --- /dev/null +++ b/canvas.cabal @@ -0,0 +1,24 @@ +cabal-version: 2.4 +-- Initial package description 'canvas.cabal' generated by 'cabal init'. +-- For further documentation, see http://haskell.org/cabal/users-guide/ + +name: canvas +version: 0.0.0.0 +synopsis: A test implementation for drawing images with SDL2 and OpenGL +-- description: +-- bug-reports: +license: BSD-3-Clause +license-file: LICENSE +author: nek0 +maintainer: nek0@nek0.eu +-- copyright: +category: Game +extra-source-files: CHANGELOG.md + +executable canvas + main-is: Main.hs + -- other-modules: + -- other-extensions: + build-depends: base ^>=4.12.0.0 + hs-source-dirs: app + default-language: Haskell2010 diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..0c8816e --- /dev/null +++ b/default.nix @@ -0,0 +1,11 @@ +{ pkgs ? import (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz)) +, haskellCompiler ? "ghc865" +, lib ? pkgs.lib +, config ? pkgs.config +}: + pkgs.haskell-nix.cabalProject { + src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; }; + #src = pkgs.haskell-nix.haskellLib.cleanGit { src = pkgs.nix-gitignore.gitignoreSource [] ./.; }; + #rc = pkgs.nix-gitignore.gitignoreSource [] ./.; + ghc = pkgs.buildPackages.pkgs.haskell-nix.compiler.${haskellCompiler}; + } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..5ddcc6b --- /dev/null +++ b/shell.nix @@ -0,0 +1,4 @@ +let + hsPkgs = import ./default.nix {}; +in + hsPkgs.canvas.components.all