-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #116: Switch everything over to Cabal
Approved-by: robbert-vdh Auto-deploy: false
- Loading branch information
Showing
34 changed files
with
577 additions
and
563 deletions.
There are no files selected for viewing
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,23 @@ | ||
#!/bin/bash | ||
|
||
# Add possibility to run a custom envrc that completely overrides the behavior of this envrc. | ||
CUSTOM_ENVRC=.customenvrc | ||
if [ -f "$CUSTOM_ENVRC" ]; then | ||
echo "Using .customenvrc file" | ||
source_env $CUSTOM_ENVRC | ||
else | ||
# Decrease logging output | ||
# shellcheck disable=SC2034 # unused variable is still read by direnv. | ||
DIRENV_LOG_FORMAT= | ||
# Install nix-direnv, which has an improved implementation of `use nix` that | ||
# caches the Nix environment. Note that this URL is cached locally, so it | ||
# doesn't fetch the script every time. | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" | ||
fi | ||
|
||
nix_direnv_watch_file nix/sources.json nix/haskell-dependencies.nix | ||
dotenv | ||
|
||
use nix default.nix --argstr environment shell | ||
fi |
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,20 @@ | ||
dist-newstyle/ | ||
cabal.project.local | ||
*.prof | ||
*.eventlog | ||
|
||
# Icepeak data | ||
icepeak.db | ||
icepeak.json | ||
icepeak.json.journal | ||
icepeak.json.new | ||
|
||
# IntelliJ IDEA project files | ||
*.idea | ||
*.iml | ||
|
||
# Nix result symlinks | ||
result* | ||
|
||
# Direnv | ||
.direnv/ |
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
packages: | ||
server/icepeak.cabal | ||
client-haskell/icepeak-client.cabal | ||
|
||
package icepeak | ||
optimization: 2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
cabal-version: 1.12 | ||
name: icepeak-client | ||
version: 0.1.1 | ||
synopsis: | ||
Client library for Icepeak, a fast JSON document store with push notification support | ||
|
||
homepage: https://github.com/channable/icepeak | ||
license: BSD3 | ||
build-type: Simple | ||
|
||
library | ||
exposed-modules: Icepeak.Client | ||
other-modules: Paths_icepeak_client | ||
hs-source-dirs: src | ||
ghc-options: | ||
-Wall -Wincomplete-uni-patterns -Wincomplete-record-updates | ||
|
||
build-depends: | ||
aeson | ||
, base | ||
, binary | ||
, bytestring | ||
, exceptions | ||
, http-client | ||
, http-types | ||
, retry | ||
, text | ||
|
||
default-language: Haskell2010 |
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,50 @@ | ||
{ lib, mkDerivation | ||
|
||
# Core packages | ||
, nix-gitignore | ||
|
||
# Haskell packages | ||
, aeson, base, binary, bytestring, http-client, http-types, text, retry | ||
, exceptions }: | ||
mkDerivation { | ||
pname = "icepeak-client"; | ||
version = "0.1.1"; | ||
|
||
src = let | ||
# We do not want to include all files, because that leads to a lot of things | ||
# that nix has to copy to the temporary build directory that we don't want | ||
# to have in there (e.g. the `.dist-newstyle` directory, the `.git` | ||
# directory, etc.) | ||
prefixWhitelist = | ||
builtins.map builtins.toString [ ./icepeak-client.cabal ./src ]; | ||
# Compute source based on whitelist | ||
whitelistFilter = path: _type: | ||
lib.any (prefix: lib.hasPrefix prefix path) prefixWhitelist; | ||
gitignore = builtins.readFile ../.gitignore; | ||
gitignoreFilter = | ||
nix-gitignore.gitignoreFilterPure whitelistFilter gitignore ./.; | ||
whitelistedSrc = lib.cleanSourceWith { | ||
src = lib.cleanSource ./.; | ||
filter = gitignoreFilter; | ||
}; | ||
in whitelistedSrc; | ||
|
||
isLibrary = true; | ||
isExecutable = false; | ||
|
||
libraryHaskellDepends = [ | ||
aeson | ||
base | ||
binary | ||
bytestring | ||
http-client | ||
http-types | ||
text | ||
retry | ||
exceptions | ||
]; | ||
|
||
homepage = "https://github.com/channable/icepeak"; | ||
|
||
license = lib.licenses.bsd3; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.