about summary refs log tree commit diff
path: root/pkgs/development/tools/misc
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-05-26 09:48:55 +0200
committerVladimír Čunát <v@cunat.cz>2019-05-26 09:48:55 +0200
commitb4ae841b238a0663b069df1de49ae9ef7c8d76ba (patch)
tree7b5bc3e2f529ade9240b4e07d5868ac57c54f613 /pkgs/development/tools/misc
parente775638efdd1a1fbefaf0192de169671f61515d7 (diff)
parentb2ab860db3996f28236c9ed92f08831dd6c6c5ef (diff)
downloadnixlib-b4ae841b238a0663b069df1de49ae9ef7c8d76ba.tar
nixlib-b4ae841b238a0663b069df1de49ae9ef7c8d76ba.tar.gz
nixlib-b4ae841b238a0663b069df1de49ae9ef7c8d76ba.tar.bz2
nixlib-b4ae841b238a0663b069df1de49ae9ef7c8d76ba.tar.lz
nixlib-b4ae841b238a0663b069df1de49ae9ef7c8d76ba.tar.xz
nixlib-b4ae841b238a0663b069df1de49ae9ef7c8d76ba.tar.zst
nixlib-b4ae841b238a0663b069df1de49ae9ef7c8d76ba.zip
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r--pkgs/development/tools/misc/indent/darwin.patch15
-rw-r--r--pkgs/development/tools/misc/indent/default.nix18
-rw-r--r--pkgs/development/tools/misc/nrfutil/default.nix33
-rw-r--r--pkgs/development/tools/misc/patchelf/unstable.nix6
-rw-r--r--pkgs/development/tools/misc/saleae-logic/default.nix39
-rw-r--r--pkgs/development/tools/misc/sloccount/default.nix10
-rw-r--r--pkgs/development/tools/misc/strace/default.nix4
-rw-r--r--pkgs/development/tools/misc/tokei/default.nix6
-rw-r--r--pkgs/development/tools/misc/whatstyle/default.nix30
9 files changed, 127 insertions, 34 deletions
diff --git a/pkgs/development/tools/misc/indent/darwin.patch b/pkgs/development/tools/misc/indent/darwin.patch
new file mode 100644
index 000000000000..5458a0d93bff
--- /dev/null
+++ b/pkgs/development/tools/misc/indent/darwin.patch
@@ -0,0 +1,15 @@
+diff --git a/config.h.in b/config.h.in
+index 07e6fce..0c57e2a 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -432,8 +432,8 @@
+ # endif
+ # define _GL_EXTERN_INLINE extern
+ #else
+-# define _GL_INLINE static _GL_UNUSED
+-# define _GL_EXTERN_INLINE static _GL_UNUSED
++# define _GL_INLINE static
++# define _GL_EXTERN_INLINE static
+ #endif
+ 
+ #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix
index 996043c16d87..c4b5fecca741 100644
--- a/pkgs/development/tools/misc/indent/default.nix
+++ b/pkgs/development/tools/misc/indent/default.nix
@@ -1,23 +1,27 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, texinfo }:
 
 stdenv.mkDerivation rec {
-  name = "indent-2.2.10";
+  name = "indent-2.2.12";
 
   src = fetchurl {
     url = "mirror://gnu/indent/${name}.tar.gz";
-    sha256 = "0f9655vqdvfwbxvs1gpa7py8k1z71aqh8hp73f65vazwbfz436wa";
+    sha256 = "12xvcd16cwilzglv9h7sgh4h1qqjd1h8s48ji2dla58m4706hzg7";
   };
 
-  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
-    sed -i 's|#include <malloc.h>|#include <malloc/malloc.h>|' ./man/texinfo2man.c
-  '';
+  patches = [ ./darwin.patch ];
+
+  buildInputs = [ texinfo ];
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang
+    "-Wno-implicit-function-declaration";
 
   hardeningDisable = [ "format" ];
 
   meta = {
-    homepage = https://www.gnu.org/software/indent/;
+    homepage = "https://www.gnu.org/software/indent/";
     description = "A source code reformatter";
     license = stdenv.lib.licenses.gpl3Plus;
+    maintainers = [ stdenv.lib.maintainers.mmahut ];
     platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/misc/nrfutil/default.nix b/pkgs/development/tools/misc/nrfutil/default.nix
new file mode 100644
index 000000000000..0a6155e649e5
--- /dev/null
+++ b/pkgs/development/tools/misc/nrfutil/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, python2Packages, fetchFromGitHub }:
+
+with python2Packages; buildPythonApplication rec {
+  pname = "nrfutil";
+  version = "5.2.0";
+
+  src = fetchFromGitHub {
+    owner = "NordicSemiconductor";
+    repo = "pc-nrfutil";
+    rev = "v${version}";
+    sha256 = "1hajjgz8r4fjbwqr22p5dvb6k83dpxf8k7mhx20gkbrrx9ivqh79";
+  };
+
+  propagatedBuildInputs = [ pc-ble-driver-py six pyserial enum34 click ecdsa
+    protobuf tqdm piccata pyspinel intelhex pyyaml crcmod libusb1 ipaddress ];
+
+  checkInputs = [ nose behave ];
+
+  postPatch = ''
+    # remove version bound on pyyaml
+    sed -i /pyyaml/d requirements.txt
+
+    mkdir test-reports
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Device Firmware Update tool for nRF chips";
+    homepage = "https://github.com/NordicSemiconductor/pc-nrfutil";
+    license = licenses.unfreeRedistributable;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ gebner ];
+  };
+}
diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix
index 0c5ec6404260..29d713a9af44 100644
--- a/pkgs/development/tools/misc/patchelf/unstable.nix
+++ b/pkgs/development/tools/misc/patchelf/unstable.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "patchelf-${version}";
-  version = "0.10-pre-20180509";
+  version = "0.10-pre-20190328";
 
   src = fetchFromGitHub {
     owner = "NixOS";
     repo = "patchelf";
-    rev = "27ffe8ae871e7a186018d66020ef3f6162c12c69";
-    sha256 = "1sfkqsvwqqm2kdgkiddrxni86ilbrdw5my29szz81nj1m2j16asr";
+    rev = "e1e39f3639e39360ceebb2f7ed533cede4623070";
+    sha256 = "09q1b1yqfzg1ih51v7qjh55vxfdbd8x5anycl8sfz6qy107wr02k";
   };
 
   # Drop test that fails on musl (?)
