[hs] Set up new project with cabal/nix

This commit is contained in:
Joscha 2022-12-04 17:05:15 +01:00
parent bd2dd9a4f9
commit 22f8efaf0f
4 changed files with 25 additions and 0 deletions

1
hs2/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/dist-newstyle

16
hs2/aoc-hs.cabal Normal file
View file

@ -0,0 +1,16 @@
cabal-version: 3.4
-- Later versions are not supported by my current cabal2nix.
name: aoc-hs
version: 0.0.0.0
build-type: Simple
executable hs2
hs-source-dirs: app
main-is: Main.hs
build-depends:
base ^>=4.15.1.0
default-language: Haskell2010
ghc-options: -Wall

4
hs2/app/Main.hs Normal file
View file

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

4
hs2/default.nix Normal file
View file

@ -0,0 +1,4 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.haskellPackages.developPackage {
root = ./.;
}