Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into staging
Browse files Browse the repository at this point in the history
Conflicts:
      pkgs/development/libraries/qt-5/5.7/qtbase/default.nix
  • Loading branch information
dezgeg committed Mar 13, 2017
2 parents 8bfa9f5 + 46c9eac commit aba0b45
Show file tree
Hide file tree
Showing 210 changed files with 5,446 additions and 2,943 deletions.
9 changes: 4 additions & 5 deletions doc/languages-frameworks/haskell.md
Expand Up @@ -823,10 +823,10 @@ alternative implemention for Integer called
[integer-simple](http://hackage.haskell.org/package/integer-simple).

To get a GHC compiler build with `integer-simple` instead of `integer-gmp` use
the attribute: `pkgs.haskell.compiler.integer-simple."${ghcVersion}"`.
the attribute: `haskell.compiler.integer-simple."${ghcVersion}"`.
For example:

$ nix-build -E '(import <nixpkgs> {}).pkgs.haskell.compiler.integer-simple.ghc802'
$ nix-build -E '(import <nixpkgs> {}).haskell.compiler.integer-simple.ghc802'
...
$ result/bin/ghc-pkg list | grep integer
integer-simple-0.1.1.1
Expand All @@ -838,18 +838,17 @@ The following command displays the complete list of GHC compilers build with `in
haskell.compiler.integer-simple.ghc7103 ghc-7.10.3
haskell.compiler.integer-simple.ghc722 ghc-7.2.2
haskell.compiler.integer-simple.ghc742 ghc-7.4.2
haskell.compiler.integer-simple.ghc763 ghc-7.6.3
haskell.compiler.integer-simple.ghc783 ghc-7.8.3
haskell.compiler.integer-simple.ghc784 ghc-7.8.4
haskell.compiler.integer-simple.ghc801 ghc-8.0.1
haskell.compiler.integer-simple.ghc802 ghc-8.0.2
haskell.compiler.integer-simple.ghcHEAD ghc-8.1.20170106

To get a package set supporting `integer-simple` use the attribute:
`pkgs.haskell.packages.integer-simple."${ghcVersion}"`. For example
`haskell.packages.integer-simple."${ghcVersion}"`. For example
use the following to get the `scientific` package build with `integer-simple`:

$ nix-build -A pkgs.haskell.packages.integer-simple.ghc802.scientific
$ nix-build -A haskell.packages.integer-simple.ghc802.scientific


## Other resources
Expand Down
6 changes: 3 additions & 3 deletions lib/composable-derivation.nix
@@ -1,4 +1,4 @@
{lib, pkgs} :
{lib, pkgs}:
let inherit (lib) nv nvs; in
{

Expand All @@ -19,7 +19,7 @@ let inherit (lib) nv nvs; in
# * vim_configurable
#
# A minimal example illustrating most features would look like this:
# let base = composableDerivation { (fixed : let inherit (fixed.fixed) name in {
# let base = composableDerivation { (fixed: let inherit (fixed.fixed) name in {
# src = fetchurl {
# }
# buildInputs = [A];
Expand Down Expand Up @@ -79,7 +79,7 @@ let inherit (lib) nv nvs; in
# consider adding addtional elements by derivation.merge { removeAttrs = ["elem"]; };
removeAttrs ? ["cfg" "flags"]

}: (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
}: (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
{
inherit applyPreTidy removeAttrs;
}).merge;
Expand Down
14 changes: 7 additions & 7 deletions lib/debug.nix
Expand Up @@ -24,10 +24,10 @@ rec {
traceValSeq = v: traceVal (builtins.deepSeq v v);

# this can help debug your code as well - designed to not produce thousands of lines
traceShowVal = x : trace (showVal x) x;
traceShowVal = x: trace (showVal x) x;
traceShowValMarked = str: x: trace (str + showVal x) x;
attrNamesToStr = a : lib.concatStringsSep "; " (map (x : "${x}=") (attrNames a));
showVal = x :
attrNamesToStr = a: lib.concatStringsSep "; " (map (x: "${x}=") (attrNames a));
showVal = x:
if isAttrs x then
if x ? outPath then "x is a derivation, name ${if x ? name then x.name else "<no name>"}, { ${attrNamesToStr x} }"
else "x is attr set { ${attrNamesToStr x} }"
Expand All @@ -43,9 +43,9 @@ rec {

# trace the arguments passed to function and its result
# maybe rewrite these functions in a traceCallXml like style. Then one function is enough
traceCall = n : f : a : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a));
traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
traceCall3 = n : f : a : b : c : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c));
traceCall = n: f: a: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a));
traceCall2 = n: f: a: b: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
traceCall3 = n: f: a: b: c: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c));

# FIXME: rename this?
traceValIfNot = c: x:
Expand All @@ -71,7 +71,7 @@ rec {

# create a test assuming that list elements are true
# usage: { testX = allTrue [ true ]; }
testAllTrue = expr : { inherit expr; expected = map (x: true) expr; };
testAllTrue = expr: { inherit expr; expected = map (x: true) expr; };

strict = v:
trace "Warning: strict is deprecated and will be removed in the next release"
Expand Down

0 comments on commit aba0b45

Please sign in to comment.