about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-02-22 01:14:22 +0000
committerRobin Gloster <mail@glob.in>2016-02-22 01:14:22 +0000
commitbb2639aafc021cf8a86af51de98623278f5d5e98 (patch)
tree3821e600172c11a40d758576998869f96266c871 /pkgs/development
parent828b408f7fc7b489514e287ed7d720f423c98a41 (diff)
parent6908e75441f5b34dc923a66a8dfbdde0cb7ed9ec (diff)
downloadnixlib-bb2639aafc021cf8a86af51de98623278f5d5e98.tar
nixlib-bb2639aafc021cf8a86af51de98623278f5d5e98.tar.gz
nixlib-bb2639aafc021cf8a86af51de98623278f5d5e98.tar.bz2
nixlib-bb2639aafc021cf8a86af51de98623278f5d5e98.tar.lz
nixlib-bb2639aafc021cf8a86af51de98623278f5d5e98.tar.xz
nixlib-bb2639aafc021cf8a86af51de98623278f5d5e98.tar.zst
nixlib-bb2639aafc021cf8a86af51de98623278f5d5e98.zip
Merge branch 'curl-7.15-fixup' of https://github.com/zimbatm/nixpkgs into hardened-stdenv
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/closure/default.nix4
-rw-r--r--pkgs/development/compilers/ghc/7.10.2.nix7
-rw-r--r--pkgs/development/compilers/ghc/7.10.3.nix7
-rw-r--r--pkgs/development/compilers/ghc/8.0.1.nix10
-rw-r--r--pkgs/development/compilers/ghc/head.nix11
-rw-r--r--pkgs/development/compilers/ghc/nokinds.nix7
-rw-r--r--pkgs/development/compilers/ghcjs/default.nix12
-rw-r--r--pkgs/development/compilers/ghcjs/wrapper.nix77
-rw-r--r--pkgs/development/compilers/go/1.6.nix141
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix18
-rw-r--r--pkgs/development/interpreters/ruby/build-ruby-gem/default.nix24
-rw-r--r--pkgs/development/interpreters/ruby/gemconfig/default.nix9
-rw-r--r--pkgs/development/libraries/libcrossguid/default.nix34
-rw-r--r--pkgs/development/libraries/vmmlib/default.nix41
-rw-r--r--pkgs/development/libraries/vmmlib/disable-cpack.patch11
-rw-r--r--pkgs/development/python-modules/generic/default.nix5
-rw-r--r--pkgs/development/tools/dcadec/default.nix24
17 files changed, 334 insertions, 108 deletions
diff --git a/pkgs/development/compilers/closure/default.nix b/pkgs/development/compilers/closure/default.nix
index 1c684c21bf40..949008d990f8 100644
--- a/pkgs/development/compilers/closure/default.nix
+++ b/pkgs/development/compilers/closure/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "closure-compiler-${version}";
-  version = "20151015";
+  version = "20160208";
 
   src = fetchurl {
     url = "http://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
-    sha256 = "0idb0qrzca8j2nj0zxfpnsspmdkmda864rr5m05xxgcvn7150x0h";
+    sha256 = "19v9z8lfxfmhc4cl9fys7vnaslqiznjy1jpk5mcv468p7vysg46p";
   };
 
   phases = [ "installPhase" ];