diff --git a/pkgs/development/tools/misc/saleae-logic/default.nix b/pkgs/development/tools/misc/saleae-logic/default.nix
index 18ffc238f0d1..19e4423f7d86 100644
--- a/pkgs/development/tools/misc/saleae-logic/default.nix
+++ b/pkgs/development/tools/misc/saleae-logic/default.nix
@@ -9,7 +9,7 @@
 { stdenv, fetchurl, unzip, glib, libSM, libICE, gtk2, libXext, libXft
 , fontconfig, libXrender, libXfixes, libX11, libXi, libXrandr, libXcursor
 , freetype, libXinerama, libxcb, zlib, pciutils
-, makeDesktopItem, xkeyboardconfig, runtimeShell
+, makeDesktopItem, xkeyboardconfig, dbus, runtimeShell, libGL
 }:
 
 let
@@ -17,30 +17,23 @@ let
   libPath = stdenv.lib.makeLibraryPath [
     glib libSM libICE gtk2 libXext libXft fontconfig libXrender libXfixes libX11
     libXi libXrandr libXcursor freetype libXinerama libxcb zlib stdenv.cc.cc.lib
+    dbus libGL
   ];
 
 in
 
+assert stdenv.hostPlatform.system == "x86_64-linux";
+
 stdenv.mkDerivation rec {
   pname = "saleae-logic";
-  version = "1.2.10";
+  version = "1.2.18";
   name = "${pname}-${version}";
 
-  src =
-    if stdenv.hostPlatform.system == "i686-linux" then
-      fetchurl {
-        name = "saleae-logic-${version}-32bit.zip";
-        url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(32-bit).zip";
-        sha256 = "1dyrj07cgj2fvwi1sk97vady9ri8f8n7mxy9zyzmw9isngs7bmll";
-      }
-    else if stdenv.hostPlatform.system == "x86_64-linux" then
-      fetchurl {
-        name = "saleae-logic-${version}-64bit.zip";
-        url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(64-bit).zip";
-        sha256 = "1skx2pfnic7pyss7c69qb7kg2xvflpxf112xkf9awk516dw1w4h7";
-      }
-    else
-      throw "Saleae Logic software requires i686-linux or x86_64-linux";
+  src = fetchurl {
+    name = "saleae-logic-${version}-64bit.zip";
+    url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(64-bit).zip";
+    sha256 = "0lhair2vsg8sjvzicvfcjfmvy30q7i01xj4z02iqh7pgzpb025h8";
+  };
 
   desktopItem = makeDesktopItem {
     name = "saleae-logic";
@@ -61,7 +54,15 @@ stdenv.mkDerivation rec {
 
     # Patch it
     patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic"
-    patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic"
+    for bin in "$out/Logic"              \
+               "$out/libQt5Widgets.so.5" \
+               "$out/libQt5Gui.so.5"     \
+               "$out/libQt5Core.so.5"    \
+               "$out/libQt5Network.so.5" ; do
+        patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$bin"
+    done
+
+    patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64:${libPath}:\$ORIGIN/../" "$out/platforms/libqxcb.so"
 
     # Build the LD_PRELOAD library that makes Logic work from a read-only directory
     mkdir -p "$out/lib"
@@ -91,7 +92,7 @@ stdenv.mkDerivation rec {
     description = "Software for Saleae logic analyzers";
     homepage = http://www.saleae.com/;
     license = licenses.unfree;
-    platforms = [ "x86_64-linux" "i686-linux" ];
+    platforms = platforms.linux;
     maintainers = [ maintainers.bjornfor ];
   };
 }
diff --git a/pkgs/development/tools/misc/sloccount/default.nix b/pkgs/development/tools/misc/sloccount/default.nix
index 28500ee08eee..965f0ed096cd 100644
--- a/pkgs/development/tools/misc/sloccount/default.nix
+++ b/pkgs/development/tools/misc/sloccount/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, perl }:
+{ fetchurl, stdenv, perl, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "sloccount-2.26";
@@ -8,6 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ perl ];
 
   # Make sure the Flex-generated files are newer than the `.l' files, so that
@@ -40,6 +41,13 @@ stdenv.mkDerivation rec {
     mkdir -p "$out/share/doc"
   '';
 
+  postInstall = ''
+    for w in "$out/bin"/*; do
+      isScript "$w" || continue
+      wrapProgram "$w" --prefix PATH : "$out/bin"
+    done
+    '';
+
   meta = {
     description = "Set of tools for counting physical Source Lines of Code (SLOC)";
 
diff --git a/pkgs/development/tools/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix
index c3553d049818..49b12b60b146 100644
--- a/pkgs/development/tools/misc/strace/default.nix
+++ b/pkgs/development/tools/misc/strace/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "strace-${version}";
-  version = "5.0";
+  version = "5.1";
 
   src = fetchurl {
     url = "https://strace.io/files/${version}/${name}.tar.xz";
-    sha256 = "1nj7wvsdmhpp53yffj1pnrkjn96mxrbcraa6h03wc7dqn9zdfyiv";
+    sha256 = "12wsga1v3rab24gr0mpfip7j7gwr90m8f9h6fviqxa3xgnwl38zm";
   };
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
diff --git a/pkgs/development/tools/misc/tokei/default.nix b/pkgs/development/tools/misc/tokei/default.nix
index f9b4343a63a7..de60d91bf837 100644
--- a/pkgs/development/tools/misc/tokei/default.nix
+++ b/pkgs/development/tools/misc/tokei/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, rustPlatform, libiconv }:
+{ stdenv, fetchFromGitHub, rustPlatform, libiconv, darwin }:
 
 rustPlatform.buildRustPackage rec {
   pname = "tokei";
@@ -13,7 +13,9 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "1xai3jxvs8r3s3v5d5w40miw6nihnj9gzlzzdrwphmgrkywr88c4";
 
-  buildInputs = [ libiconv ];
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [
+    libiconv darwin.apple_sdk.frameworks.Security
+  ];
 
   meta = with stdenv.lib; {
     description = "Program that displays statistics about your code";
diff --git a/pkgs/development/tools/misc/whatstyle/default.nix b/pkgs/development/tools/misc/whatstyle/default.nix
new file mode 100644
index 000000000000..0c6e4f568ffc
--- /dev/null
+++ b/pkgs/development/tools/misc/whatstyle/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, python3, fetchFromGitHub, clang-unwrapped }:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "whatstyle";
+  version = "0.1.7";
+  src = fetchFromGitHub {
+    owner = "mikr";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "16ak4g149cr764c1lqakiyzmf5s98w8bdc4gk69m8qacimfg3mzm";
+  };
+
+  # Fix references to previous version, to avoid confusion:
+  postPatch = ''
+    substituteInPlace setup.py --replace 0.1.6 ${version}
+    substituteInPlace ${pname}.py --replace 0.1.6 ${version}
+  '';
+
+  checkInputs = [ clang-unwrapped /* clang-format */ ];
+
+  doCheck = false; # 3 or 4 failures depending on version, haven't investigated.
+
+  meta = with stdenv.lib; {
+    description = "Find a code format style that fits given source files";
+    homepage = https://github.com/mikr/whatstyle;
+    license = licenses.mit;
+    maintainers = with maintainers; [ dtzWill ];
+    platforms = platforms.all;
+  };
+}