summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/go/1.5.nix143
-rw-r--r--pkgs/development/compilers/go/1.6.nix6
-rw-r--r--pkgs/development/compilers/go/1.7.nix6
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix3
-rw-r--r--pkgs/development/haskell-modules/generic-stack-builder.nix5
-rw-r--r--pkgs/development/haskell-modules/patches/spy.patch26
-rw-r--r--pkgs/development/libraries/cpp-hocon/default.nix26
-rw-r--r--pkgs/development/libraries/fontconfig/default.nix8
-rw-r--r--pkgs/development/libraries/fontconfig/make-fonts-cache.nix2
-rw-r--r--pkgs/development/libraries/fontconfig/make-fonts-conf.nix6
-rw-r--r--pkgs/development/libraries/java/rhino/default.nix2
-rw-r--r--pkgs/development/libraries/leatherman/default.nix8
-rw-r--r--pkgs/development/libraries/liborc/default.nix17
-rw-r--r--pkgs/development/libraries/libsoup/default.nix7
-rw-r--r--pkgs/development/libraries/ucommon/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/menhir/generic.nix8
-rw-r--r--pkgs/development/tools/build-managers/bear/default.nix32
-rw-r--r--pkgs/development/tools/misc/indent/default.nix2
-rw-r--r--pkgs/development/tools/rtags/default.nix7
19 files changed, 142 insertions, 178 deletions
diff --git a/pkgs/development/compilers/go/1.5.nix b/pkgs/development/compilers/go/1.5.nix
deleted file mode 100644
index e6060f3ecec..00000000000
--- a/pkgs/development/compilers/go/1.5.nix
+++ /dev/null
@@ -1,143 +0,0 @@
-{ stdenv, lib, fetchFromGitHub, 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.5.4";
-
-  src = fetchFromGitHub {
-    owner = "golang";
-    repo = "go";
-    rev = "go${version}";
-    sha256 = "1lvk9awmkjbz5z4snv3q3b3r7ijfz97kig2wkqz6jmr7b0lp1fcy";
-  };
-
-  # perl is used for testing go vet
-  nativeBuildInputs = [ perl which pkgconfig patch ];
-  buildInputs = [ pcre ];
-  propagatedBuildInputs = lib.optionals stdenv.isDarwin [
-    Security Foundation
-  ];
-
-  hardeningDisable = [ "all" ];
-
-  # 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_test.go,parse_test.go,port_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
-  '' + 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 = [
-    ./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.5";
-    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/compilers/go/1.6.nix b/pkgs/development/compilers/go/1.6.nix
index bbf2a946ece..38b114d8d07 100644
--- a/pkgs/development/compilers/go/1.6.nix
+++ b/pkgs/development/compilers/go/1.6.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, tzdata, iana_etc, go_1_4, runCommand
+{ stdenv, lib, fetchurl, tzdata, iana_etc, go_bootstrap, runCommand
 , perl, which, pkgconfig, patch, fetchpatch
 , pcre
 , Security, Foundation, bash }:
@@ -6,7 +6,7 @@
 let
   goBootstrap = runCommand "go-bootstrap" {} ''
     mkdir $out
-    cp -rf ${go_1_4}/* $out/
+    cp -rf ${go_bootstrap}/* $out/
     chmod -R u+w $out
     find $out -name "*.c" -delete
     cp -rf $out/bin/* $out/share/go/bin/
@@ -143,7 +143,7 @@ stdenv.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
-  disallowedReferences = [ go_1_4 ];
+  disallowedReferences = [ go_bootstrap ];
 
   meta = with stdenv.lib; {
     branch = "1.6";
diff --git a/pkgs/development/compilers/go/1.7.nix b/pkgs/development/compilers/go/1.7.nix
index 89f56a2438c..bc298924eb8 100644
--- a/pkgs/development/compilers/go/1.7.nix
+++ b/pkgs/development/compilers/go/1.7.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, tzdata, iana_etc, go_1_4, runCommand
+{ stdenv, lib, fetchFromGitHub, tzdata, iana_etc, go_bootstrap, runCommand
 , perl, which, pkgconfig, patch, fetchpatch
 , pcre
 , Security, Foundation, bash }:
@@ -6,7 +6,7 @@
 let
   goBootstrap = runCommand "go-bootstrap" {} ''
     mkdir $out
-    cp -rf ${go_1_4}/* $out/
+    cp -rf ${go_bootstrap}/* $out/
     chmod -R u+w $out
     find $out -name "*.c" -delete
     cp -rf $out/bin/* $out/share/go/bin/
@@ -153,7 +153,7 @@ stdenv.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
-  disallowedReferences = [ go_1_4 ];
+  disallowedReferences = [ go_bootstrap ];
 
   meta = with stdenv.lib; {
     branch = "1.7";
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 19f190aa13e..7e1023134d5 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -998,4 +998,7 @@ self: super: {
     '';
   });
 
+  # https://bitbucket.org/ssaasen/spy/pull-requests/3/fsnotify-dropped-system-filepath
+  spy = appendPatch super.spy ./patches/spy.patch;
+
 }
diff --git a/pkgs/development/haskell-modules/generic-stack-builder.nix b/pkgs/development/haskell-modules/generic-stack-builder.nix
index 09bd38ccc93..c7cfbef7d13 100644
--- a/pkgs/development/haskell-modules/generic-stack-builder.nix
+++ b/pkgs/development/haskell-modules/generic-stack-builder.nix
@@ -19,12 +19,13 @@ stdenv.mkDerivation (args // {
   STACK_PLATFORM_VARIANT="nix";
   STACK_IN_NIX_SHELL=1;
   STACK_IN_NIX_EXTRA_ARGS =
-    concatMap (pkg: ["--extra-lib-dirs=${pkg}/lib"
-                     "--extra-include-dirs=${pkg}/include"]) buildInputs ++
+    concatMap (pkg: ["--extra-lib-dirs=${getLib pkg}/lib"
+                     "--extra-include-dirs=${getDev pkg}/include"]) buildInputs ++
     extraArgs;
 
   # XXX: workaround for https://ghc.haskell.org/trac/ghc/ticket/11042.
   LD_LIBRARY_PATH = makeLibraryPath (LD_LIBRARY_PATH ++ buildInputs);
+                    # ^^^ Internally uses `getOutput "lib"` (equiv. to getLib)
 
   preferLocalBuild = true;
 
diff --git a/pkgs/development/haskell-modules/patches/spy.patch b/pkgs/development/haskell-modules/patches/spy.patch
new file mode 100644
index 00000000000..4c4e1844361
--- /dev/null
+++ b/pkgs/development/haskell-modules/patches/spy.patch
@@ -0,0 +1,26 @@
+diff --git a/src/Spy/Watcher.hs b/src/Spy/Watcher.hs
+     index 8512613..4df67d4 100644
+--- a/src/Spy/Watcher.hs
++++ b/src/Spy/Watcher.hs
+@@ -50,7 +50,7 @@ plainFormat = Plain
+ spy :: Spy -> IO b -> IO ()
+ spy config after = withManager $ \wm ->
+     runIndefinitely
+-      (watchTree wm (decodeString $ dir config)
++      (watchTree wm (dir config)
+                   (not . skipEvent config . eventPath)
+                   (handleEvent config)) 
+       (const after)
+@@ -106,9 +106,9 @@ eventTime (Modified _ t) = t
+ eventTime (Removed _ t) = t
+ 
+ eventPath :: Event -> FilePath
+-eventPath (Added fp _) = encodeString fp
+-eventPath (Modified fp _) = encodeString fp
+-eventPath (Removed fp _) = encodeString fp
++eventPath (Added fp _) = fp
++eventPath (Modified fp _) = fp
++eventPath (Removed fp _) = fp
+ 
+ eventType :: Event -> FilePath
+ eventType (Added _ _) = "Added"
diff --git a/pkgs/development/libraries/cpp-hocon/default.nix b/pkgs/development/libraries/cpp-hocon/default.nix
new file mode 100644
index 00000000000..3c4fe70c19d
--- /dev/null
+++ b/pkgs/development/libraries/cpp-hocon/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, cmake, boost, curl, leatherman }:
+
+stdenv.mkDerivation rec {
+  name = "cpp-hocon-${version}";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    sha256 = "0v2mnak6fh13dkl25lfvw1la2dfjqrh3lq1d40r3a52m56vwflrg";
+    rev = version;
+    repo = "cpp-hocon";
+    owner = "puppetlabs";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boost curl leatherman ];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = " A C++ port of the Typesafe Config library";
+    license = licenses.asl20;
+    maintainers = [ maintainers.womfoo ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix
index fa418af5601..550ec2bf5c3 100644
--- a/pkgs/development/libraries/fontconfig/default.nix
+++ b/pkgs/development/libraries/fontconfig/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, freetype, expat, libxslt, fontbhttf
+{ stdenv, fetchurl, fetchpatch, pkgconfig, freetype, expat, libxslt, dejavu_fonts
 , substituteAll }:
 
 /** Font configuration scheme
@@ -44,8 +44,8 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-cache-dir=/var/cache/fontconfig" # otherwise the fallback is in $out/
     "--disable-docs"
-    # just ~1MB; this is what you get when loading config fails for some reason
-    "--with-default-fonts=${fontbhttf}"
+    # just <1MB; this is what you get when loading config fails for some reason
+    "--with-default-fonts=${dejavu_fonts.minimal}"
   ];
 
   # We should find a better way to access the arch reliably.
@@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
 
   postInstall = ''
     cd "$out/etc/fonts"
-    "${libxslt.bin}/bin/xsltproc" --stringparam fontDirectories "${fontbhttf}" \
+    "${libxslt.bin}/bin/xsltproc" --stringparam fontDirectories "${dejavu_fonts.minimal}" \
       --stringparam fontconfigConfigVersion "${configVersion}" \
       --path $out/share/xml/fontconfig \
       ${./make-fonts-conf.xsl} $out/etc/fonts/fonts.conf \
diff --git a/pkgs/development/libraries/fontconfig/make-fonts-cache.nix b/pkgs/development/libraries/fontconfig/make-fonts-cache.nix
index b996cd228c7..53c2a335cc0 100644
--- a/pkgs/development/libraries/fontconfig/make-fonts-cache.nix
+++ b/pkgs/development/libraries/fontconfig/make-fonts-cache.nix
@@ -1,4 +1,4 @@
-{ runCommand, lib, writeText, fontconfig, fontbhttf, fontDirectories }:
+{ runCommand, lib, writeText, fontconfig, fontDirectories }:
 
 runCommand "fc-cache"
   rec {
diff --git a/pkgs/development/libraries/fontconfig/make-fonts-conf.nix b/pkgs/development/libraries/fontconfig/make-fonts-conf.nix
index 2d0a21ea9dd..3cd4a894b37 100644
--- a/pkgs/development/libraries/fontconfig/make-fonts-conf.nix
+++ b/pkgs/development/libraries/fontconfig/make-fonts-conf.nix
@@ -1,10 +1,10 @@
-{ runCommand, libxslt, fontconfig, fontbhttf, fontDirectories }:
+{ runCommand, libxslt, fontconfig, dejavu_fonts, fontDirectories }:
 
 runCommand "fonts.conf"
   {
     buildInputs = [ libxslt fontconfig ];
-    # Add a default font for non-nixos systems. fontbhttf is only about 1mb.
-    fontDirectories = fontDirectories ++ [ fontbhttf ];
+    # Add a default font for non-nixos systems, <1MB and in nixos defaults.
+    fontDirectories = fontDirectories ++ [ dejavu_fonts.minimal ];
   }
   ''
     xsltproc --stringparam fontDirectories "$fontDirectories" \
diff --git a/pkgs/development/libraries/java/rhino/default.nix b/pkgs/development/libraries/java/rhino/default.nix
index 37ab6b4f8fd..f106bbe6ebc 100644
--- a/pkgs/development/libraries/java/rhino/default.nix
+++ b/pkgs/development/libraries/java/rhino/default.nix
@@ -20,6 +20,8 @@ stdenv.mkDerivation {
 
   patches = [ ./gcj-type-mismatch.patch ];
 
+  hardeningDisable = [ "fortify" "format" ];
+
   preConfigure =
     ''
       find -name \*.jar -or -name \*.class -exec rm -v {} \;
diff --git a/pkgs/development/libraries/leatherman/default.nix b/pkgs/development/libraries/leatherman/default.nix
index a4b007fa399..bc62a04808f 100644
--- a/pkgs/development/libraries/leatherman/default.nix
+++ b/pkgs/development/libraries/leatherman/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "leatherman-${version}";
-  version = "0.7.5";
+  version = "0.9.0";
 
   src = fetchFromGitHub {
-    sha256 = "103qzhjhgw7jh0xcaxag735wfm6q35xprq5wmdimfhhmmrmjr51g";
+    sha256 = "18nidasykbwdd9qzwc8pnzhczy6acr3rsxwvv2v3j5gq3nbsk2mc";
     rev = version;
     repo = "leatherman";
     owner = "puppetlabs";
@@ -13,10 +13,6 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ boost cmake curl ];
 
-  # curl upgrade to 7.50.0 (#17152) broke the curl mock tests, disabling for now
-  # upstream bug raised https://tickets.puppetlabs.com/browse/LTH-108
-  cmakeFlags = [ "-DLEATHERMAN_MOCK_CURL=OFF" ];
-
   meta = with stdenv.lib; {
     homepage = https://github.com/puppetlabs/leatherman/;  
     description = "A collection of C++ and CMake utility libraries";
diff --git a/pkgs/development/libraries/liborc/default.nix b/pkgs/development/libraries/liborc/default.nix
new file mode 100644
index 00000000000..2b298c97379
--- /dev/null
+++ b/pkgs/development/libraries/liborc/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "liborc-${version}";
+  version = "0.4.16";
+
+  src = fetchurl {
+    url = "http://http.debian.net/debian/pool/main/o/orc/orc_${version}.orig.tar.gz";
+    sha256 = "1asq58gm87ig60ib4cs69hyqhnsirqkdlidnchhx83halbdlw3kh";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = https://packages.debian.org/wheezy/liborc-0.4-0;
+    description = "Orc is a library and set of tools for compiling and executing very simple programs that operate on arrays of data.";
+    license = with licenses; [ bsd2 bsd3 ];
+  };
+}
diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix
index 66cc0720799..707129a16bb 100644
--- a/pkgs/development/libraries/libsoup/default.nix
+++ b/pkgs/development/libraries/libsoup/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, glib, libxml2, pkgconfig
 , gnomeSupport ? true, libgnome_keyring, sqlite, glib_networking, gobjectIntrospection
-, valaSupport ? true, vala_0_23
+, valaSupport ? true, vala_0_32
 , libintlOrEmpty
 , intltool, python }:
 let
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
   outputs = [ "out" "dev" ];
 
   buildInputs = libintlOrEmpty ++ [ intltool python sqlite ]
-    ++ stdenv.lib.optionals valaSupport [ vala_0_23 ];
+    ++ stdenv.lib.optionals valaSupport [ vala_0_32 ];
   nativeBuildInputs = [ pkgconfig ];
   propagatedBuildInputs = [ glib libxml2 gobjectIntrospection ]
     ++ stdenv.lib.optionals gnomeSupport [ libgnome_keyring ];
@@ -33,8 +33,7 @@ stdenv.mkDerivation {
 
   # glib_networking is a runtime dependency, not a compile-time dependency
   configureFlags = "--disable-tls-check"
-    + stdenv.lib.optionalString (!valaSupport) " --enable-vala=no"
-    + stdenv.lib.optionalString (valaSupport) " --enable-vala=yes"
+    + " --enable-vala=${if valaSupport then "yes" else "no"}"
     + stdenv.lib.optionalString (!gnomeSupport) " --without-gnome";
 
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
diff --git a/pkgs/development/libraries/ucommon/default.nix b/pkgs/development/libraries/ucommon/default.nix
index 50d8f5e8745..4d140932402 100644
--- a/pkgs/development/libraries/ucommon/default.nix
+++ b/pkgs/development/libraries/ucommon/default.nix
@@ -19,6 +19,12 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig ];
 
+  # disable flaky networking test
+  postPatch = ''
+    substituteInPlace test/stream.cpp \
+      --replace 'ifndef UCOMMON_SYSRUNTIME' 'if 0'
+  '';
+
   # ucommon.pc has link time depdendencies on -lssl, -lcrypto, -lz, -lgnutls
   propagatedBuildInputs = [ openssl zlib gnutls ];
 
diff --git a/pkgs/development/ocaml-modules/menhir/generic.nix b/pkgs/development/ocaml-modules/menhir/generic.nix
index 088c2db061b..c182d210049 100644
--- a/pkgs/development/ocaml-modules/menhir/generic.nix
+++ b/pkgs/development/ocaml-modules/menhir/generic.nix
@@ -13,16 +13,14 @@ stdenv.mkDerivation {
   createFindlibDestdir = true;
 
   preBuild = ''
-    #Fix makefiles.
+    # fix makefiles.
     RM=$(type -p rm)
     CHMOD=$(type -p chmod)
-    ENV=$(type -p env)
-    for f in src/Makefile demos/OMakefile* demos/Makefile* demos/ocamldep.wrapper
+    for f in src/Makefile demos/OMakefile* demos/Makefile*
     do
       substituteInPlace $f \
         --replace /bin/rm $RM \
-	--replace /bin/chmod $CHMOD \
-	--replace /usr/bin/env $ENV
+        --replace /bin/chmod $CHMOD
     done
 
     export PREFIX=$out
diff --git a/pkgs/development/tools/build-managers/bear/default.nix b/pkgs/development/tools/build-managers/bear/default.nix
new file mode 100644
index 00000000000..cc34a73ecd5
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bear/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, cmake, python }:
+
+stdenv.mkDerivation rec {
+  name = "bear-${version}";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "rizsotto";
+    repo = "Bear";
+    rev = version;
+    sha256 = "08llfqg8y6d7vfwaw5plrk1rrqzs0ywi2ldnlwvy917603971rg0";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ python ]; # just for shebang of bin/bear
+
+  doCheck = false; # all fail
+
+  meta = with stdenv.lib; {
+    description = "Tool that generates a compilation database for clang tooling";
+    longDescription = ''
+      Note: the bear command is very useful to generate compilation commands
+      e.g. for YouCompleteMe.  You just enter your development nix-shell
+      and run `bear make`.  It's not perfect, but it gets a long way.
+    '';
+    homepage = https://github.com/rizsotto/Bear;
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.vcunat ];
+  };
+}
+
diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix
index 594bef7e16a..996043c16d8 100644
--- a/pkgs/development/tools/misc/indent/default.nix
+++ b/pkgs/development/tools/misc/indent/default.nix
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
     sed -i 's|#include <malloc.h>|#include <malloc/malloc.h>|' ./man/texinfo2man.c
   '';
 
+  hardeningDisable = [ "format" ];
+
   meta = {
     homepage = https://www.gnu.org/software/indent/;
     description = "A source code reformatter";
diff --git a/pkgs/development/tools/rtags/default.nix b/pkgs/development/tools/rtags/default.nix
index 06ab4ffed3c..959681c7e1a 100644
--- a/pkgs/development/tools/rtags/default.nix
+++ b/pkgs/development/tools/rtags/default.nix
@@ -2,8 +2,7 @@
 
 stdenv.mkDerivation rec {
   name = "rtags-${version}";
-  version = "git-2016-04-29";
-  rev = "233543d343bf86fa31c35ee21242fa2da3a965ab";
+  version = "2.3";
 
   buildInputs = [ cmake llvmPackages.llvm openssl llvmPackages.clang emacs ];
 
@@ -13,10 +12,10 @@ stdenv.mkDerivation rec {
   '';
 
   src = fetchgit {
-    inherit rev;
+    rev = "refs/tags/v${version}";
     fetchSubmodules = true;
     url = "https://github.com/andersbakken/rtags.git";
-    sha256 = "10j1s7kvnd5823p1kgx3hyca9jz9j27y6xk0q208p095wf8hk105";
+    sha256 = "05kzch88x2wiimygfli6vsr9i5hzgkybsya8qx4zvb6daip4b7yf";
   };
 
   meta = {