diff --git a/pkgs/development/compilers/ghc/7.10.2.nix b/pkgs/development/compilers/ghc/7.10.2.nix
index 73fcd788c74f..87490842b3b6 100644
--- a/pkgs/development/compilers/ghc/7.10.2.nix
+++ b/pkgs/development/compilers/ghc/7.10.2.nix
@@ -1,8 +1,9 @@
-{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
+{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils
 , libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour
 }:
 
 let
+  inherit (bootPkgs) ghc;
 
   buildMK = ''
     libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
@@ -60,6 +61,10 @@ stdenv.mkDerivation rec {
     done
   '';
 
+  passthru = {
+    inherit bootPkgs;
+  };
+
   meta = {
     homepage = "http://haskell.org/ghc";
     description = "The Glasgow Haskell Compiler";
diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix
index 88d1bec4d42b..53ba058def4d 100644
--- a/pkgs/development/compilers/ghc/7.10.3.nix
+++ b/pkgs/development/compilers/ghc/7.10.3.nix
@@ -1,8 +1,9 @@
-{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
+{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils
 , libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour
 }:
 
 let
+  inherit (bootPkgs) ghc;
 
   docFixes = fetchurl {
     url = "https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3a.patch";
@@ -61,6 +62,10 @@ stdenv.mkDerivation rec {
     done
   '';
 
+  passthru = {
+    inherit bootPkgs;
+  };
+
   meta = {
     homepage = "http://haskell.org/ghc";
     description = "The Glasgow Haskell Compiler";
diff --git a/pkgs/development/compilers/ghc/8.0.1.nix b/pkgs/development/compilers/ghc/8.0.1.nix
index d24ad4106ee4..00482d013c23 100644
--- a/pkgs/development/compilers/ghc/8.0.1.nix
+++ b/pkgs/development/compilers/ghc/8.0.1.nix
@@ -1,7 +1,11 @@
-{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
+{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils
 , hscolour
 }:
 
+let
+  inherit (bootPkgs) ghc;
+
+in 
 stdenv.mkDerivation rec {
   version = "8.0.0.20160204";
   name = "ghc-${version}";
@@ -51,6 +55,10 @@ stdenv.mkDerivation rec {
     done
   '';
 
+  passthru = {
+    inherit bootPkgs;
+  };
+
   meta = {
     homepage = "http://haskell.org/ghc";
     description = "The Glasgow Haskell Compiler";
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 9b360b609e43..18e22f0100be 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -1,8 +1,11 @@
-{ stdenv, fetchgit, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
+{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils
 , autoconf, automake, happy, alex
 }:
 
-stdenv.mkDerivation rec {
+let
+  inherit (bootPkgs) ghc;
+
+in stdenv.mkDerivation rec {
   version = "7.11.20151216";
   name = "ghc-${version}";
   rev = "28638dfe79e915f33d75a1b22c5adce9e2b62b97";
@@ -62,6 +65,10 @@ stdenv.mkDerivation rec {
     done
   '';
 
+  passthru = {
+    inherit bootPkgs;
+  };
+
   meta = {
     homepage = "http://haskell.org/ghc";
     description = "The Glasgow Haskell Compiler";
diff --git a/pkgs/development/compilers/ghc/nokinds.nix b/pkgs/development/compilers/ghc/nokinds.nix
index 6334759496f0..acaef9c5ab11 100644
--- a/pkgs/development/compilers/ghc/nokinds.nix
+++ b/pkgs/development/compilers/ghc/nokinds.nix
@@ -1,6 +1,7 @@
-{ stdenv, fetchgit, ghc, perl, gmp, ncurses, libiconv, autoconf, automake, happy, alex }:
+{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, autoconf, automake, happy, alex }:
 
 let
+  inherit (bootPkgs) ghc;
 
   buildMK = ''
     libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
@@ -66,6 +67,10 @@ stdenv.mkDerivation rec {
   # that in turn causes GHCi to abort
   stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
 
+  passthru = {
+    inherit bootPkgs;
+  };
+
   meta = {
     homepage = "http://haskell.org/ghc";
     description = "The dependently-typed 'nokinds' branch of the Glasgow Haskell Compiler by Richard Eisenberg";
diff --git a/pkgs/development/compilers/ghcjs/default.nix b/pkgs/development/compilers/ghcjs/default.nix
index 81a8c90b53a7..722c3eab10ae 100644
--- a/pkgs/development/compilers/ghcjs/default.nix
+++ b/pkgs/development/compilers/ghcjs/default.nix
@@ -20,7 +20,7 @@
 , ghcjs-prim
 , regex-posix
 
-, ghc, gmp
+, bootPkgs, gmp
 , jailbreak-cabal
 
 , runCommand
@@ -41,8 +41,11 @@
 , ghcjsBoot ? import ./ghcjs-boot.nix { inherit fetchgit runCommand; }
 , shims ? import ./shims.nix { inherit fetchFromGitHub; }
 }:
-let version = "0.2.0"; in
-mkDerivation (rec {
+let
+  inherit (bootPkgs) ghc;
+  version = "0.2.0";
+
+in mkDerivation (rec {
   pname = "ghcjs";
   inherit version;
   src = fetchFromGitHub {
@@ -114,8 +117,9 @@ mkDerivation (rec {
         --with-gmp-libraries ${gmp}/lib
   '';
   passthru = {
+    inherit bootPkgs;
+    isCross = true;
     isGhcjs = true;
-    nativeGhc = ghc;
     inherit nodejs ghcjsBoot;
   };
 
diff --git a/pkgs/development/compilers/ghcjs/wrapper.nix b/pkgs/development/compilers/ghcjs/wrapper.nix
deleted file mode 100644
index 751b7d9a7de7..000000000000
--- a/pkgs/development/compilers/ghcjs/wrapper.nix
+++ /dev/null
@@ -1,77 +0,0 @@
-{ stdenv, ghc, makeWrapper, coreutils, writeScript }:
-let
-  ghcjs = ghc;
-  packageDBFlag = "-package-db";
-
-  GHCGetPackages = writeScript "ghc-get-packages.sh" ''
-    #! ${stdenv.shell}
-    # Usage:
-    #  $1: version of GHC
-    #  $2: invocation path of GHC
-    #  $3: prefix
-    version="$1"
-    if test -z "$3"; then
-      prefix="${packageDBFlag} "
-    else
-      prefix="$3"
-    fi
-    PATH="$PATH:$2"
-    IFS=":"
-    for p in $PATH; do
-      for i in "$p/../share/ghcjs/$system-${ghcjs.version}-${ghcjs.ghc.version}"{,/lib,/ghcjs}"/package.conf.d" "$p/../lib/ghcjs-${ghc.version}_ghc-${ghc.ghc.version}/package.conf.d" ; do
-        # output takes place here
-        test -f $i/package.cache && echo -n " $prefix$i"
-      done
-    done
-  '';
-
-  GHCPackages = writeScript "ghc-packages.sh" ''
-    #! ${stdenv.shell} -e
-    declare -A GHC_PACKAGES_HASH # using bash4 hashs to get uniq paths
-
-    for arg in $(${GHCGetPackages} ${ghcjs.version} "$(dirname $0)"); do # Why is ghc.version passed in from here instead of captured in the other script directly?
-      case "$arg" in
-        ${packageDBFlag}) ;;
-        *)
-          CANONICALIZED="$(${coreutils}/bin/readlink -f -- "$arg")"
-          GHC_PACKAGES_HASH["$CANONICALIZED"]= ;;
-      esac
-    done
-
-    for path in ''${!GHC_PACKAGES_HASH[@]}; do
-      echo -n "$path:"
-    done
-  '';
-in
-stdenv.mkDerivation {
-  name = "ghcjs-ghc${ghcjs.ghc.version}-${ghcjs.version}-wrapper";
-
-  buildInputs = [makeWrapper];
-  propagatedBuildInputs = [ghcjs];
-
-  unpackPhase = "true";
-  installPhase = ''
-    runHook preInstall
-
-    mkdir -p $out/bin
-    for prg in ghcjs ; do
-      makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghcjs.version} \"\$(dirname \$0)\")"
-    done
-    for prg in ghcjs-pkg ; do
-      makeWrapper $ghc/bin/$prg $out/bin/$prg --add-flags "\$(${GHCGetPackages} ${ghcjs.version} \"\$(dirname \$0)\" -${packageDBFlag}=)"
-    done
-
-    mkdir -p $out/nix-support
-    ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
-
-    mkdir -p $out/share/doc
-    ln -s $ghc/lib $out/lib
-    ln -s $ghc/share/doc/ghc $out/share/doc/ghc-${ghcjs.version}
-
-    runHook postInstall
-  '';
-
-  ghc = ghcjs;
-  inherit GHCGetPackages GHCPackages;
-  inherit (ghcjs) meta version;
-}
diff --git a/pkgs/development/compilers/go/1.6.nix b/pkgs/development/compilers/go/1.6.nix
new file mode 100644
index 000000000000..cb1d396f50a1
--- /dev/null
+++ b/pkgs/development/compilers/go/1.6.nix
@@ -0,0 +1,141 @@
+{ stdenv, lib, fetchurl, tzdata, iana_etc, go_1_4, runCommand
+, perl, which, pkgconfig, patch
+, pcre
+, Security, Foundation }:
+
+let
+  goBootstrap = runCommand "go-bootstrap" {} ''
+    mkdir $out
+    cp -rf ${go_1_4}/* $out/
+    chmod -R u+w $out
+    find $out -name "*.c" -delete
+    cp -rf $out/bin/* $out/share/go/bin/
+  '';
+in
+
+stdenv.mkDerivation rec {
+  name = "go-${version}";
+  version = "1.6";
+
+  src = fetchurl {
+    url = "https://github.com/golang/go/archive/go${version}.tar.gz";
+    sha256 = "04g7w34qamgy9gqpy75xm03s8xbbslv1735iv1a06z8sphpkgs7m";
+  };
+
+  # perl is used for testing go vet
+  nativeBuildInputs = [ perl which pkgconfig patch ];
+  buildInputs = [ pcre ];
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [
+    Security Foundation
+  ];
+
+  # I'm not sure what go wants from its 'src', but the go installation manual
+  # describes an installation keeping the src.
+  preUnpack = ''
+    mkdir -p $out/share
+    cd $out/share
+  '';
+
+  prePatch = ''
+    # Ensure that the source directory is named go
+    cd ..
+    if [ ! -d go ]; then
+      mv * go
+    fi
+
+    cd go
+    patchShebangs ./ # replace /bin/bash
+
+    # Disabling the 'os/http/net' tests (they want files not available in
+    # chroot builds)
+    rm src/net/{listen,parse}_test.go
+    rm src/syscall/exec_linux_test.go
+    # !!! substituteInPlace does not seems to be effective.
+    # The os test wants to read files in an existing path. Just don't let it be /usr/bin.
+    sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
+    sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
+    # Disable the unix socket test
+    sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
+    # Disable the hostname test
+    sed -i '/TestHostname/areturn' src/os/os_test.go
+    # ParseInLocation fails the test
+    sed -i '/TestParseInSydney/areturn' src/time/format_test.go
+    # Remove the api check as it never worked
+    sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
+    # Remove the coverage test as we have removed this utility
+    sed -i '/TestCoverageWithCgo/areturn' src/cmd/go/go_test.go
+
+    sed -i 's,/etc/protocols,${iana_etc}/etc/protocols,' src/net/lookup_unix.go
+    sed -i 's,/etc/services,${iana_etc}/etc/services,' src/net/port_unix.go
+  '' + lib.optionalString stdenv.isLinux ''
+    sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/race.bash --replace \
+      "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
+    sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
+    sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
+    sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
+    sed -i '/TestCgoLookupIP/areturn' src/net/cgo_unix_test.go
+    sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
+    sed -i '/TestRead0/areturn' src/os/os_test.go
+    sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
+    sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
+
+    sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
+    sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
+
+    sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go
+
+    touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
+  '';
+
+  patches = [
+    ./cacert-1.5.patch
+    ./remove-tools-1.5.patch
+  ]
+  # -ldflags=-s is required to compile on Darwin, see
+  # https://github.com/golang/go/issues/11994
+  ++ stdenv.lib.optional stdenv.isDarwin ./strip.patch;
+
+  GOOS = if stdenv.isDarwin then "darwin" else "linux";
+  GOARCH = if stdenv.isDarwin then "amd64"
+           else if stdenv.system == "i686-linux" then "386"
+           else if stdenv.system == "x86_64-linux" then "amd64"
+           else if stdenv.isArm then "arm"
+           else throw "Unsupported system";
+  GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
+  GO386 = 387; # from Arch: don't assume sse2 on i686
+  CGO_ENABLED = 1;
+  GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
+
+  # The go build actually checks for CC=*/clang and does something different, so we don't
+  # just want the generic `cc` here.
+  CC = if stdenv.isDarwin then "clang" else "cc";
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    export GOROOT="$(pwd)/"
+    export GOBIN="$out/bin"
+    export PATH="$GOBIN:$PATH"
+    cd ./src
+    echo Building
+    ./all.bash
+  '';
+
+  preFixup = ''
+    rm -r $out/share/go/pkg/bootstrap
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  disallowedReferences = [ go_1_4 ];
+
+  meta = with stdenv.lib; {
+    branch = "1.6";
+    homepage = http://golang.org/;
+    description = "The Go Programming language";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ cstrahan wkennington ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index b871b7d73faa..8b54a19c2b59 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -56,8 +56,17 @@ let
   inherit (stdenv.lib) optional optionals optionalString versionOlder
                        concatStringsSep enableFeature optionalAttrs toUpper;
 
+  isCross = ghc.isCross or false;
   isGhcjs = ghc.isGhcjs or false;
-  nativeGhc = if isGhcjs then ghc.nativeGhc else ghc;
+  packageDbFlag = if isGhcjs || versionOlder "7.6" ghc.version
+                  then "package-db"
+                  else "package-conf";
+
+  nativeGhc = if isCross then ghc.bootPkgs.ghc else ghc;
+  nativeIsCross = nativeGhc.isCross or false;
+  nativePackageDbFlag = if versionOlder "7.6" nativeGhc.version
+                        then "package-db"
+                        else "package-conf";
 
   newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
   newCabalFile = fetchurl {
@@ -71,9 +80,6 @@ let
                      main = defaultMain
                    '';
 
-  ghc76xOrLater = isGhcjs || stdenv.lib.versionOlder "7.6" ghc.version;
-  packageDbFlag = if ghc76xOrLater then "package-db" else "package-conf";
-
   hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling);
 
   # We cannot enable -j<n> parallelism for libraries because GHC is far more
@@ -97,7 +103,7 @@ let
     (optionalString (isGhcjs || versionOlder "7.4" ghc.version) (enableFeature enableSharedExecutables "executable-dynamic"))
     (optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature doCheck "tests"))
   ] ++ optionals isGhcjs [
-    "--with-hsc2hs=${ghc.nativeGhc}/bin/hsc2hs"
+    "--with-hsc2hs=${nativeGhc}/bin/hsc2hs"
     "--ghcjs"
   ];
 
@@ -125,7 +131,7 @@ let
 
   ghcEnv = ghc.withPackages (p: haskellBuildInputs);
 
-  setupBuilder = if isGhcjs then "${nativeGhc}/bin/ghc" else ghcCommand;
+  setupBuilder = if isCross then "${nativeGhc}/bin/ghc" else ghcCommand;
   setupCommand = "./Setup";
   ghcCommand = if isGhcjs then "ghcjs" else "ghc";
   ghcCommandCaps = toUpper ghcCommand;
diff --git a/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix b/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix
index c5b9fba37aa0..effd343ecfd9 100644
--- a/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix
+++ b/pkgs/development/interpreters/ruby/build-ruby-gem/default.nix
@@ -50,24 +50,24 @@ lib.makeOverridable (
 , passthru ? {}
 , ...} @ attrs:
 
-if ! builtins.elem type [ "git" "gem" ]
-then throw "buildRubyGem: don't know how to build a gem of type \"${type}\""
-else
-
 let
   shellEscape = x: "'${lib.replaceChars ["'"] [("'\\'" + "'")] x}'";
   rubygems = (attrs.rubygems or defs.rubygems).override {
     inherit ruby;
   };
   src = attrs.src or (
-    if type == "gem"
-    then fetchurl {
-      urls = map (remote: "${remote}/gems/${gemName}-${version}.gem") remotes;
-      inherit (attrs) sha256;
-    } else fetchgit {
-      inherit (attrs) url rev sha256 fetchSubmodules;
-      leaveDotGit = true;
-    }
+    if type == "gem" then
+      fetchurl {
+        urls = map (remote: "${remote}/gems/${gemName}-${version}.gem") remotes;
+        inherit (attrs) sha256;
+      }
+    else if type == "git" then
+      fetchgit {
+        inherit (attrs) url rev sha256 fetchSubmodules;
+        leaveDotGit = true;
+      }
+    else
+      throw "buildRubyGem: don't know how to build a gem of type \"${type}\""
   );
   documentFlag =
     if document == []
diff --git a/pkgs/development/interpreters/ruby/gemconfig/default.nix b/pkgs/development/interpreters/ruby/gemconfig/default.nix
index 787c3be54e35..dd4ae725095d 100644
--- a/pkgs/development/interpreters/ruby/gemconfig/default.nix
+++ b/pkgs/development/interpreters/ruby/gemconfig/default.nix
@@ -21,6 +21,7 @@
 , libiconv, postgresql, v8_3_16_14, clang, sqlite, zlib, imagemagick
 , pkgconfig , ncurses, xapian, gpgme, utillinux, fetchpatch, tzdata, icu, libffi
 , cmake, libssh2, openssl, mysql, darwin, git, perl, gecode_3, curl
+, libmsgpack
 }:
 
 let
@@ -40,6 +41,10 @@ in
     '';
   };
 
+  eventmachine = attrs: {
+    buildInputs = [ openssl ];
+  };
+
   ffi = attrs: {
     buildInputs = [ libffi pkgconfig ];
   };
@@ -56,6 +61,10 @@ in
     buildFlags = [ "--with-system-v8=true" ];
   };
 
+  msgpack = attrs: {
+    buildInputs = [ libmsgpack ];
+  };
+
   mysql2 = attrs: {
     buildInputs = [ mysql.lib zlib openssl ];
   };
diff --git a/pkgs/development/libraries/libcrossguid/default.nix b/pkgs/development/libraries/libcrossguid/default.nix
new file mode 100644
index 000000000000..cf142ac68c42
--- /dev/null
+++ b/pkgs/development/libraries/libcrossguid/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, libuuid }:
+
+stdenv.mkDerivation rec {
+  name = "lib" + pname + "-" + version;
+  pname = "crossguid";
+  version = "2016-02-21";
+
+  src = fetchFromGitHub {
+    owner = "graeme-hill";
+    repo = pname;
+    rev = "8f399e8bd4252be9952f3dfa8199924cc8487ca4";
+    sha256 = "1i29y207qqddvaxbn39pk2fbh3gx8zvdprfp35wasj9rw2wjk3s9";
+  };
+
+  buildInputs = [ libuuid ];
+
+  buildPhase = ''
+    g++ -c guid.cpp -o guid.o $CXXFLAGS -std=c++11 -DGUID_LIBUUID
+    ar rvs libcrossguid.a guid.o
+  '';
+  installPhase = ''
+    mkdir -p $out/{lib,include}
+    install -D -m644 libcrossguid.a "$out/lib/libcrossguid.a"
+    install -D -m644 guid.h "$out/include/guid.h"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Lightweight cross platform C++ GUID/UUID library";
+    license = licenses.mit;
+    maintainers = with maintainers; [ edwtjo ];
+    homepage = https://github.com/graeme-hill/crossguid;
+  };
+
+}
\ No newline at end of file
diff --git a/pkgs/development/libraries/vmmlib/default.nix b/pkgs/development/libraries/vmmlib/default.nix
new file mode 100644
index 000000000000..3a7f8770e6c7
--- /dev/null
+++ b/pkgs/development/libraries/vmmlib/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, blas }:
+
+stdenv.mkDerivation rec {
+  version = "1.6.2";
+  name = "vmmlib-${version}";
+  buildInputs = [ stdenv pkgconfig cmake boost blas ];
+
+  src = fetchFromGitHub {
+    owner = "VMML";
+    repo = "vmmlib";
+    rev = "release-${version}";
+    sha256 = "0sn6jl1r5k6ka0vkjsdnn14hb95dqq8158dapby6jk72wqj9kdml";
+  };
+
+  patches = [ 
+		./disable-cpack.patch   #disable the need of cpack/rpm
+	    ];
+  
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  checkTarget = "test";
+
+  meta = with stdenv.lib; {
+    description = "A vector and matrix math library implemented using C++ templates";
+
+    longDescription = ''vmmlib is a vector and matrix math library implemented 
+            using C++ templates. Its basic functionality includes a vector 
+            and a matrix class, with additional functionality for the 
+            often-used 3d and 4d vectors and 3x3 and 4x4 matrices.
+            More advanced functionality include solvers, frustum 
+            computations and frustum culling classes, and spatial data structures'';
+
+    license     = licenses.bsd2;
+    homepage    = http://github.com/VMML/vmmlib/;
+    maintainers = [ maintainers.adev ];
+    platforms   = platforms.all;
+  };  
+}
+
diff --git a/pkgs/development/libraries/vmmlib/disable-cpack.patch b/pkgs/development/libraries/vmmlib/disable-cpack.patch
new file mode 100644
index 000000000000..8b9a7983a928
--- /dev/null
+++ b/pkgs/development/libraries/vmmlib/disable-cpack.patch
@@ -0,0 +1,11 @@
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	1970-01-01 00:00:01.000000000 +0000
++++ b/CMakeLists.txt	2016-02-19 08:49:30.053759000 +0000
+@@ -178,6 +178,5 @@
+ install(FILES ${DOCS} DESTINATION share/vmmlib COMPONENT dev)
+ 
+ include(DoxygenRule) # must be after all targets
+-include(CPackConfig)
+ include(CTest)
+-include(PackageConfig)
++
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix
index 15f369a44f2d..1fdbd4ffc0bd 100644
--- a/pkgs/development/python-modules/generic/default.nix
+++ b/pkgs/development/python-modules/generic/default.nix
@@ -42,6 +42,9 @@
 # generated binaries.
 , makeWrapperArgs ? []
 
+# Additional flags to pass to "pip install".
+, installFlags ? []
+
 , ... } @ attrs:
 
 
@@ -95,7 +98,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
     export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
 
     pushd dist
-    ${bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache
+    ${bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache ${toString installFlags}
     popd
 
     runHook postInstall
diff --git a/pkgs/development/tools/dcadec/default.nix b/pkgs/development/tools/dcadec/default.nix
new file mode 100644
index 000000000000..ba2c13fbc3b2
--- /dev/null
+++ b/pkgs/development/tools/dcadec/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = pname + "-" + version;
+  pname = "dcadec";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "foo86";
+    repo = pname;
+    rev = "v" + version;
+    sha256 = "07nd0ajizrp1w02bsyfcv18431r8m8rq8gjfmz9wmckpg7cxj2hs";
+  };
+
+  installPhase = "make PREFIX=/ DESTDIR=$out install";
+
+  meta = with stdenv.lib; {
+    description = "DTS Coherent Acoustics decoder with support for HD extensions.";
+    maintainers = with maintainers; [ edwtjo ];
+    homepage = http://github.com/foo86/dcadec;
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+  };
+}
\ No newline at end of file