This commit is contained in:
Steph 2022-12-01 21:14:46 +01:00
parent 2ac18fcb7e
commit 05460991c1
5 changed files with 69 additions and 0 deletions

1
2022/.gitignore vendored Normal file
View File

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

5
2022/CHANGELOG.md Normal file
View File

@ -0,0 +1,5 @@
# Revision history for x2022
## 0.1.0.0 -- YYYY-mm-dd
* First version. Released on an unsuspecting world.

34
2022/aoc2022.cabal Normal file
View File

@ -0,0 +1,34 @@
cabal-version: 2.4
name: aoc2022
version: 0.1.0.0
-- A short (one-line) description of the package.
-- synopsis:
-- A longer description of the package.
-- description:
-- A URL where users can report bugs.
-- bug-reports:
-- The license under which the package is released.
-- license:
author: Steph
maintainer: noreply+steph@code.steph.tools
-- A copyright notice.
-- copyright:
-- category:
extra-source-files: CHANGELOG.md
executable aoc2022
main-is: Main.hs
-- Modules included in this executable, other than Main.
-- other-modules:
-- LANGUAGE extensions used by modules in this package.
-- other-extensions:
build-depends: base ^>=4.16.3.0
hs-source-dirs: app
default-language: Haskell2010

4
2022/app/Main.hs Normal file
View File

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

25
2022/shell.nix Normal file
View File

@ -0,0 +1,25 @@
{
pkgs ? import <nixpkgs> {},
hc ? "ghc924"
}:
pkgs.stdenv.mkDerivation rec {
name = "aoc-2022";
buildInputs = [
pkgs.haskell.compiler.${hc}
pkgs.git
pkgs.zlib
pkgs.cabal-install
pkgs.pkgconfig
pkgs.which
];
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath buildInputs}:$LD_LIBRARY_PATH
export LANG=en_US.UTF-8
'';
LOCALE_ARCHIVE =
if pkgs.stdenv.isLinux
then "${pkgs.glibcLocales}/lib/locale/locale-archive"
else "";
}