summaryrefslogtreecommitdiffstats
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-11-21 14:40:40 -0800
committerJonathan Ringer <jonringer117@gmail.com>2021-11-21 14:40:40 -0800
commit09e494f4c296b29755fb8639e3f751f6aa706a45 (patch)
tree1f1ff77e46b78c8d91808fef8405361366867dd4 /pkgs/tools
parent6b8044795e4b7ff99b96259a4a6b09eb9380703d (diff)
parentb2181bc967053310657128d687e44ec683e7604b (diff)
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts: pkgs/applications/window-managers/sway/default.nix
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/archivers/arj/default.nix5
-rw-r--r--pkgs/tools/filesystems/gfs2-utils/default.nix16
-rw-r--r--pkgs/tools/misc/qmk/default.nix20
-rw-r--r--pkgs/tools/networking/netdiscover/default.nix26
-rw-r--r--pkgs/tools/security/jwt-cli/default.nix12
-rw-r--r--pkgs/tools/text/invoice2data/default.nix49
6 files changed, 105 insertions, 23 deletions
diff --git a/pkgs/tools/archivers/arj/default.nix b/pkgs/tools/archivers/arj/default.nix
index e09e390fa473..6f365e226e20 100644
--- a/pkgs/tools/archivers/arj/default.nix
+++ b/pkgs/tools/archivers/arj/default.nix
@@ -128,6 +128,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
+ postPatch = lib.optionalString stdenv.isDarwin ''
+ substituteInPlace environ.c \
+ --replace " #include <sys/statfs.h>" " #include <sys/mount.h>"
+ '';
+
preAutoreconf = ''
cd gnu
'';
diff --git a/pkgs/tools/filesystems/gfs2-utils/default.nix b/pkgs/tools/filesystems/gfs2-utils/default.nix
index ba479b87aa92..3f68888776cb 100644
--- a/pkgs/tools/filesystems/gfs2-utils/default.nix
+++ b/pkgs/tools/filesystems/gfs2-utils/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl
+{ lib, stdenv, fetchurl, fetchpatch
, autoreconfHook, bison, flex, pkg-config
, bzip2, check, ncurses, util-linux, zlib
}:
@@ -12,6 +12,20 @@ stdenv.mkDerivation rec {
sha256 = "sha256-gwKxBBG5PtG4/RxX4sUC25ZeG8K2urqVkFDKL7NS4ZI=";
};
+ patches = [
+ # pull pending upstream inclusion fix for ncurses-6.3: sent upstream over email.
+ (fetchpatch {
+ name = "ncurses-6.3.patch";
+ url = "https://pagure.io/fork/slyfox/gfs2-utils/c/c927b635f380cca77665195a3aaae804d92870a4.patch";
+ sha256 = "sha256-0M1xAqRXoUi2el03WODF/nqEe9JEE5GehMWs776QZNI=";
+ })
+ ];
+ postPatch = ''
+ # Apply fix for ncurses-6.3. Upstream development branch already reworked the code.
+ # To be removed on next reelase.
+ substituteInPlace gfs2/edit/gfs2hex.c --replace 'printw(title);' 'printw("%s",title);'
+ '';
+
outputs = [ "bin" "doc" "out" "man" ];
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
diff --git a/pkgs/tools/misc/qmk/default.nix b/pkgs/tools/misc/qmk/default.nix
index ef25a7361c26..5067e1e0fabe 100644
--- a/pkgs/tools/misc/qmk/default.nix
+++ b/pkgs/tools/misc/qmk/default.nix
@@ -1,16 +1,12 @@
-{ lib, python3, fetchpatch, writeText }:
+{ lib
+, python3
+}:
-let
- inherit (python3.pkgs) buildPythonApplication fetchPypi;
- setuppy = writeText "setup.py" ''
- from setuptools import setup
- setup()
- '';
-in buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
pname = "qmk";
version = "1.0.0";
- src = fetchPypi {
+ src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-2mLuxzxFSMw3sLm+OTcgLcOjAdwvJmNhDsynUaYQ+co=";
};
@@ -36,8 +32,12 @@ in buildPythonApplication rec {
pyusb
];
+ # buildPythonApplication requires setup.py; the setup.py file crafted below
+ # acts as a wrapper to setup.cfg
postConfigure = ''
- cp ${setuppy} setup.py
+ touch setup.py
+ echo "from setuptools import setup" >> setup.py
+ echo "setup()" >> setup.py
'';
# no tests implemented
diff --git a/pkgs/tools/networking/netdiscover/default.nix b/pkgs/tools/networking/netdiscover/default.nix
new file mode 100644
index 000000000000..1a7b93eef8ab
--- /dev/null
+++ b/pkgs/tools/networking/netdiscover/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, libpcap, libnet, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+ pname = "netdiscover";
+ version = "0.8.1";
+
+ src = fetchFromGitHub {
+ owner = "netdiscover-scanner";
+ repo = pname;
+ rev = version;
+ sha256 = "13fp9rfr9vh756m5wck76zbcr0296ir52dahzlqdr52ha9vrswbb";
+ };
+
+ nativeBuildInputs = [ autoreconfHook ];
+ buildInputs = [ libpcap libnet ];
+
+ # Running update-oui-database.sh would probably make the build irreproducible
+
+ meta = with lib; {
+ description = "A network address discovering tool, developed mainly for those wireless networks without dhcp server, it also works on hub/switched networks";
+ homepage = "https://github.com/netdiscover-scanner/netdiscover";
+ license = licenses.gpl3Plus;
+ maintainers = with maintainers; [ vdot0x23 ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/tools/security/jwt-cli/default.nix b/pkgs/tools/security/jwt-cli/default.nix
index e1cd9ec359f1..bf9a93f162b9 100644
--- a/pkgs/tools/security/jwt-cli/default.nix
+++ b/pkgs/tools/security/jwt-cli/default.nix
@@ -2,21 +2,25 @@
rustPlatform.buildRustPackage rec {
pname = "jwt-cli";
- version = "4.0.0";
+ version = "5.0.0";
src = fetchFromGitHub {
owner = "mike-engel";
repo = pname;
rev = version;
- sha256 = "sha256-82Le0kdt/fnSQwsRRYHy4Jv9rsCPGf5dIWmoZE2cPxY=";
+ sha256 = "0za4mpzry6i5gki524kp4by0n74pbc96cvzrkq286v8w033wj01i";
};
- cargoSha256 = "sha256-sCauVxc6JPJ4dBi5LOt+v9bdlRW+oF4cd/sfG5Xdv70=";
+ cargoSha256 = "1l5fhr5c2ygdlnpwsx62fm8di8li0wf15nvvcnnivjcic7f9b5j0";
buildInputs = lib.optional stdenv.isDarwin Security;
doInstallCheck = true;
- installCheckPhase = "$out/bin/jwt --version";
+ installCheckPhase = ''
+ $out/bin/jwt --version > /dev/null
+ $out/bin/jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c \
+ | grep -q 'John Doe'
+ '';
meta = with lib; {
description = "Super fast CLI tool to decode and encode JWTs";
diff --git a/pkgs/tools/text/invoice2data/default.nix b/pkgs/tools/text/invoice2data/default.nix
index 8007724f4a53..941f2d6f4938 100644
--- a/pkgs/tools/text/invoice2data/default.nix
+++ b/pkgs/tools/text/invoice2data/default.nix
@@ -1,21 +1,54 @@
-{ lib, python3Packages, xpdf, imagemagick, tesseract }:
+{ lib
+, fetchFromGitHub
+, imagemagick
+, python3
+, tesseract
+, xpdf
+}:
-python3Packages.buildPythonPackage rec {
+python3.pkgs.buildPythonApplication rec {
pname = "invoice2data";
- version = "0.2.93";
+ version = "0.3.6";
+ format = "setuptools";
- src = python3Packages.fetchPypi {
- inherit pname version;
- sha256 = "1phz0a8jxg074k0im7shrrdfvdps7bn1fa4zwcf8q3sa2iig26l4";
+ src = fetchFromGitHub {
+ owner = "invoice-x";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "sha256-t1jgLyKtQsLINlnkCdSbVfTM6B/EiD1yGtx9UHjyZVE=";
};
- makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [ imagemagick xpdf tesseract ]) ];
+ nativeBuildInputs = with python3.pkgs; [
+ setuptools-git
+ ];
- propagatedBuildInputs = with python3Packages; [ unidecode dateparser pyyaml pillow chardet pdfminer ];
+ propagatedBuildInputs = with python3.pkgs; [
+ chardet
+ dateparser
+ pdfminer
+ pillow
+ pyyaml
+ unidecode
+ ];
+
+ postPatch = ''
+ substituteInPlace setup.cfg \
+ --replace "pytest-runner" ""
+ '';
+
+ makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [
+ imagemagick
+ tesseract
+ xpdf
+ ])];
# Tests fails even when ran manually on my ubuntu machine !!
doCheck = false;
+ pythonImportsCheck = [
+ "invoice2data"
+ ];
+
meta = with lib; {
description = "Data extractor for PDF invoices";
homepage = "https://github.com/invoice-x/invoice2data";