Compare commits
15 commits
resourceti
...
master
Author | SHA1 | Date | |
---|---|---|---|
d0465fa3e1 | |||
|
523265b2dc | ||
|
f92949b7f0 | ||
1976a6c4c1 | |||
086eb3e1f2 | |||
818a1e424c | |||
445b5807e0 | |||
f7e7c9dcc8 | |||
5bef189c30 | |||
efbb9b4c5e | |||
76225dff4b | |||
eda79eb626 | |||
04d6905de1 | |||
b56ed86e45 | |||
af0dcc16da |
7 changed files with 83 additions and 53 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,4 +17,4 @@ dist*/
|
|||
report.html
|
||||
*.bak
|
||||
.direnv/
|
||||
.envrc
|
||||
result
|
||||
|
|
|
@ -16,7 +16,7 @@ homepage: https://github.com/nek0/affection#readme
|
|||
license: LGPL-3
|
||||
license-file: LICENSE
|
||||
author: nek0
|
||||
maintainer: nek0@chelnok.de
|
||||
maintainer: nek0@nek0.eu
|
||||
category: Game
|
||||
build-type: Simple
|
||||
extra-source-files: ChangeLog.md
|
||||
|
@ -29,7 +29,7 @@ cabal-version: >=2.0
|
|||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/nek0/affection
|
||||
location: https://gitea.nek0.eu/nek0/affection.git
|
||||
|
||||
flag verbose
|
||||
description: Enable verbose debug messages
|
||||
|
@ -99,7 +99,7 @@ library
|
|||
-- , UndecidableInstances
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall
|
||||
ghc-options: -threaded -Wall
|
||||
-- Other library packages from which modules are imported.
|
||||
build-depends: base >=4.9 && < 5
|
||||
, sdl2 >= 2.5
|
||||
|
@ -127,12 +127,11 @@ executable example00
|
|||
ghc-options: -threaded -Wall
|
||||
default-language: Haskell2010
|
||||
default-extensions: OverloadedStrings
|
||||
if flag(examples)
|
||||
build-depends: base >=4.9 && < 5
|
||||
, affection
|
||||
, sdl2 >= 2.5
|
||||
, stm
|
||||
else
|
||||
build-depends: base >=4.9 && < 5
|
||||
, affection
|
||||
, sdl2 >= 2.5
|
||||
, stm
|
||||
if !flag(examples)
|
||||
buildable: False
|
||||
|
||||
-- A small game of life implementation
|
||||
|
@ -143,19 +142,18 @@ executable example01
|
|||
ghc-options: -threaded -Wall
|
||||
default-language: Haskell2010
|
||||
default-extensions: OverloadedStrings
|
||||
if flag(examples)
|
||||
build-depends: base >=4.9 && < 5
|
||||
, affection
|
||||
, sdl2 >= 2.5
|
||||
, stm
|
||||
, OpenGL
|
||||
, random
|
||||
, containers
|
||||
, linear
|
||||
, matrix
|
||||
, nanovg >= 0.6.0.0
|
||||
, deepseq
|
||||
else
|
||||
build-depends: base >=4.9 && < 5
|
||||
, affection
|
||||
, sdl2 >= 2.5
|
||||
, stm
|
||||
, OpenGL
|
||||
, random
|
||||
, containers
|
||||
, linear
|
||||
, matrix
|
||||
, nanovg >= 0.6.0.0
|
||||
, deepseq
|
||||
if !flag(examples)
|
||||
buildable: False
|
||||
|
||||
-- Another small game of life implementation
|
||||
|
@ -166,17 +164,16 @@ executable example02
|
|||
ghc-options: -threaded -Wall
|
||||
default-language: Haskell2010
|
||||
default-extensions: OverloadedStrings
|
||||
if flag(examples)
|
||||
build-depends: base >=4.9 && < 5
|
||||
, affection
|
||||
, sdl2 >= 2.5
|
||||
, stm
|
||||
, OpenGL
|
||||
, random
|
||||
, containers
|
||||
, linear
|
||||
, matrix
|
||||
, nanovg >= 0.6.0.0
|
||||
, deepseq
|
||||
else
|
||||
build-depends: base >=4.9 && < 5
|
||||
, affection
|
||||
, sdl2 >= 2.5
|
||||
, stm
|
||||
, OpenGL
|
||||
, random
|
||||
, containers
|
||||
, linear
|
||||
, matrix
|
||||
, nanovg >= 0.6.0.0
|
||||
, deepseq
|
||||
if !flag(examples)
|
||||
buildable: False
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
constraints: affection +verbose +examples
|
||||
profiling: true
|
||||
packages:
|
||||
./.
|
||||
packages: ./*.cabal
|
||||
|
||||
package affection
|
||||
flags: +examples
|
||||
|
|
30
flake.lock
30
flake.lock
|
@ -1,12 +1,15 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -17,11 +20,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1663173135,
|
||||
"narHash": "sha256-QL4JZYUlbt0ex78w30XJ0h9idUMj0DBxppyDsoxEPjE=",
|
||||
"lastModified": 1700844339,
|
||||
"narHash": "sha256-VRlPYk0eRn1ao75hoA99LGehYhxZH5RlkP1YXpVROHM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5d1ddac9493642d7311a064351e643de9a0e24ee",
|
||||
"rev": "33576fdfce2d11204067d6cfa99a2f990ef2169a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -35,6 +38,21 @@
|
|||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -17,21 +17,37 @@
|
|||
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
|
||||
|
||||
packageName = "affection";
|
||||
in {
|
||||
in rec {
|
||||
packages.${packageName} = # (ref:haskell-package-def)
|
||||
haskellPackages.callCabal2nix packageName self rec {
|
||||
haskellPackages.callCabal2nixWithOptions packageName self "--flag examples" {
|
||||
# Dependency overrides go here
|
||||
};
|
||||
|
||||
defaultPackage = self.packages.${system}.${packageName};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
apps = {
|
||||
example00 = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.${packageName}}/bin/example00";
|
||||
};
|
||||
example01 = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.${packageName}}/bin/example01";
|
||||
};
|
||||
example02 = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.${packageName}}/bin/example02";
|
||||
};
|
||||
};
|
||||
|
||||
devShell = haskellPackages.shellFor {
|
||||
packages = p: [ defaultPackage ];
|
||||
withHoogle = true;
|
||||
buildInputs = with haskellPackages; [
|
||||
haskell-language-server
|
||||
ghcid
|
||||
cabal-install
|
||||
];
|
||||
inputsFrom = builtins.attrValues self.packages.${system};
|
||||
] ++ (builtins.attrValues self.packages.${system});
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
2
hie.yaml
2
hie.yaml
|
@ -1,2 +0,0 @@
|
|||
cradle:
|
||||
cabal:
|
Loading…
Reference in a new issue