This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:0107655cc20afd1a8f3f9872c1782440640bc696]
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE QuasiQuotes #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Example where |
This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:0107655cc20afd1a8f3f9872c1782440640bc696]
######################### | |
# Machine Configuration # | |
######################### | |
{ config, inputs, lib, pkgs, unstable, ... }: | |
{ | |
imports = [ | |
./primary-user-nixos.nix | |
./desktop-apps.nix | |
./desktop-kde.nix |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} |
# NOTE: | |
# For details on warnings: https://downloads.haskell.org/~ghc/master/users-guide/using-warnings.html | |
# | |
# This list taken from https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3 | |
ghc-options: | |
- -fwarn-tabs # Warn on tabs (spaces are better) | |
- -Weverything # Enable all warnings with -Weverything, then | |
# disable the ones we don’t care about |
All actions should be performed in the root directory of a Haskell project that uses stack.
The following lines should be present in the project's stack.yaml
file:
docker:
enable: true
Additionally, the BaseImage
and Dockerfile
files from this gist should also be present in the
project's root directory.
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
{-# LANGUAGE AllowAmbiguousTypes, ConstraintKinds, DataKinds, FlexibleContexts, | |
FlexibleInstances, FunctionalDependencies, InstanceSigs, | |
MultiParamTypeClasses, RankNTypes, RecordWildCards, ScopedTypeVariables, | |
StandaloneKindSignatures, TypeApplications, TypeFamilies, | |
TypeFamilyDependencies #-} | |
import Control.Monad.Reader (MonadReader) | |
import Control.Monad.Trans (MonadTrans) | |
import Control.Monad.Trans.Except (ExceptT, runExceptT) | |
import Data.Kind (Constraint, Type) |
{ fetchFromGitHub, gmp, nettle, sqlite, stdenv }: | |
let | |
rev = "3d7c095cb10a1b692c80dd28f6051dea91d45baa"; | |
version = "5.0"; | |
tag = "v${version}"; | |
in | |
stdenv.mkDerivation { | |
pname = "pihole-ftl"; |
library.DemoLib.hs
should be placed at library/DemoLib.hs
, gists don't allow a naming convention of library/DemoLib.hs
nix-shell -E 'let pkgs = import ./pinned.nix {}; pkg = pkgs.haskellPackages.developPackage { root = ./.; }; in pkg.overrideAttrs (attrs: { buildInputs = attrs.buildInputs ++ [ pkgs.cabal-install]; })'
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)cabal build
and verify that the package builds.