-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify down to just a cabal package
- Loading branch information
Jordan Mackie
committed
Jun 8, 2020
1 parent
8a1f286
commit 86faddc
Showing
14 changed files
with
326 additions
and
487 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
language: nix | ||
nix: 2.2.2 | ||
script: nix build -f default.nix kesha | ||
script: ci.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import Distribution.Simple | ||
|
||
main = defaultMain |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env nix-shell | ||
#! nix-shell -i bash | ||
|
||
set -euo pipefail | ||
shopt -s inherit_errexit | ||
|
||
print_versions() { ( | ||
set -x | ||
ghc --version | ||
cabal --version | ||
hlint --version | ||
ormolu --version | ||
); } | ||
|
||
build_and_test() { | ||
cabal new-update | ||
cabal new-build | ||
cabal new-test --test-show-details=streaming | ||
} | ||
|
||
lint() { | ||
hlint --git | ||
|
||
local exit=0 | ||
for f in $(git ls-files | grep -e '\.hs'); do | ||
if ! ormolu --mode check "$f"; then | ||
echo 2>&1 "$f isn't formatted" | ||
exit=1 | ||
fi | ||
done | ||
|
||
return $exit | ||
} | ||
|
||
main() { | ||
print_versions | ||
build_and_test | ||
lint | ||
} | ||
|
||
main "$@" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ license: MIT | |
license-file: LICENSE | ||
author: Jordan Mackie | ||
maintainer: [email protected] | ||
copyright: (c) 2019 Jordan Mackie | ||
copyright: (c) 2020 Jordan Mackie | ||
category: System | ||
extra-source-files: | ||
README.md | ||
|
@@ -28,52 +28,43 @@ source-repository head | |
library | ||
default-language: Haskell2010 | ||
hs-source-dirs: src | ||
ghc-options: -Wall | ||
ghc-options: -Wall | ||
exposed-modules: | ||
Kesha | ||
Kesha.NAR | ||
build-depends: | ||
-- https://wiki.haskell.org/Base_package | ||
-- >= 8.2.2 && < 8.9 | ||
base >= 4.10.1 && < 4.14, | ||
|
||
-- boot libraries | ||
binary, | ||
bytestring, | ||
containers, | ||
cryptohash-sha256, | ||
-- 1.3.1.0 introduced `getSymbolicLinkTarget` | ||
directory >= 1.3.1, | ||
filepath, | ||
text | ||
text, | ||
|
||
executable kesha | ||
default-language: Haskell2010 | ||
hs-source-dirs: app | ||
ghc-options: -Wall -threaded -O2 -rtsopts -with-rtsopts=-N | ||
main-is: Main.hs | ||
other-modules: Paths_kesha | ||
build-depends: | ||
base >= 4.10.1 && < 4.14, | ||
|
||
bytestring, | ||
|
||
kesha | ||
cryptohash-sha256 | ||
|
||
test-suite test | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
main-is: Main.hs | ||
hs-source-dirs: test | ||
ghc-options: -Wall -threaded -rtsopts | ||
build-depends: | ||
kesha, | ||
|
||
base >= 4.10.1 && < 4.14, | ||
|
||
QuickCheck, | ||
bytestring, | ||
containers, | ||
directory >= 1.3.1, | ||
filepath, | ||
hspec, | ||
process, | ||
temporary, | ||
|
||
kesha | ||
other-modules: | ||
default-language: Haskell2010 | ||
hspec, | ||
QuickCheck, | ||
temporary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
(import ./.).env | ||
let | ||
pinnedPkgs = | ||
# 2020-05-17T11:55:13+02:00 | ||
let rev = "85d6f3bcd9cbcc52c4a307d2ef5116dab4b41641"; | ||
in import (builtins.fetchTarball { | ||
name = "nixpkgs-${rev}"; | ||
url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; | ||
sha256 = "10jxpwq47clbj047jh5zn20hqmwpc821ac8zljgpayk0sk5p0mwv"; | ||
}) { }; | ||
in { pkgs ? pinnedPkgs, compiler ? "ghc865" }: | ||
pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.haskell.packages."${compiler}".ghc | ||
pkgs.cabal-install | ||
pkgs.ormolu | ||
pkgs.hlint | ||
]; | ||
} | ||
|
Oops, something went wrong.