diff --git a/2022/.gitignore b/2022/.gitignore new file mode 100644 index 0000000..c33954f --- /dev/null +++ b/2022/.gitignore @@ -0,0 +1 @@ +dist-newstyle/ diff --git a/2022/CHANGELOG.md b/2022/CHANGELOG.md new file mode 100644 index 0000000..eb7ccf3 --- /dev/null +++ b/2022/CHANGELOG.md @@ -0,0 +1,5 @@ +# Revision history for x2022 + +## 0.1.0.0 -- YYYY-mm-dd + +* First version. Released on an unsuspecting world. diff --git a/2022/aoc2022.cabal b/2022/aoc2022.cabal new file mode 100644 index 0000000..0ac7cd8 --- /dev/null +++ b/2022/aoc2022.cabal @@ -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 diff --git a/2022/app/Main.hs b/2022/app/Main.hs new file mode 100644 index 0000000..65ae4a0 --- /dev/null +++ b/2022/app/Main.hs @@ -0,0 +1,4 @@ +module Main where + +main :: IO () +main = putStrLn "Hello, Haskell!" diff --git a/2022/shell.nix b/2022/shell.nix new file mode 100644 index 0000000..fe1d8ba --- /dev/null +++ b/2022/shell.nix @@ -0,0 +1,25 @@ +{ + pkgs ? import {}, + 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 ""; +} +