This commit is contained in:
nek0 2020-02-01 16:09:09 +01:00
commit 537377bd94
9 changed files with 104 additions and 0 deletions

21
.gitignore vendored Normal file
View File

@ -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

5
CHANGELOG.md Normal file
View File

@ -0,0 +1,5 @@
# Revision history for canvas
## 0.0.0.0 -- 2020-02-01
* First version. Released on an unsuspecting world.

30
LICENSE Normal file
View File

@ -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.

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# canvas
A test implementation for drawing images with SDL2 and OpenGL

2
Setup.hs Normal file
View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

4
app/Main.hs Normal file
View File

@ -0,0 +1,4 @@
module Main where
main :: IO ()
main = putStrLn "Hello, Haskell!"

24
canvas.cabal Normal file
View File

@ -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

11
default.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs ? import <nixpkgs> (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};
}

4
shell.nix Normal file
View File

@ -0,0 +1,4 @@
let
hsPkgs = import ./default.nix {};
in
hsPkgs.canvas.components.all