CI config for Nix/Cabal

This commit is contained in:
Hans Hoeglund 2020-04-16 13:13:30 +01:00
parent e3a88ae012
commit 1d2ac9f60a
2 changed files with 38 additions and 0 deletions

View File

@ -1,5 +1,13 @@
version: 2.1
jobs:
build-nix-cabal:
docker:
- image: nixos/nix:2.3@sha256:af330838e838cedea2355e7ca267280fc9dd68615888f4e20972ec51beb101d8
environment:
LC_ALL: C.UTF-8
steps:
- checkout
- run: nix-shell --pure --command "cabal update && cabal test"
build-stack:
docker:
- image: fpco/stack-build:lts

30
default.nix Normal file
View File

@ -0,0 +1,30 @@
let
opts = {
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskellPackages.override {
overrides = haskellPackagesNew: haskellPackagesOld: rec {
# No overrides
};
};
};
};
pkgs = import (builtins.fetchTarball {
url = https://github.com/nixos/nixpkgs/archive/f74f2f354866c828248a419ef9a2cbddc793b7f9.tar.gz;
# Hash obtained using `nix-prefetch-url --unpack <url>`
sha256 = "1jxb2kb83mrmzg06l7c1zw9pikk2l1lpg8dl0rvni65bgmlxf7xy";
}) { config = opts; };
in
pkgs.stdenv.mkDerivation {
name = "iso-deriving";
buildInputs = [
(
pkgs.haskellPackages.ghcWithPackages (pkgs:
[ pkgs.cabal-install
])
)
];
}