summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2018-07-28 12:31:35 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2018-07-28 12:31:35 +0200
commit8db716d9f381b31b034b20a19b6904a35a16b140 (patch)
tree3d0b6e7fccc24203a3fc5ccc67c0c5d3e6a1231c /pkgs/development/tools
parent8364053af4723726b0129e3c049cfe98f30fdf09 (diff)
parent782342cf301a4e4fd6a840c37a8826af9344f818 (diff)
downloadnixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar
nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.gz
nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.bz2
nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.lz
nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.xz
nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.zst
nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/build-managers/bazel/default.nix14
-rw-r--r--pkgs/development/tools/misc/kibana/6.x.nix47
-rw-r--r--pkgs/development/tools/skopeo/default.nix6
3 files changed, 51 insertions, 16 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix
index b59a93d37324..56b64cd061b5 100644
--- a/pkgs/development/tools/build-managers/bazel/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/default.nix
@@ -26,7 +26,7 @@ let
 in
 stdenv.mkDerivation rec {
 
-  version = "0.15.1";
+  version = "0.15.2";
 
   meta = with stdenv.lib; {
     homepage = "https://github.com/bazelbuild/bazel/";
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
-    sha256 = "0v7wdwbxy4bcx488lm1glf4iv3wfdwbkg8fh6kmmmfn1lhgkaay6";
+    sha256 = "1w83zi6d9npi1jmiy022v92xp1cwdvn2qqgghlnl2v9sprryqlxz";
   };
 
   sourceRoot = ".";
@@ -128,10 +128,10 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     export TMPDIR=/tmp/.bazel-$UID
     ./compile.sh
-    ./output/bazel --output_user_root=$TMPDIR/.bazel build //scripts:bash_completion \
-      --spawn_strategy=standalone \
-      --genrule_strategy=standalone
-    cp bazel-bin/scripts/bazel-complete.bash output/
+    scripts/generate_bash_completion.sh \
+        --bazel=./output/bazel \
+        --output=output/bazel-complete.bash \
+        --prepend=scripts/bazel-complete-template.bash
   '';
 
   # Build the CPP and Java examples to verify that Bazel works.
@@ -149,7 +149,7 @@ stdenv.mkDerivation rec {
     mv output/bazel $out/bin
     wrapProgram "$out/bin/bazel" --set JAVA_HOME "${jdk}"
     mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions
-    mv output/bazel-complete.bash $out/share/bash-completion/completions/
+    mv output/bazel-complete.bash $out/share/bash-completion/completions/bazel
     cp scripts/zsh_completion/_bazel $out/share/zsh/site-functions/
   '';
 
diff --git a/pkgs/development/tools/misc/kibana/6.x.nix b/pkgs/development/tools/misc/kibana/6.x.nix
index 17620c9df6c8..1fd52f435574 100644
--- a/pkgs/development/tools/misc/kibana/6.x.nix
+++ b/pkgs/development/tools/misc/kibana/6.x.nix
@@ -1,4 +1,13 @@
-{ stdenv, makeWrapper, fetchurl, elk6Version, nodejs, coreutils, which }:
+{ elk6Version
+, enableUnfree ? true
+, stdenv
+, makeWrapper
+, fetchzip
+, fetchurl
+, nodejs
+, coreutils
+, which
+}:
 
 with stdenv.lib;
 let
@@ -6,12 +15,31 @@ let
   info = splitString "-" stdenv.system;
   arch = elemAt info 0;
   plat = elemAt info 1;
-  shas = {
-    "x86_64-linux"  = "1br9nvwa3i5sfcbnrxp2x3dxxnsbs9iavz6zwgw0jlh5ngf5vysk";
-    "x86_64-darwin" = "1w4dck02i0rrl8m18kvy2zz02cb7bb9a2pdhkd1jfy1qz4ssnhii";
+  shas =
+    if enableUnfree
+    then {
+      "x86_64-linux"  = "1kk97ggpzmblhqm6cfd2sv5940f58h323xcyg6rba1njj7lzanv0";
+      "x86_64-darwin" = "1xvwffk8d8br92h0laf4b1m76kvki6cj0pbgcvirfcj1r70vk6c3";
+    }
+    else {
+      "x86_64-linux"  = "0m81ki1v61gpwb3s6zf84azqrirlm9pdfx65g3xmvdp3d3wii5ly";
+      "x86_64-darwin" = "0zh9p6vsq1d0gh6ks7z6bh8sbhn6rm4jshjcfp3c9k7n2qa8vv9b";
+    };
+
+  # For the correct phantomjs version see:
+  # https://github.com/elastic/kibana/blob/master/x-pack/plugins/reporting/server/browsers/phantom/paths.js
+  phantomjs = rec {
+    name = "phantomjs-${version}-linux-x86_64";
+    version = "2.1.1";
+    src = fetchzip {
+      inherit name;
+      url = "https://github.com/Medium/phantomjs/releases/download/v${version}/${name}.tar.bz2";
+      sha256 = "0g2dqjzr2daz6rkd6shj6rrlw55z4167vqh7bxadl8jl6jk7zbfv";
+    };
   };
+
 in stdenv.mkDerivation rec {
-  name = "kibana-${version}";
+  name = "kibana-${optionalString (!enableUnfree) "oss-"}${version}";
   version = elk6Version;
 
   src = fetchurl {
@@ -28,12 +56,19 @@ in stdenv.mkDerivation rec {
     makeWrapper $out/libexec/kibana/bin/kibana $out/bin/kibana \
       --prefix PATH : "${stdenv.lib.makeBinPath [ nodejs coreutils which ]}"
     sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
+  '' +
+  # phantomjs is needed in the unfree version. When phantomjs doesn't exist in
+  # $out/libexec/kibana/data kibana will try to download and unpack it during
+  # runtime which will fail because the nix store is read-only. So we make sure
+  # it already exist in the nix store.
+  optionalString enableUnfree ''
+    ln -s ${phantomjs.src} $out/libexec/kibana/data/${phantomjs.name}
   '';
 
   meta = {
     description = "Visualize logs and time-stamped data";
     homepage = http://www.elasticsearch.org/overview/kibana;
-    license = licenses.asl20;
+    license = if enableUnfree then licenses.elastic else licenses.asl20;
     maintainers = with maintainers; [ offline rickynils basvandijk ];
     platforms = with platforms; unix;
   };
diff --git a/pkgs/development/tools/skopeo/default.nix b/pkgs/development/tools/skopeo/default.nix
index dc157b672530..48f9822ad869 100644
--- a/pkgs/development/tools/skopeo/default.nix
+++ b/pkgs/development/tools/skopeo/default.nix
@@ -28,7 +28,7 @@ buildGoPackage rec {
   excludedPackages = "integration";
 
   nativeBuildInputs = [ pkgconfig (lib.getBin go-md2man) ];
-  buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs ostree libselinux ];
+  buildInputs = [ gpgme ] ++ lib.optionals stdenv.isLinux [ libgpgerror lvm2 btrfs-progs ostree libselinux ];
 
   buildFlagsArray = ''
     -ldflags=
@@ -37,8 +37,8 @@ buildGoPackage rec {
   '';
 
   preBuild = ''
-    export CGO_CFLAGS="-I${getDev gpgme}/include -I${getDev libgpgerror}/include -I${getDev lvm2}/include -I${getDev btrfs-progs}/include"
-    export CGO_LDFLAGS="-L${getLib gpgme}/lib -L${getLib libgpgerror}/lib -L${getLib lvm2}/lib"
+    export CGO_CFLAGS="$CFLAGS"
+    export CGO_LDFLAGS="$LDFLAGS"
   '';
 
   postBuild = ''