Merge remote-tracking branch 'origin/master' into pending

This commit is contained in:
John Wiegley 2018-08-06 16:15:14 -04:00
commit 456e0811bc
No known key found for this signature in database
GPG key ID: C144D8F4F19FE630
3 changed files with 15 additions and 8 deletions

View file

@ -26,8 +26,8 @@ env:
matrix:
allow_failures:
- env: GHCVERSION=ghcjs
exclude:
- env: GHCVERSION=ghc822 STRICT=false
- env: GHCVERSION=ghc802 STRICT=false TRACING=false
- env: GHCVERSION=ghc802 STRICT=false TRACING=true
before_script:
- sudo mount -o remount,exec,size=4G,mode=755 /run/user || true
@ -36,11 +36,10 @@ before_script:
- sudo launchctl kickstart -k system/org.nixos.nix-daemon || true
script:
- nix-env -if https://github.com/cachix/cachix/tarball/master --extra-substituters https://cachix.cachix.org --trusted-public-keys 'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM='
- nix-env -iA cachix -f https://github.com/NixOS/nixpkgs/tarball/db557aab7b690f5e0e3348459f2e4dc8fd0d9298
- cachix use hnix
- cachix push hnix --watch-store &
- bash build.sh | cachix push hnix
- if [ ! -v $CACHIX_SIGNING_KEY ]; then cachix push hnix --watch-store& fi
- if [ ! -v $CACHIX_SIGNING_KEY ]; then ./build.sh | cachix push hnix; else ./build.sh; fi
branches:
only:

View file

@ -1,11 +1,13 @@
#!/bin/bash -xe
#!/usr/bin/env bash
set -xe
set -euo pipefail
IFS=$'\n\t'
GHCVERSION=${GHCVERSION:-ghc822}
STRICT=${STRICT:-false}
TRACING=${TRACING:-false}
NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/6820e2f0dd16104961d6fc7e8e38846807159c4e.tar.gz
if [ "$GHCVERSION" = "ghcjs" ]; then
nix-build --substituters 'https://nixcache.reflex-frp.org?trusted=1' ghcjs
@ -13,5 +15,6 @@ else
nix-build \
--argstr compiler $GHCVERSION \
--arg doTracing $TRACING \
--arg doStrict $STRICT
--arg doStrict $STRICT \
$@
fi

View file

@ -148,6 +148,7 @@ builtinsList = sequence [
, add0 Normal "nixPath" nixPath
, add TopLevel "abort" throw_ -- for now
, add2 Normal "add" add_
, add2 Normal "addErrorContext" addErrorContext
, add2 Normal "all" all_
, add2 Normal "any" any_
, add Normal "attrNames" attrNames
@ -982,6 +983,10 @@ trace_ msg action = do
traceEffect . Text.unpack =<< fromValue @Text msg
action
-- TODO: remember error context
addErrorContext :: forall e m. MonadNix e m => m (NValue m) -> m (NValue m) -> m (NValue m)
addErrorContext _ action = action
exec_ :: forall e m. MonadNix e m => m (NValue m) -> m (NValue m)
exec_ xs = do
ls <- fromValue @[NThunk m] xs