- Make a new directory and place the other files at their described paths relative to that directory's root
library.DemoLib.hs
should be placed atlibrary/DemoLib.hs
, gists don't allow a naming convention oflibrary/DemoLib.hs
- Run the following command:
nix-shell -E 'let pkgs = import ./pinned.nix {}; pkg = pkgs.haskellPackages.developPackage { root = ./.; }; in pkg.overrideAttrs (attrs: { buildInputs = attrs.buildInputs ++ [ pkgs.cabal-install]; })'
- Run
cabal update
(to ensure that there's a valid$HOME/.cabal
directory with relevant Hackage information, even though we're not going to use it) - Run
cabal build
and verify that the package builds.