diff options
Diffstat (limited to 'pkgs/tools')
68 files changed, 1043 insertions, 990 deletions
diff --git a/pkgs/tools/X11/opentabletdriver/default.nix b/pkgs/tools/X11/opentabletdriver/default.nix index b205f959ee3..de3b983c91d 100644 --- a/pkgs/tools/X11/opentabletdriver/default.nix +++ b/pkgs/tools/X11/opentabletdriver/default.nix @@ -1,11 +1,8 @@ -{ stdenv -, lib +{ lib +, buildDotnetModule , fetchFromGitHub , fetchurl -, linkFarmFromDrvs , dotnetCorePackages -, dotnetPackages -, dpkg , gtk3 , libX11 , libXrandr @@ -15,16 +12,12 @@ , udev , copyDesktopItems , makeDesktopItem -, makeWrapper , nixosTests , wrapGAppsHook +, dpkg }: -let - dotnet-sdk = dotnetCorePackages.sdk_5_0; - dotnet-runtime = dotnetCorePackages.runtime_5_0; -in -stdenv.mkDerivation rec { +buildDotnetModule rec { pname = "OpenTabletDriver"; version = "0.5.3.3"; @@ -40,23 +33,22 @@ stdenv.mkDerivation rec { sha256 = "0v03qiiz28k1yzgxf5qc1mdg2n7kjx6h8vpx9dxz342wwbgqg6ic"; }; + dotnet-sdk = dotnetCorePackages.sdk_5_0; + dotnet-runtime = dotnetCorePackages.runtime_5_0; + + dotnetInstallFlags = [ "--framework=net5" ]; + + projectFile = [ "OpenTabletDriver.Console" "OpenTabletDriver.Daemon" "OpenTabletDriver.UX.Gtk" ]; + nugetDeps = ./deps.nix; + + executables = [ "OpenTabletDriver.Console" "OpenTabletDriver.Daemon" "OpenTabletDriver.UX.Gtk" ]; + nativeBuildInputs = [ - dotnet-sdk - dotnetPackages.Nuget - dpkg copyDesktopItems - makeWrapper wrapGAppsHook + dpkg ]; - nugetDeps = linkFarmFromDrvs "${pname}-nuget-deps" (import ./deps.nix { - fetchNuGet = { name, version, sha256 }: fetchurl { - name = "nuget-${name}-${version}.nupkg"; - url = "https://www.nuget.org/api/v2/package/${name}/${version}"; - inherit sha256; - }; - }); - runtimeDeps = [ gtk3 libX11 @@ -67,80 +59,18 @@ stdenv.mkDerivation rec { udev ]; - configurePhase = '' - runHook preConfigure - - export HOME=$(mktemp -d) - export DOTNET_CLI_TELEMETRY_OPTOUT=1 - export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - - nuget sources Add -Name nixos -Source "$PWD/nixos" - nuget init "$nugetDeps" "$PWD/nixos" - - # FIXME: https://github.com/NuGet/Home/issues/4413 - mkdir -p $HOME/.nuget/NuGet - cp $HOME/.config/NuGet/NuGet.Config $HOME/.nuget/NuGet - - for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do - dotnet restore --source "$PWD/nixos" $project - done - - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - - for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do - dotnet build $project \ - --no-restore \ - --configuration Release \ - --framework net5 - done - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do - dotnet publish $project \ - --no-build \ - --no-self-contained \ - --configuration Release \ - --framework net5 \ - --output $out/lib - done - + postInstall = '' # Give a more "*nix" name to the binaries - makeWrapper $out/lib/OpenTabletDriver.Console $out/bin/otd \ - "''${gappsWrapperArgs[@]}" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ - --set DOTNET_ROOT "${dotnet-runtime}" \ - --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" - - makeWrapper $out/lib/OpenTabletDriver.Daemon $out/bin/otd-daemon \ - "''${gappsWrapperArgs[@]}" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ - --set DOTNET_ROOT "${dotnet-runtime}" \ - --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" - - makeWrapper $out/lib/OpenTabletDriver.UX.Gtk $out/bin/otd-gui \ - "''${gappsWrapperArgs[@]}" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ - --set DOTNET_ROOT "${dotnet-runtime}" \ - --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" - - mkdir -p $out/lib/OpenTabletDriver - cp -rv ./OpenTabletDriver/Configurations $out/lib/OpenTabletDriver + mv $out/bin/OpenTabletDriver.Console $out/bin/otd + mv $out/bin/OpenTabletDriver.Daemon $out/bin/otd-daemon + mv $out/bin/OpenTabletDriver.UX.Gtk $out/bin/otd-gui + + cp -r ./OpenTabletDriver/Configurations $out/lib/${pname} install -Dm644 $src/OpenTabletDriver.UX/Assets/otd.png -t $out/share/pixmaps # TODO: Ideally this should be build from OpenTabletDriver/OpenTabletDriver-udev instead dpkg-deb --fsys-tarfile ${debPkg} | tar xf - ./usr/lib/udev/rules.d/99-opentabletdriver.rules install -Dm644 ./usr/lib/udev/rules.d/99-opentabletdriver.rules -t $out/lib/udev/rules.d - - runHook postInstall ''; desktopItems = [ @@ -156,7 +86,6 @@ stdenv.mkDerivation rec { ]; dontWrapGApps = true; - dontStrip = true; passthru = { updateScript = ./update.sh; diff --git a/pkgs/tools/X11/opentabletdriver/shell.nix b/pkgs/tools/X11/opentabletdriver/shell.nix deleted file mode 100644 index bb60dfd5039..00000000000 --- a/pkgs/tools/X11/opentabletdriver/shell.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs ? import ../../../../. { } }: - -with pkgs; - -mkShell { - packages = [ - common-updater-scripts - nuget-to-nix - curl - dotnetCorePackages.sdk_5_0 - jq - ]; -} diff --git a/pkgs/tools/X11/opentabletdriver/update.sh b/pkgs/tools/X11/opentabletdriver/update.sh index b73a5a4b7ca..b18bddd75aa 100755 --- a/pkgs/tools/X11/opentabletdriver/update.sh +++ b/pkgs/tools/X11/opentabletdriver/update.sh @@ -1,16 +1,15 @@ #!/usr/bin/env nix-shell -#!nix-shell shell.nix -i bash - +#!nix-shell -i bash -p curl gnused jq common-updater-scripts nuget-to-nix dotnet-sdk_5 set -eo pipefail - cd "$(dirname "${BASH_SOURCE[0]}")" deps_file="$(realpath "./deps.nix")" -new_version="$(curl -s "https://api.github.com/repos/OpenTabletDriver/OpenTabletDriver/releases" | jq -r '.[0].tag_name' | sed 's|[^0-9.]||g')" +new_version="$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s "https://api.github.com/repos/OpenTabletDriver/OpenTabletDriver/releases" | jq -r 'map(select(.prerelease == false)) | .[0].tag_name' | cut -c2-)" old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)" + if [[ "$new_version" == "$old_version" ]]; then - echo "Up to date" + echo "Already up to date!" [[ "${1}" != "--force" ]] && exit 0 fi @@ -22,37 +21,22 @@ newDebSha256=$(nix-prefetch-url "$newDebPkgUrl") echo "oldDebSha256: $oldDebSha256 newDebSha256: $newDebSha256" sed -i ./default.nix -re "s|\"$oldDebSha256\"|\"$newDebSha256\"|" -cd ../../../.. +pushd ../../../.. update-source-version opentabletdriver "$new_version" -store_src="$(nix-build . -A opentabletdriver.src --no-out-link)" +store_src="$(nix-build -A opentabletdriver.src --no-out-link)" src="$(mktemp -d /tmp/opentabletdriver-src.XXX)" -echo "Temp src dir: $src" cp -rT "$store_src" "$src" chmod -R +w "$src" pushd "$src" +trap "rm -rf $src" EXIT -# Setup empty nuget package folder to force reinstall. -mkdir ./nuget_tmp.packages -cat >./nuget_tmp.config <<EOF -<?xml version="1.0" encoding="utf-8"?> -<configuration> - <packageSources> - <add key="nuget" value="https://api.nuget.org/v3/index.json" /> - </packageSources> - <config> - <add key="globalPackagesFolder" value="$(realpath ./nuget_tmp.packages)" /> - </config> -</configuration> -EOF - +export DOTNET_NOLOGO=1 export DOTNET_CLI_TELEMETRY_OPTOUT=1 +mkdir ./nuget_pkgs for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do - dotnet restore $project --configfile ./nuget_tmp.config + dotnet restore $project --packages ./nuget_pkgs done -nuget-to-nix ./nuget_tmp.packages > "$deps_file" - -popd -rm -r "$src" +nuget-to-nix ./nuget_pkgs > "$deps_file" diff --git a/pkgs/tools/admin/aliyun-cli/default.nix b/pkgs/tools/admin/aliyun-cli/default.nix new file mode 100644 index 00000000000..3ff8ae3caa2 --- /dev/null +++ b/pkgs/tools/admin/aliyun-cli/default.nix @@ -0,0 +1,30 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "aliyun-cli"; + version = "3.0.94"; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "aliyun"; + repo = pname; + fetchSubmodules = true; + sha256 = "sha256:1l9rzdp9kxxicvp45pa7288zxa07xp7w6aj7d9k9xlzv8l96k6j3"; + }; + vendorSha256 = "sha256:0dklq78bqfidcda8pwd6qwaycah3gndmq9s90h1pqx1isw4frckk"; + + subPackages = ["aliyun-openapi-meta" "main"]; + + ldFlags = "-X 'github.com/aliyun/${pname}/cli.Version=${version}'"; + + postInstall = '' + mv $out/bin/main $out/bin/aliyun + ''; + + meta = with lib; { + description = "Tool to manage and use Alibaba Cloud resources through a command line interface."; + homepage = "https://github.com/aliyun/aliyun-cli"; + license = licenses.asl20; + maintainers = with maintainers; [ ornxka ]; + }; +} diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix index fd02e7ea418..ac3f9d65c0f 100644 --- a/pkgs/tools/admin/google-cloud-sdk/default.nix +++ b/pkgs/tools/admin/google-cloud-sdk/default.nix @@ -103,6 +103,8 @@ in stdenv.mkDerivation rec { mkdir -p $out/share/zsh/site-functions mv $out/google-cloud-sdk/completion.zsh.inc $out/share/zsh/site-functions/_gcloud ln -s $out/share/zsh/site-functions/_gcloud $out/share/zsh/site-functions/_gsutil + # zsh doesn't load completions from $FPATH without #compdef as the first line + sed -i '1 i #compdef gcloud' $out/share/zsh/site-functions/_gcloud # This directory contains compiled mac binaries. We used crcmod from # nixpkgs instead. diff --git a/pkgs/tools/admin/trivy/default.nix b/pkgs/tools/admin/trivy/default.nix index 60bf80653a4..4330e11bce6 100644 --- a/pkgs/tools/admin/trivy/default.nix +++ b/pkgs/tools/admin/trivy/default.nix @@ -1,22 +1,27 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib +, buildGoModule +, fetchFromGitHub +}: buildGoModule rec { pname = "trivy"; - version = "0.20.2"; + version = "0.21.0"; src = fetchFromGitHub { owner = "aquasecurity"; repo = pname; rev = "v${version}"; - sha256 = "sha256-ittOVWsM+1IaILCLCJNOeLxRbRHiiMN4qgLTS9gxV0w="; + sha256 = "sha256-weLzW1pyv9q9VKvFxno+f/L29wlpvxlVUZJUwx6Gn2A="; }; - vendorSha256 = "sha256-HrDj09gUJtkZhQ3nYfoj0K8+T62ib0CWAhhcuvg8cyc="; + vendorSha256 = "sha256-1kQ2m8gFBHKznbjNPtYN0BVrRbxyCs2H1f7+XZqgVvc="; excludedPackages = "misc"; ldflags = [ - "-s" "-w" "-X main.version=v${version}" + "-s" + "-w" + "-X main.version=v${version}" ]; doInstallCheck = true; diff --git a/pkgs/tools/archivers/arc_unpacker/default.nix b/pkgs/tools/archivers/arc_unpacker/default.nix index edf67f2f963..7fbd9302397 100644 --- a/pkgs/tools/archivers/arc_unpacker/default.nix +++ b/pkgs/tools/archivers/arc_unpacker/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, cmake, makeWrapper, boost, libpng, libiconv -, libjpeg, zlib, openssl, libwebp, catch }: +, libjpeg, zlib, openssl, libwebp, catch2 }: stdenv.mkDerivation rec { pname = "arc_unpacker"; @@ -15,12 +15,12 @@ stdenv.mkDerivation rec { sha256 = "1xxrc9nww0rla3yh10z6glv05ax4rynwwbd0cdvkp7gyqzrv97xp"; }; - nativeBuildInputs = [ cmake makeWrapper catch ]; + nativeBuildInputs = [ cmake makeWrapper catch2 ]; buildInputs = [ boost libpng libjpeg zlib openssl libwebp ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; postPatch = '' - cp ${catch}/include/catch/catch.hpp tests/test_support/catch.h + cp ${catch2}/include/catch2/catch.hpp tests/test_support/catch.h ''; checkPhase = '' @@ -45,8 +45,8 @@ stdenv.mkDerivation rec { runHook postInstall ''; - # A few tests fail on aarch64 - doCheck = !stdenv.isAarch64; + # A few tests fail on aarch64-linux + doCheck = !(stdenv.isLinux && stdenv.isAarch64); meta = with lib; { description = "A tool to extract files from visual novel archives"; diff --git a/pkgs/tools/archivers/arj/default.nix b/pkgs/tools/archivers/arj/default.nix index e09e390fa47..6f365e226e2 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/archivers/pax/default.nix b/pkgs/tools/archivers/pax/default.nix index d554ea4dade..cfba3754c81 100644 --- a/pkgs/tools/archivers/pax/default.nix +++ b/pkgs/tools/archivers/pax/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, utmp }: stdenv.mkDerivation rec { pname = "pax"; @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1p18nxijh323f4i1s2pg7pcr0557xljl5avv8ll5s9nfr34r5j0w"; }; + buildInputs = lib.optional stdenv.isDarwin utmp; + buildPhase = '' sh Build.sh -r -tpax ''; diff --git a/pkgs/tools/backup/burp/default.nix b/pkgs/tools/backup/burp/default.nix index 00b2c71037a..187fe71896d 100644 --- a/pkgs/tools/backup/burp/default.nix +++ b/pkgs/tools/backup/burp/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config , acl, librsync, ncurses, openssl, zlib, uthash }: stdenv.mkDerivation rec { @@ -12,6 +12,15 @@ stdenv.mkDerivation rec { sha256 = "1zhq240kz881vs2s620qp0kifmgr582caalm85ls789w9rmdkhjl"; }; + patches = [ + # Pull upstream fix for ncurses-6.3 support + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/grke/burp/commit/1d6c931af7c11f164cf7ad3479781e8f03413496.patch"; + sha256 = "14sfbfahlankz3xg6v10i8fnmpnmqpp73q9xm0l0hnjh25igv6bl"; + }) + ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ librsync ncurses openssl zlib uthash ] ++ lib.optional (!stdenv.isDarwin) acl; diff --git a/pkgs/tools/backup/grab-site/default.nix b/pkgs/tools/backup/grab-site/default.nix index 2f2f01356b4..fe6496bf212 100644 --- a/pkgs/tools/backup/grab-site/default.nix +++ b/pkgs/tools/backup/grab-site/default.nix @@ -1,8 +1,15 @@ -{ lib, python37, fetchFromGitHub }: +{ lib, python38, fetchFromGitHub }: let - python = python37.override { + python = python38.override { self = python; packageOverrides = self: super: { + sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "1.3.24"; + src = oldAttrs.src.override { + inherit version; + sha256 = "ebbb777cbf9312359b897bf81ba00dae0f5cb69fba2a18265dcc18a6f5ef7519"; + }; + }); tornado = super.tornado_4; }; }; @@ -10,18 +17,18 @@ let in with python.pkgs; buildPythonApplication rec { pname = "grab-site"; - version = "2.2.0"; + version = "2.2.2"; src = fetchFromGitHub { rev = version; owner = "ArchiveTeam"; repo = "grab-site"; - sha256 = "1jxcv9dral6h7vfpfqkp1yif6plj0vspzakymkj8hfl75nh0wpv8"; + sha256 = "0af53g703kqpxa6bn72mb2l5l0qrjknq5wqwl4wryyscdp4xabx4"; }; postPatch = '' substituteInPlace setup.py \ - --replace '"wpull @ https://github.com/ArchiveTeam/ludios_wpull/tarball/master#egg=wpull-3.0.7"' '"wpull"' + --replace '"wpull @ https://github.com/ArchiveTeam/ludios_wpull/tarball/master#egg=wpull-${ludios_wpull.version}"' '"wpull"' ''; propagatedBuildInputs = [ diff --git a/pkgs/tools/backup/kopia/default.nix b/pkgs/tools/backup/kopia/default.nix index 0774d6e5483..9ae4ad37a14 100644 --- a/pkgs/tools/backup/kopia/default.nix +++ b/pkgs/tools/backup/kopia/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "kopia"; - version = "0.9.5"; + version = "0.9.6"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-1HCpUfK8y4BaBluThpRVeXTPgMUym6R+WXCO+2pRNjc="; + sha256 = "sha256-lfzlYpkAGGY7fs9PYPSg2XYgW92WV1/zh2oRz4Qw7vs="; }; - vendorSha256 = "sha256-tYu1T4oHkvj4QOS/e/6N9IjMlxrGKosQ78DVgAyh6/Q="; + vendorSha256 = "sha256-xa6B3gGgJc7E8VCfpRXlE8Jw3ylNnfynK+QEiqy2yF4="; doCheck = false; diff --git a/pkgs/tools/compression/bsdiff/CVE-2020-14315.patch b/pkgs/tools/compression/bsdiff/CVE-2020-14315.patch new file mode 100644 index 00000000000..bb7ff41284e --- /dev/null +++ b/pkgs/tools/compression/bsdiff/CVE-2020-14315.patch @@ -0,0 +1,384 @@ +Description: patch for CVE-2020-14315 + A memory corruption vulnerability is present in bspatch as shipped in + Colin Percival’s bsdiff tools version 4.3. Insufficient checks when + handling external inputs allows an attacker to bypass the sanity checks + in place and write out of a dynamically allocated buffer boundaries. +Source: https://svnweb.freebsd.org/base/head/usr.bin/bsdiff/bspatch/bspatch.c?revision=352742&view=co +Author: tony mancill <tmancill@debian.org> +Comment: The patch was created by comparing the Debian sources to the + "Confirmed Patched Version" [1] documented in the + X41 D-SEC GmbH Security Advisory: X41-2020-006 [2]. + References to FreeBSD capsicum have been dropped. Definitions for + TYPE_MINIMUM and TYPE_MAXIMUM have been borrowed from the Debian + coreutils package sources but originate in gnulib [3] and are used to + define OFF_MIN and OFF_MAX (limits of off_t). Whitespace changes from + the confirmed patched version are also included and keep the difference + between the Debian sources and the confirmed patched version minimal. + . + [1] https://svnweb.freebsd.org/base/head/usr.bin/bsdiff/bspatch/bspatch.c?revision=352742&view=co + [2] https://www.openwall.com/lists/oss-security/2020/07/09/2 + [3] https://www.gnu.org/software/gnulib/ +Last-Update: 2021-04-03 +Forwarded: not-needed +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964796 + +--- a/bspatch.c ++++ b/bspatch.c +@@ -1,4 +1,6 @@ + /*- ++ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD ++ * + * Copyright 2003-2005 Colin Percival + * All rights reserved + * +@@ -24,56 +26,148 @@ + * POSSIBILITY OF SUCH DAMAGE. + */ + ++#include <sys/cdefs.h> + #if 0 +-__FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59:06 cperciva Exp $"); ++__FBSDID("$FreeBSD$"); + #endif + + #include <bzlib.h> +-#include <stdlib.h> ++#include <err.h> ++#include <fcntl.h> ++#include <libgen.h> ++#include <limits.h> ++#include <stdint.h> + #include <stdio.h> ++#include <stdlib.h> + #include <string.h> +-#include <err.h> + #include <unistd.h> +-#include <fcntl.h> ++ ++#ifndef O_BINARY ++#define O_BINARY 0 ++#endif ++#define HEADER_SIZE 32 ++ ++/* TYPE_MINIMUM and TYPE_MAXIMUM taken from coreutils */ ++#ifndef TYPE_MINIMUM ++#define TYPE_MINIMUM(t) \ ++ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) ++#endif ++#ifndef TYPE_MAXIMUM ++#define TYPE_MAXIMUM(t) \ ++ ((t) ((t) 0 < (t) -1 \ ++ ? (t) -1 \ ++ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) ++#endif ++ ++#ifndef OFF_MAX ++#define OFF_MAX TYPE_MAXIMUM(off_t) ++#endif ++ ++#ifndef OFF_MIN ++#define OFF_MIN TYPE_MINIMUM(off_t) ++#endif ++ ++static char *newfile; ++static int dirfd = -1; ++ ++static void ++exit_cleanup(void) ++{ ++ ++ if (dirfd != -1 && newfile != NULL) ++ if (unlinkat(dirfd, newfile, 0)) ++ warn("unlinkat"); ++} ++ ++static inline off_t ++add_off_t(off_t a, off_t b) ++{ ++ off_t result; ++ ++#if __GNUC__ >= 5 ++ if (__builtin_add_overflow(a, b, &result)) ++ errx(1, "Corrupt patch"); ++#else ++ if ((b > 0 && a > OFF_MAX - b) || (b < 0 && a < OFF_MIN - b)) ++ errx(1, "Corrupt patch"); ++ result = a + b; ++#endif ++ return result; ++} + + static off_t offtin(u_char *buf) + { + off_t y; + +- y=buf[7]&0x7F; +- y=y*256;y+=buf[6]; +- y=y*256;y+=buf[5]; +- y=y*256;y+=buf[4]; +- y=y*256;y+=buf[3]; +- y=y*256;y+=buf[2]; +- y=y*256;y+=buf[1]; +- y=y*256;y+=buf[0]; ++ y = buf[7] & 0x7F; ++ y = y * 256; y += buf[6]; ++ y = y * 256; y += buf[5]; ++ y = y * 256; y += buf[4]; ++ y = y * 256; y += buf[3]; ++ y = y * 256; y += buf[2]; ++ y = y * 256; y += buf[1]; ++ y = y * 256; y += buf[0]; + +- if(buf[7]&0x80) y=-y; ++ if (buf[7] & 0x80) ++ y = -y; + +- return y; ++ return (y); + } + +-int main(int argc,char * argv[]) ++static void ++usage(void) + { +- FILE * f, * cpf, * dpf, * epf; +- BZFILE * cpfbz2, * dpfbz2, * epfbz2; ++ ++ fprintf(stderr, "usage: bspatch oldfile newfile patchfile\n"); ++ exit(1); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ FILE *f, *cpf, *dpf, *epf; ++ BZFILE *cpfbz2, *dpfbz2, *epfbz2; ++ char *directory, *namebuf; + int cbz2err, dbz2err, ebz2err; +- int fd; +- ssize_t oldsize,newsize; +- ssize_t bzctrllen,bzdatalen; +- u_char header[32],buf[8]; ++ int newfd, oldfd; ++ off_t oldsize, newsize; ++ off_t bzctrllen, bzdatalen; ++ u_char header[HEADER_SIZE], buf[8]; + u_char *old, *new; +- off_t oldpos,newpos; ++ off_t oldpos, newpos; + off_t ctrl[3]; +- off_t lenread; +- off_t i; ++ off_t i, lenread, offset; + +- if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]); ++ if (argc != 4) ++ usage(); + + /* Open patch file */ +- if ((f = fopen(argv[3], "r")) == NULL) ++ if ((f = fopen(argv[3], "rb")) == NULL) ++ err(1, "fopen(%s)", argv[3]); ++ /* Open patch file for control block */ ++ if ((cpf = fopen(argv[3], "rb")) == NULL) ++ err(1, "fopen(%s)", argv[3]); ++ /* open patch file for diff block */ ++ if ((dpf = fopen(argv[3], "rb")) == NULL) + err(1, "fopen(%s)", argv[3]); ++ /* open patch file for extra block */ ++ if ((epf = fopen(argv[3], "rb")) == NULL) ++ err(1, "fopen(%s)", argv[3]); ++ /* open oldfile */ ++ if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) ++ err(1, "open(%s)", argv[1]); ++ /* open directory where we'll write newfile */ ++ if ((namebuf = strdup(argv[2])) == NULL || ++ (directory = dirname(namebuf)) == NULL || ++ (dirfd = open(directory, O_DIRECTORY)) < 0) ++ err(1, "open %s", argv[2]); ++ free(namebuf); ++ if ((newfile = basename(argv[2])) == NULL) ++ err(1, "basename"); ++ /* open newfile */ ++ if ((newfd = openat(dirfd, newfile, ++ O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666)) < 0) ++ err(1, "open(%s)", argv[2]); ++ atexit(exit_cleanup); + + /* + File format: +@@ -90,104 +185,104 @@ + */ + + /* Read header */ +- if (fread(header, 1, 32, f) < 32) { ++ if (fread(header, 1, HEADER_SIZE, f) < HEADER_SIZE) { + if (feof(f)) +- errx(1, "Corrupt patch\n"); ++ errx(1, "Corrupt patch"); + err(1, "fread(%s)", argv[3]); + } + + /* Check for appropriate magic */ + if (memcmp(header, "BSDIFF40", 8) != 0) +- errx(1, "Corrupt patch\n"); ++ errx(1, "Corrupt patch"); + + /* Read lengths from header */ +- bzctrllen=offtin(header+8); +- bzdatalen=offtin(header+16); +- newsize=offtin(header+24); +- if((bzctrllen<0) || (bzdatalen<0) || (newsize<0)) +- errx(1,"Corrupt patch\n"); ++ bzctrllen = offtin(header + 8); ++ bzdatalen = offtin(header + 16); ++ newsize = offtin(header + 24); ++ if (bzctrllen < 0 || bzctrllen > OFF_MAX - HEADER_SIZE || ++ bzdatalen < 0 || bzctrllen + HEADER_SIZE > OFF_MAX - bzdatalen || ++ newsize < 0 || newsize > SSIZE_MAX) ++ errx(1, "Corrupt patch"); + + /* Close patch file and re-open it via libbzip2 at the right places */ + if (fclose(f)) + err(1, "fclose(%s)", argv[3]); +- if ((cpf = fopen(argv[3], "r")) == NULL) +- err(1, "fopen(%s)", argv[3]); +- if (fseeko(cpf, 32, SEEK_SET)) +- err(1, "fseeko(%s, %lld)", argv[3], +- (long long)32); ++ offset = HEADER_SIZE; ++ if (fseeko(cpf, offset, SEEK_SET)) ++ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); + if ((cpfbz2 = BZ2_bzReadOpen(&cbz2err, cpf, 0, 0, NULL, 0)) == NULL) + errx(1, "BZ2_bzReadOpen, bz2err = %d", cbz2err); +- if ((dpf = fopen(argv[3], "r")) == NULL) +- err(1, "fopen(%s)", argv[3]); +- if (fseeko(dpf, 32 + bzctrllen, SEEK_SET)) +- err(1, "fseeko(%s, %lld)", argv[3], +- (long long)(32 + bzctrllen)); ++ offset = add_off_t(offset, bzctrllen); ++ if (fseeko(dpf, offset, SEEK_SET)) ++ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); + if ((dpfbz2 = BZ2_bzReadOpen(&dbz2err, dpf, 0, 0, NULL, 0)) == NULL) + errx(1, "BZ2_bzReadOpen, bz2err = %d", dbz2err); +- if ((epf = fopen(argv[3], "r")) == NULL) +- err(1, "fopen(%s)", argv[3]); +- if (fseeko(epf, 32 + bzctrllen + bzdatalen, SEEK_SET)) +- err(1, "fseeko(%s, %lld)", argv[3], +- (long long)(32 + bzctrllen + bzdatalen)); ++ offset = add_off_t(offset, bzdatalen); ++ if (fseeko(epf, offset, SEEK_SET)) ++ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset); + if ((epfbz2 = BZ2_bzReadOpen(&ebz2err, epf, 0, 0, NULL, 0)) == NULL) + errx(1, "BZ2_bzReadOpen, bz2err = %d", ebz2err); + +- if(((fd=open(argv[1],O_RDONLY,0))<0) || +- ((oldsize=lseek(fd,0,SEEK_END))==-1) || +- ((old=malloc(oldsize+1))==NULL) || +- (lseek(fd,0,SEEK_SET)!=0) || +- (read(fd,old,oldsize)!=oldsize) || +- (close(fd)==-1)) err(1,"%s",argv[1]); +- if((new=malloc(newsize+1))==NULL) err(1,NULL); +- +- oldpos=0;newpos=0; +- while(newpos<newsize) { ++ if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 || ++ oldsize > SSIZE_MAX || ++ (old = malloc(oldsize)) == NULL || ++ lseek(oldfd, 0, SEEK_SET) != 0 || ++ read(oldfd, old, oldsize) != oldsize || ++ close(oldfd) == -1) ++ err(1, "%s", argv[1]); ++ if ((new = malloc(newsize)) == NULL) ++ err(1, NULL); ++ ++ oldpos = 0; ++ newpos = 0; ++ while (newpos < newsize) { + /* Read control data */ +- for(i=0;i<=2;i++) { ++ for (i = 0; i <= 2; i++) { + lenread = BZ2_bzRead(&cbz2err, cpfbz2, buf, 8); + if ((lenread < 8) || ((cbz2err != BZ_OK) && + (cbz2err != BZ_STREAM_END))) +- errx(1, "Corrupt patch\n"); +- ctrl[i]=offtin(buf); +- }; ++ errx(1, "Corrupt patch"); ++ ctrl[i] = offtin(buf); ++ } + + /* Sanity-check */ +- if ((ctrl[0] < 0) || (ctrl[1] < 0)) +- errx(1,"Corrupt patch\n"); ++ if (ctrl[0] < 0 || ctrl[0] > INT_MAX || ++ ctrl[1] < 0 || ctrl[1] > INT_MAX) ++ errx(1, "Corrupt patch"); + + /* Sanity-check */ +- if(newpos+ctrl[0]>newsize) +- errx(1,"Corrupt patch\n"); ++ if (add_off_t(newpos, ctrl[0]) > newsize) ++ errx(1, "Corrupt patch"); + + /* Read diff string */ + lenread = BZ2_bzRead(&dbz2err, dpfbz2, new + newpos, ctrl[0]); + if ((lenread < ctrl[0]) || + ((dbz2err != BZ_OK) && (dbz2err != BZ_STREAM_END))) +- errx(1, "Corrupt patch\n"); ++ errx(1, "Corrupt patch"); + + /* Add old data to diff string */ +- for(i=0;i<ctrl[0];i++) +- if((oldpos+i>=0) && (oldpos+i<oldsize)) +- new[newpos+i]+=old[oldpos+i]; ++ for (i = 0; i < ctrl[0]; i++) ++ if (add_off_t(oldpos, i) < oldsize) ++ new[newpos + i] += old[oldpos + i]; + + /* Adjust pointers */ +- newpos+=ctrl[0]; +- oldpos+=ctrl[0]; ++ newpos = add_off_t(newpos, ctrl[0]); ++ oldpos = add_off_t(oldpos, ctrl[0]); + + /* Sanity-check */ +- if(newpos+ctrl[1]>newsize) +- errx(1,"Corrupt patch\n"); ++ if (add_off_t(newpos, ctrl[1]) > newsize) ++ errx(1, "Corrupt patch"); + + /* Read extra string */ + lenread = BZ2_bzRead(&ebz2err, epfbz2, new + newpos, ctrl[1]); + if ((lenread < ctrl[1]) || + ((ebz2err != BZ_OK) && (ebz2err != BZ_STREAM_END))) +- errx(1, "Corrupt patch\n"); ++ errx(1, "Corrupt patch"); + + /* Adjust pointers */ +- newpos+=ctrl[1]; +- oldpos+=ctrl[2]; +- }; ++ newpos = add_off_t(newpos, ctrl[1]); ++ oldpos = add_off_t(oldpos, ctrl[2]); ++ } + + /* Clean up the bzip2 reads */ + BZ2_bzReadClose(&cbz2err, cpfbz2); +@@ -197,12 +292,13 @@ + err(1, "fclose(%s)", argv[3]); + + /* Write the new file */ +- if(((fd=open(argv[2],O_CREAT|O_TRUNC|O_WRONLY,0666))<0) || +- (write(fd,new,newsize)!=newsize) || (close(fd)==-1)) +- err(1,"%s",argv[2]); ++ if (write(newfd, new, newsize) != newsize || close(newfd) == -1) ++ err(1, "%s", argv[2]); ++ /* Disable atexit cleanup */ ++ newfile = NULL; + + free(new); + free(old); + +- return 0; ++ return (0); + } diff --git a/pkgs/tools/compression/bsdiff/default.nix b/pkgs/tools/compression/bsdiff/default.nix index 8f8818781ab..b8a86eae89b 100644 --- a/pkgs/tools/compression/bsdiff/default.nix +++ b/pkgs/tools/compression/bsdiff/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, bzip2 }: +{ lib, stdenv, fetchurl, fetchpatch, bzip2 }: stdenv.mkDerivation rec { pname = "bsdiff"; @@ -10,7 +10,27 @@ stdenv.mkDerivation rec { }; buildInputs = [ bzip2 ]; - patches = [ ./include-systypes.patch ]; + patches = [ + (fetchpatch { + url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/20-CVE-2014-9862.patch"; + sha256 = "sha256-3UuUfNvShQ8fLqxCKUTb/n4BmjL4+Nl7aEqCxYrrERQ="; + }) + ./CVE-2020-14315.patch + ./include-systypes.patch + ] ++ lib.optional stdenv.hostPlatform.isLinux [ + (fetchpatch { + url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/30-bug-632585-mmap-src-file-instead-of-malloc-read-it.patch"; + sha256 = "sha256-esbhz2/efUiuQDuF7LGfSeEn3/f1WbqCxQpTs2A0ulI="; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/31-bug-632585-mmap-dst-file-instead-of-malloc-read-it.patch"; + sha256 = "sha256-Of4aOcI0rsgdRzPqyw2VRn2p9wQuo3hdlgDTBdXGzoc="; + }) + (fetchpatch { + url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/32-bug-632585-use-int32_t-instead-off_t-for-file-size.patch"; + sha256 = "sha256-SooFnFK4uKNXvXQb/LEcH8GocnRtkryExI4b3BZTsAY="; + }) + ]; buildPhase = '' $CC -O3 -lbz2 bspatch.c -o bspatch diff --git a/pkgs/tools/compression/lrzip/default.nix b/pkgs/tools/compression/lrzip/default.nix index 02f62c3e3c0..4fe5512b4c6 100644 --- a/pkgs/tools/compression/lrzip/default.nix +++ b/pkgs/tools/compression/lrzip/default.nix @@ -1,17 +1,33 @@ -{ lib, stdenv, fetchurl, zlib, lzo, bzip2, lz4, nasm, perl }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, zlib, lzo, bzip2, lz4, nasm, perl }: +let + inherit (stdenv.hostPlatform) isx86; +in stdenv.mkDerivation rec { pname = "lrzip"; version = "0.641"; - src = fetchurl { - url = "http://ck.kolivas.org/apps/lrzip/${pname}-${version}.tar.xz"; - sha256 = "0ziyanspd96dc3lp2qdcylc7aq8dhb511jhqrhxvlp502fjqjqrc"; + src = fetchFromGitHub { + owner = "ckolivas"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-253CH6TiHWyr13C76y9PXjyB7gj2Bhd2VRgJ5r+cm/g="; }; - buildInputs = [ zlib lzo bzip2 lz4 nasm perl ]; + postPatch = lib.optionalString stdenv.isDarwin '' + # Building the ASM/x86 directory creates an empty archive, + # which fails on darwin, so remove it + # https://github.com/ckolivas/lrzip/issues/193 + # https://github.com/Homebrew/homebrew-core/pull/85360 + substituteInPlace lzma/Makefile.am --replace "SUBDIRS = C ASM/x86" "SUBDIRS = C" + substituteInPlace configure.ac --replace "-f elf64" "-f macho64" + ''; - configureFlags = [ + nativeBuildInputs = [ autoreconfHook perl ] ++ lib.optionals isx86 [ nasm ]; + + buildInputs = [ zlib lzo bzip2 lz4 ]; + + configureFlags = lib.optionals (!isx86) [ "--disable-asm" ]; diff --git a/pkgs/tools/filesystems/gfs2-utils/default.nix b/pkgs/tools/filesystems/gfs2-utils/default.nix index ba479b87aa9..3f68888776c 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/filesystems/kio-fuse/default.nix b/pkgs/tools/filesystems/kio-fuse/default.nix new file mode 100644 index 00000000000..a68165956eb --- /dev/null +++ b/pkgs/tools/filesystems/kio-fuse/default.nix @@ -0,0 +1,31 @@ +{ lib +, mkDerivation +, fetchgit +, cmake +, extra-cmake-modules +, kio +, fuse3 +}: + +mkDerivation rec { + pname = "kio-fuse"; + version = "5.0.1"; + + src = fetchgit { + url = "https://invent.kde.org/system/kio-fuse.git"; + sha256 = "sha256-LSFbFCaEPkQTk1Rg9xpueBOQpkbr/tgYxLD31F6i/qE="; + rev = "v${version}"; + }; + + nativeBuildInputs = [ cmake extra-cmake-modules ]; + + buildInputs = [ kio fuse3 ]; + + meta = with lib; { + description = "FUSE Interface for KIO"; + homepage = "https://invent.kde.org/system/kio-fuse"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ _1000teslas ]; + }; +} diff --git a/pkgs/tools/filesystems/nilfs-utils/default.nix b/pkgs/tools/filesystems/nilfs-utils/default.nix index ec227c95573..3c2dfaf2f1d 100644 --- a/pkgs/tools/filesystems/nilfs-utils/default.nix +++ b/pkgs/tools/filesystems/nilfs-utils/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libuuid, libselinux }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libuuid, libselinux +, e2fsprogs }: stdenv.mkDerivation rec { pname = "nilfs-utils"; @@ -15,6 +16,17 @@ stdenv.mkDerivation rec { buildInputs = [ libuuid libselinux ]; + postPatch = '' + # Fix up hardcoded paths. + substituteInPlace lib/cleaner_exec.c --replace /sbin/ $out/bin/ + substituteInPlace sbin/mkfs/mkfs.c --replace /sbin/ ${lib.getBin e2fsprogs}/bin/ + ''; + + # According to upstream, libmount should be detected automatically but the + # build system fails to do this. This is likely a bug with their build system + # hence it is explicitly enabled here. + configureFlags = [ "--with-libmount" ]; + installFlags = [ "sysconfdir=${placeholder "out"}/etc" "root_sbindir=${placeholder "out"}/sbin" diff --git a/pkgs/tools/graphics/pngquant/default.nix b/pkgs/tools/graphics/pngquant/default.nix index bb0ef858125..dd145d48fc1 100644 --- a/pkgs/tools/graphics/pngquant/default.nix +++ b/pkgs/tools/graphics/pngquant/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { preConfigure = "patchShebangs ."; - configureFlags = lib.optionals (!stdenv.isi686 && !stdenv.isx86_64) [ "--disable-sse" ]; + configureFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "--disable-sse" ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ libpng zlib lcms2 ]; diff --git a/pkgs/tools/graphics/svgcleaner/Cargo.lock b/pkgs/tools/graphics/svgcleaner/Cargo.lock deleted file mode 100644 index 8daf4c4f83b..00000000000 --- a/pkgs/tools/graphics/svgcleaner/Cargo.lock +++ /dev/null @@ -1,256 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time", - "winapi", -] - -[[package]] -name = "clap" -version = "2.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" -dependencies = [ - "bitflags", - "textwrap", - "unicode-width", -] - -[[package]] -name = "error-chain" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" - -[[package]] -name = "fern" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69ab0d5aca163e388c3a49d284fed6c3d0810700e77c5ae2756a50ec1a4daaa" -dependencies = [ - "chrono", - "log", -] - -[[package]] -name = "float-cmp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be876712b52d3970d361df27210574630d8d44d6461f0b55745d56e88ac10b0" -dependencies = [ - "num", -] - -[[package]] -name = "libc" -version = "0.2.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "num" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -dependencies = [ - "num-integer", - "num-iter", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "phf" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_shared" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -dependencies = [ - "siphasher", -] - -[[package]] -name = "simplecss" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135685097a85a64067df36e28a243e94a94f76d829087ce0be34eeb014260c0e" - -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" - -[[package]] -name = "svgcleaner" -version = "0.9.5" -dependencies = [ - "clap", - "error-chain", - "fern", - "log", - "svgdom", -] - -[[package]] -name = "svgdom" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac5d235d251b4266fb95bdf737fe0c546b26327a127e35ad33effdd78cb2e83" -dependencies = [ - "error-chain", - "float-cmp", - "log", - "simplecss", - "svgparser", -] - -[[package]] -name = "svgparser" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b2a4d5f7d25526c750e436fb5a224e06579f32581515bf511b37210007a3cb" -dependencies = [ - "error-chain", - "log", - "phf", - "xmlparser", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi", - "winapi", -] - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "xmlparser" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4fb8cb7e78fcf5055e751eae348c81bba17b6c84c8ed9fc5f6cf60e3e15d4aa" -dependencies = [ - "error-chain", - "log", -] diff --git a/pkgs/tools/graphics/svgcleaner/default.nix b/pkgs/tools/graphics/svgcleaner/default.nix deleted file mode 100644 index 48902f322e2..00000000000 --- a/pkgs/tools/graphics/svgcleaner/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, rustPlatform, fetchFromGitHub }: - -rustPlatform.buildRustPackage rec { - pname = "svgcleaner"; - version = "0.9.5"; - - src = fetchFromGitHub { - owner = "RazrFalcon"; - repo = "svgcleaner"; - rev = "v${version}"; - sha256 = "sha256-nc+lKL6CJZid0WidcBwILhn81VgmmFrutfKT5UffdHA="; - }; - - cargoLock.lockFile = ./Cargo.lock; - - postPatch = '' - cp ${./Cargo.lock} Cargo.lock; - ''; - - meta = with lib; { - description = "A tool for tidying and optimizing SVGs"; - homepage = "https://github.com/RazrFalcon/svgcleaner"; - changelog = "https://github.com/RazrFalcon/svgcleaner/blob/v${version}/CHANGELOG.md"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ mehandes ]; - }; -} diff --git a/pkgs/tools/inputmethods/skk/skk-dicts/default.nix b/pkgs/tools/inputmethods/skk/skk-dicts/default.nix index 385806e444c..f20e2899f18 100644 --- a/pkgs/tools/inputmethods/skk/skk-dicts/default.nix +++ b/pkgs/tools/inputmethods/skk/skk-dicts/default.nix @@ -25,6 +25,8 @@ let url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.assoc"; sha256 = "1smcbyv6srrhnpl7ic9nqds9nz3g2dgqngmhzkrdlwmvcpvakp1v"; }; + + iconvBin = if stdenv.isDarwin then libiconv else buildPackages.stdenv.cc.libc; in stdenv.mkDerivation { @@ -49,7 +51,7 @@ stdenv.mkDerivation { for src in $srcs; do dst=$out/share/$(dictname $src) echo ";;; -*- coding: utf-8 -*-" > $dst # libskk requires this on the first line - ${lib.getBin buildPackages.stdenv.cc.libc}/bin/iconv \ + ${lib.getBin iconvBin}/bin/iconv \ -f EUC-JP -t UTF-8 $src | skkdic-expr2 >> $dst done diff --git a/pkgs/tools/misc/broot/default.nix b/pkgs/tools/misc/broot/default.nix index 9817df780ea..6a8ace3b2a9 100644 --- a/pkgs/tools/misc/broot/default.nix +++ b/pkgs/tools/misc/broot/default.nix @@ -15,14 +15,14 @@ rustPlatform.buildRustPackage rec { pname = "broot"; - version = "1.7.1"; + version = "1.7.3"; src = fetchCrate { inherit pname version; - sha256 = "sha256-Gg60jeDfHNKUYynJRgN4oLWhcdApWUdO5kRwl5hrFMM="; + sha256 = "sha256-qu8COcMuReV8zbDK5lm378SQY+TwDy/lo9T/ldNMfz0="; }; - cargoHash = "sha256-xsTlFfgX3Np3M/RqmK30DZBCrY1OXnEkjqBDI+ffd/U="; + cargoHash = "sha256-ndFymXT2hA4ZztePDFhAYlMh8Iwxi1/ULZYGq+W5vpE="; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/tools/misc/convbin/default.nix b/pkgs/tools/misc/convbin/default.nix index e350092a0e3..90b403adeb6 100644 --- a/pkgs/tools/misc/convbin/default.nix +++ b/pkgs/tools/misc/convbin/default.nix @@ -13,6 +13,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-zCRM62xwaPaN8+cg+CeaqK/9hKpZmSBBeUOQqAvQGYw="; }; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile --replace "-flto" "" + ''; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; checkPhase = '' diff --git a/pkgs/tools/misc/czkawka/default.nix b/pkgs/tools/misc/czkawka/default.nix index 9ff6a7aaa9a..f2a046322d8 100644 --- a/pkgs/tools/misc/czkawka/default.nix +++ b/pkgs/tools/misc/czkawka/default.nix @@ -8,20 +8,22 @@ , gdk-pixbuf , atk , gtk3 +, testVersion +, czkawka }: rustPlatform.buildRustPackage rec { pname = "czkawka"; - version = "3.2.0"; + version = "3.3.0"; src = fetchFromGitHub { owner = "qarmin"; - repo = pname; + repo = "czkawka"; rev = version; - sha256 = "sha256-OBe6nk5C3kO5Lkas9+G+VY3xAzY7SWx8W5CkSbaYJ9Y="; + sha256 = "0mikgnsqxj8dgapr2k7i9i8mmsza15kp4nasyd6l1vp2cqy8aki6"; }; - cargoSha256 = "sha256-Jghkf1mX5ic7zB2KmtOZbSxgF8C6KjRdGG1Yt+dzylI="; + cargoSha256 = "009zfy4lk8y51h1wi71mrjp6kc7xnk3r8jlbxvhyqslhqd9w10fv"; nativeBuildInputs = [ pkg-config @@ -36,10 +38,15 @@ rustPlatform.buildRustPackage rec { gtk3 ]; + passthru.tests.version = testVersion { + package = czkawka; + command = "czkawka_cli --version"; + }; + meta = with lib; { description = "A simple, fast and easy to use app to remove unnecessary files from your computer"; homepage = "https://github.com/qarmin/czkawka"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ yanganto ]; + maintainers = with maintainers; [ yanganto _0x4A6F ]; }; } diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index b1390fefb33..f6f799a9b0c 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -9,11 +9,11 @@ # Note: when upgrading this package, please run the list-missing-tools.sh script as described below! python3Packages.buildPythonApplication rec { pname = "diffoscope"; - version = "190"; + version = "192"; src = fetchurl { url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2"; - sha256 = "sha256-iZ9OJESNlGgsYTO9jbzEX5sCz8Rrhs7cecJEy7j4U+c="; + sha256 = "sha256-ZaSE1yYznZIQV7yKyeBlqQzkgUn3CoadZY2fDA1/SnE="; }; outputs = [ "out" "man" ]; @@ -79,6 +79,7 @@ python3Packages.buildPythonApplication rec { # Disable flaky tests on Darwin "test_non_unicode_filename" "test_listing" + "test_symlink_root" ]; # flaky tests on Darwin diff --git a/pkgs/tools/misc/fluent-bit/default.nix b/pkgs/tools/misc/fluent-bit/default.nix index 795e2b39b7b..713b1df0c4e 100644 --- a/pkgs/tools/misc/fluent-bit/default.nix +++ b/pkgs/tools/misc/fluent-bit/default.nix @@ -11,14 +11,17 @@ stdenv.mkDerivation rec { sha256 = "sha256-b+MZuZQB/sl0HcioU1KCxH3TNiXYSPBfC9dBKqCVeXk="; }; + patches = lib.optionals stdenv.isDarwin [ + ./fix-cmetrics-darwin.patch + ./fix-luajit-darwin.patch + ]; + nativeBuildInputs = [ cmake flex bison ]; buildInputs = lib.optionals stdenv.isLinux [ systemd ]; cmakeFlags = [ "-DFLB_METRICS=ON" "-DFLB_HTTP_SERVER=ON" ]; - patches = lib.optionals stdenv.isDarwin [ ./fix-luajit-darwin.patch ]; - # _FORTIFY_SOURCE requires compiling with optimization (-O) NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-O"; diff --git a/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch b/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch new file mode 100644 index 00000000000..8bd77605cbc --- /dev/null +++ b/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch @@ -0,0 +1,23 @@ +diff --git i/lib/cmetrics/src/cmt_time.c w/lib/cmetrics/src/cmt_time.c +--- i/lib/cmetrics/src/cmt_time.c ++++ w/lib/cmetrics/src/cmt_time.c +@@ -20,7 +20,7 @@ + #include <cmetrics/cmt_info.h> + + /* MacOS */ +-#ifdef FLB_HAVE_CLOCK_GET_TIME ++#ifdef CMT_HAVE_CLOCK_GET_TIME + #include <mach/clock.h> + #include <mach/mach.h> + #endif +@@ -41,8 +41,8 @@ + mach_timespec_t mts; + host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); + clock_get_time(cclock, &mts); +- tm->tv_sec = mts.tv_sec; +- tm->tv_nsec = mts.tv_nsec; ++ tm.tv_sec = mts.tv_sec; ++ tm.tv_nsec = mts.tv_nsec; + mach_port_deallocate(mach_task_self(), cclock); + #else /* __STDC_VERSION__ */ + clock_gettime(CLOCK_REALTIME, &tm); diff --git a/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch b/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch index 21d9c21f5b9..ef6be0f5ad3 100644 --- a/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch +++ b/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch @@ -1,14 +1,29 @@ diff -Naur fluent-bit.old/cmake/luajit.cmake fluent-bit.new/cmake/luajit.cmake --- fluent-bit.old/cmake/luajit.cmake +++ fluent-bit.new/cmake/luajit.cmake -@@ -11,10 +11,6 @@ - set(LUAJIT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/${FLB_PATH_LIB_LUAJIT}) +@@ -12,15 +12,7 @@ set(LUAJIT_DEST ${CMAKE_CURRENT_BINARY_DIR}) --if (CMAKE_SYSTEM_NAME MATCHES "Darwin") -- set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}") --endif() -- + if (CMAKE_SYSTEM_NAME MATCHES "Darwin") +- set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} -fno-stack-check") +- if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20 +- AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 21) +- set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=11.0") +- else() +- set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.15") +- endif() +-else() +- set(DEPLOYMENT_TARGET "") ++ set(CFLAGS "${CFLAGS} -fno-stack-check") + endif() + # luajit (UNIX) - # ============= - ExternalProject_Add(luajit +@@ -30,7 +22,7 @@ + EXCLUDE_FROM_ALL TRUE + SOURCE_DIR ${LUAJIT_SRC} + CONFIGURE_COMMAND ./configure +- BUILD_COMMAND $(MAKE) CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC" ${DEPLOYMENT_TARGET} ++ BUILD_COMMAND $(MAKE) DEFAULT_CC=cc CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC" + INSTALL_COMMAND cp src/libluajit.a "${LUAJIT_DEST}/lib/libluajit.a") + + # luajit (Windows) diff --git a/pkgs/tools/misc/g933-utils/default.nix b/pkgs/tools/misc/g933-utils/default.nix index 6116f15f729..a2671f946b0 100644 --- a/pkgs/tools/misc/g933-utils/default.nix +++ b/pkgs/tools/misc/g933-utils/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "g933-utils"; - version = "unstable-2019-08-04"; + version = "unstable-2021-11-19"; src = fetchFromGitHub { owner = "ashkitten"; repo = "g933-utils"; - rev = "b80cfd59fc41ae5d577c147311376dd7f7882493"; - sha256 = "06napzpk3nayzixb4l4fzdiwpgmcrsbc5j9m4qip1yn6dfkin3p0"; + rev = "1fc8cec375ed0d6f72191eadec788a49f51032d1"; + sha256 = "sha256-kGLMRqZHzRuXQNTjIuLz8JPC1c/ZK38msfkTIVnaomg="; }; - cargoSha256 = "00gzfbxr5qzb9w7xkqd9jgfagb4c7p657m21b467pygzvaabbb8d"; + cargoSha256 = "sha256-FBX5hrS8tNWN83XX+x+s/mYyvO1h6V63bXCx7y0R8bY="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ udev ]; diff --git a/pkgs/tools/misc/gotify-desktop/default.nix b/pkgs/tools/misc/gotify-desktop/default.nix new file mode 100644 index 00000000000..1da729c706d --- /dev/null +++ b/pkgs/tools/misc/gotify-desktop/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, rustPlatform, openssl, pkg-config}: + +rustPlatform.buildRustPackage rec { + pname = "gotify-desktop"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "desbma"; + repo = pname; + rev = version; + sha256 = "sha256-QQpZeXFv8BqFOQ+7ANWmtsgNlMakAL2ML4rlG2cFZJE="; + }; + + cargoSha256 = "sha256-zcSAsI/yGGJer7SPKDKZ6NQ3UgTdBcDighS6VTNITMo="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ]; + + meta = with lib; { + description = "Small Gotify daemon to send messages as desktop notifications"; + homepage = "https://github.com/desbma/gotify-desktop"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ bryanasdev000 genofire ]; + }; +} diff --git a/pkgs/tools/misc/gparted/default.nix b/pkgs/tools/misc/gparted/default.nix index 08e4641fb4c..a002d190984 100644 --- a/pkgs/tools/misc/gparted/default.nix +++ b/pkgs/tools/misc/gparted/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchurl, intltool, gettext, coreutils, gnused, gnome , gnugrep, parted, glib, libuuid, pkg-config, gtkmm3, libxml2 , gpart, hdparm, procps, util-linux, polkit, wrapGAppsHook, substituteAll +, mtools, dosfstools }: stdenv.mkDerivation rec { @@ -29,7 +30,7 @@ stdenv.mkDerivation rec { preFixup = '' gappsWrapperArgs+=( - --prefix PATH : "${lib.makeBinPath [ gpart hdparm util-linux procps coreutils gnused gnugrep ]}" + --prefix PATH : "${lib.makeBinPath [ gpart hdparm util-linux procps coreutils gnused gnugrep mtools dosfstools ]}" ) ''; diff --git a/pkgs/tools/misc/ibus-theme-tools/default.nix b/pkgs/tools/misc/ibus-theme-tools/default.nix new file mode 100644 index 00000000000..ee8a8719d13 --- /dev/null +++ b/pkgs/tools/misc/ibus-theme-tools/default.nix @@ -0,0 +1,29 @@ +{ lib, python3Packages, fetchFromGitHub, gettext }: + +python3Packages.buildPythonApplication rec { + pname = "ibus-theme-tools"; + version = "4.2.0"; + + src = fetchFromGitHub { + owner = "openSUSE"; + repo = "IBus-Theme-Tools"; + rev = "v${version}"; + sha256 = "0i8vwnikwd1bfpv4xlgzc51gn6s18q58nqhvcdiyjzcmy3z344c2"; + }; + + buildInputs = [ gettext ]; + + propagatedBuildInputs = with python3Packages; [ tinycss2 pygobject3 ]; + + # No test. + doCheck = false; + + pythonImportsCheck = [ "ibus_theme_tools" ]; + + meta = with lib; { + description = "Generate the IBus GTK or GNOME Shell theme from existing themes"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ hollowman6 ]; + homepage = "https://github.com/openSUSE/IBus-Theme-Tools"; + }; +} diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix index 70b1ae48ae9..76ce66e5686 100644 --- a/pkgs/tools/misc/ipxe/default.nix +++ b/pkgs/tools/misc/ipxe/default.nix @@ -9,7 +9,7 @@ let "bin-x86_64-efi/ipxe.efi" = null; "bin-x86_64-efi/ipxe.efirom" = null; "bin-x86_64-efi/ipxe.usb" = "ipxe-efi.usb"; - } // lib.optionalAttrs (stdenv.isi686 || stdenv.isx86_64) { + } // lib.optionalAttrs stdenv.hostPlatform.isx86 { "bin/ipxe.dsk" = null; "bin/ipxe.usb" = null; "bin/ipxe.iso" = null; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { pname = "ipxe"; version = "1.21.1"; - nativeBuildInputs = [ perl cdrkit xz openssl gnu-efi mtools ] ++ lib.optional (stdenv.isi686 || stdenv.isx86_64) syslinux; + nativeBuildInputs = [ perl cdrkit xz openssl gnu-efi mtools ] ++ lib.optional stdenv.hostPlatform.isx86 syslinux; src = fetchFromGitHub { owner = "ipxe"; @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { makeFlags = [ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here. - ] ++ lib.optionals (stdenv.isi686 || stdenv.isx86_64) [ + ] ++ lib.optionals stdenv.hostPlatform.isx86 [ "ISOLINUX_BIN_LIST=${syslinux}/share/syslinux/isolinux.bin" "LDLINUX_C32=${syslinux}/share/syslinux/ldlinux.c32" ] ++ lib.optional (embedScript != null) "EMBED=${embedScript}"; diff --git a/pkgs/tools/misc/parquet-tools/default.nix b/pkgs/tools/misc/parquet-tools/default.nix new file mode 100644 index 00000000000..0ba909e1f60 --- /dev/null +++ b/pkgs/tools/misc/parquet-tools/default.nix @@ -0,0 +1,69 @@ +{ lib +, fetchFromGitHub +, fetchpatch +, python3Packages +}: + +with python3Packages; + +buildPythonApplication rec { + pname = "parquet-tools"; + version = "0.2.9"; + disabled = pythonOlder "3.8"; + + format = "pyproject"; + + src = fetchFromGitHub { + owner = "ktrueda"; + repo = "parquet-tools"; + rev = version; + sha256 = "0aw0x7lhagp4dwis09fsizr7zbhdpliav0ns5ll5qny7x4m6rkfy"; + }; + + patches = [ + (fetchpatch { + url = "https://github.com/ktrueda/parquet-tools/commit/1c70a07e1c9f17c8890d23aad3ded5dd6c706cb3.patch"; + sha256 = "08j1prdqj8ksw8gwiyj7ivshk82ahmywbzmywclw52nlnniig0sa"; + }) + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'thrift = "^0.13.0"' 'thrift = "*"' \ + --replace 'halo = "^0.0.29"' 'halo = "*"' + substituteInPlace tests/test_inspect.py \ + --replace "parquet-cpp-arrow version 5.0.0" "parquet-cpp-arrow version 6.0.0" \ + --replace "serialized_size: 2222" "serialized_size: 2221" + ''; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + boto3 + colorama + halo + pandas + pyarrow + tabulate + thrift + ]; + + checkInputs = [ + pytestCheckHook + moto + pytest-mock + ]; + + disabledTests = [ + # these tests try to read python code as parquet and fail + "test_local_wildcard" + "test_local_and_s3_wildcard_files" + ]; + + meta = with lib; { + description = "A CLI tool for parquet files"; + homepage = "https://github.com/ktrueda/parquet-tools"; + license = licenses.mit; + maintainers = with maintainers; [ cpcloud ]; + }; +} diff --git a/pkgs/tools/misc/qmk/default.nix b/pkgs/tools/misc/qmk/default.nix index ef25a7361c2..5067e1e0fab 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/misc/rates/default.nix b/pkgs/tools/misc/rates/default.nix index 989a9e6734a..8ead57a07eb 100644 --- a/pkgs/tools/misc/rates/default.nix +++ b/pkgs/tools/misc/rates/default.nix @@ -1,6 +1,8 @@ { lib +, stdenv , fetchFromGitHub , rustPlatform +, Security }: rustPlatform.buildRustPackage rec { @@ -16,6 +18,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "041sskiq152iywwqd8p7aqsqzbj359zl7ilnp8ahzdqprz3slk1w"; + buildInputs = lib.optional stdenv.isDarwin Security; + meta = with lib; { description = "CLI tool that brings currency exchange rates right into your terminal"; homepage = "https://github.com/lunush/rates"; diff --git a/pkgs/tools/misc/topicctl/default.nix b/pkgs/tools/misc/topicctl/default.nix index 9ecbbcba37a..0a51eda4857 100644 --- a/pkgs/tools/misc/topicctl/default.nix +++ b/pkgs/tools/misc/topicctl/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "topicctl"; - version = "1.1.1"; + version = "1.2.0"; src = fetchFromGitHub { owner = "segmentio"; repo = "topicctl"; rev = "v${version}"; - sha256 = "sha256-LsMt2BHfO0I5N2C247fmoOgQ5EXMgk/3Kj/lI+vTRV0="; + sha256 = "sha256-bCTlKhYmMe89dYuLiZ58CPpYZiXSGqbddxugsZS5/Cs="; }; - vendorSha256 = "sha256-ur7qMm7l1CocQwX58fTL1PpdgIEJyRAzSlNJM1WTvM0="; + vendorSha256 = "sha256-1VRK8tmsbOuP5t5uJ1h+KPcS4K9D+y6UQKeUP2HPXrQ="; ldflags = [ "-X main.BuildVersion=${version}" diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix index 9f06c858b48..ab75f4349cc 100644 --- a/pkgs/tools/misc/vector/default.nix +++ b/pkgs/tools/misc/vector/default.nix @@ -28,7 +28,7 @@ let pname = "vector"; - version = "0.17.3"; + version = "0.18.0"; in rustPlatform.buildRustPackage { inherit pname version; @@ -37,10 +37,10 @@ rustPlatform.buildRustPackage { owner = "timberio"; repo = pname; rev = "v${version}"; - sha256 = "sha256-1Z2GtzWkS7cxzCs+RBKMtWbzIIt4aeS1Iy9kMBEeDMw="; + sha256 = "sha256-vkiTvJevslXEF2lDTr2IL2vFBQ+dj1N636Livncsso4="; }; - cargoSha256 = "sha256-UEGdvyRPPh5Kb9+0qFyv8UBFslOKn5/R/ineawFA91w="; + cargoSha256 = "sha256-u7GzqQex5pqU7DuueMfbxMSOpAzd+uLQTZ2laG/aC+4="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ oniguruma openssl protobuf rdkafka zstd ] ++ lib.optionals stdenv.isDarwin [ Security libiconv coreutils CoreServices ]; diff --git a/pkgs/tools/networking/cdpr/default.nix b/pkgs/tools/networking/cdpr/default.nix index 6ac69b95dba..0b92fd7aa45 100644 --- a/pkgs/tools/networking/cdpr/default.nix +++ b/pkgs/tools/networking/cdpr/default.nix @@ -9,6 +9,10 @@ stdenv.mkDerivation rec { sha256 = "1idyvyafkk0ifcbi7mc65b60qia6hpsdb6s66j4ggqp7if6vblrj"; }; + postPatch = '' + substituteInPlace Makefile --replace 'gcc' '"$$CC"' + ''; + buildInputs = [ libpcap ]; installPhase = '' diff --git a/pkgs/tools/networking/fastd/default.nix b/pkgs/tools/networking/fastd/default.nix index 8d1594b8187..47007e1646e 100644 --- a/pkgs/tools/networking/fastd/default.nix +++ b/pkgs/tools/networking/fastd/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { ]; # some options are only available on x86 - mesonFlags = lib.optionals (!stdenv.isx86_64 && !stdenv.isi686) [ + mesonFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "-Dcipher_salsa20_xmm=disabled" "-Dcipher_salsa2012_xmm=disabled" "-Dmac_ghash_pclmulqdq=disabled" diff --git a/pkgs/tools/networking/kail/default.nix b/pkgs/tools/networking/kail/default.nix index ae431b329ea..7777c129dbf 100644 --- a/pkgs/tools/networking/kail/default.nix +++ b/pkgs/tools/networking/kail/default.nix @@ -1,27 +1,23 @@ -{ lib, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub }: -buildGoPackage rec { +buildGoModule rec { pname = "kail"; - version = "0.8.0"; + version = "0.15.0"; - goPackagePath = "github.com/boz/kail"; + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + ]; src = fetchFromGitHub { owner = "boz"; repo = "kail"; rev = "v${version}"; - sha256 = "0ibk7j40pj6f2086qcnwp998wld61d2gvrv7yiy6hlkalhww2pq7"; + sha256 = "0b4abzk8lc5qa04ywkl8b5hb9jmxhyi2dpgbl27gmw81525wjnj7"; }; - # regenerate deps.nix using following steps: - # - # go get -u github.com/boz/kail - # cd $GOPATH/src/github.com/boz/kail - # git checkout <version> - # dep init - # dep2nix - deleteVendor = true; - goDeps = ./deps.nix; + vendorSha256 = "09s7sq23hglcb2rsi9igzql39zs4238f3jfmvxz9a8v41da225np"; meta = with lib; { description = "Kubernetes log viewer"; diff --git a/pkgs/tools/networking/kail/deps.nix b/pkgs/tools/networking/kail/deps.nix deleted file mode 100644 index b6d9c3e9cf3..00000000000 --- a/pkgs/tools/networking/kail/deps.nix +++ /dev/null @@ -1,408 +0,0 @@ -# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) -[ - { - goPackagePath = "cloud.google.com/go"; - fetch = { - type = "git"; - url = "https://code.googlesource.com/gocloud"; - rev = "06f11fffc537c4aef126d9fd3a92e2d7968f118f"; - sha256 = "1zhr1pyzk44zb95r2bcs4kkngvmzdr5bac55315nnzl3adx4y4dn"; - }; - } - { - goPackagePath = "github.com/Azure/go-autorest"; - fetch = { - type = "git"; - url = "https://github.com/Azure/go-autorest"; - rev = "1ff28809256a84bb6966640ff3d0371af82ccba4"; - sha256 = "0sxvj2j1833bqwxvhq3wq3jgq73rnb81pnzvl0x3y1m0hzpaf2zv"; - }; - } - { - goPackagePath = "github.com/alecthomas/template"; - fetch = { - type = "git"; - url = "https://github.com/alecthomas/template"; - rev = "a0175ee3bccc567396460bf5acd36800cb10c49c"; - sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj"; - }; - } - { - goPackagePath = "github.com/alecthomas/units"; - fetch = { - type = "git"; - url = "https://github.com/alecthomas/units"; - rev = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a"; - sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl"; - }; - } - { - goPackagePath = "github.com/boz/go-lifecycle"; - fetch = { - type = "git"; - url = "https://github.com/boz/go-lifecycle"; - rev = "c39961a5a0ce6b046f15d62bcbed79701666a9e0"; - sha256 = "12xzjzgi0pspb28xrcmp4v33jij2bbg609z1kpq1pql9mxs6h31k"; - }; - } - { - goPackagePath = "github.com/boz/go-logutil"; - fetch = { - type = "git"; - url = "https://github.com/boz/go-logutil"; - rev = "9d21a9e4757dbc497f947fe5253f9570c34562fa"; - sha256 = "0rhhyvvz1lvjalv3hx4yvyh90jqfia27nzx9m54m0i7d0znrwpbj"; - }; - } - { - goPackagePath = "github.com/boz/kcache"; - fetch = { - type = "git"; - url = "https://github.com/boz/kcache"; - rev = "a012826955254d3f31548911e75a9dbd817f9470"; - sha256 = "0xqw4mgz0scjrcfsyfwfdhggq1q80dv4mdqgdaryy5ir18srg15l"; - }; - } - { - goPackagePath = "github.com/davecgh/go-spew"; - fetch = { - type = "git"; - url = "https://github.com/davecgh/go-spew"; - rev = "adab96458c51a58dc1783b3335dcce5461522e75"; - sha256 = "1y743w875aqqwggrh4lwlmqyx7ls5m1bnw5y4vr3zps4ib3gb4n5"; - }; - } - { - goPackagePath = "github.com/dgrijalva/jwt-go"; - fetch = { - type = "git"; - url = "https://github.com/dgrijalva/jwt-go"; - rev = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e"; - sha256 = "08m27vlms74pfy5z79w67f9lk9zkx6a9jd68k3c4msxy75ry36mp"; - }; - } - { - goPackagePath = "github.com/fatih/color"; - fetch = { - type = "git"; - url = "https://github.com/fatih/color"; - rev = "67c513e5729f918f5e69786686770c27141a4490"; - sha256 = "045i2y2h1a6ml7fm1b3if4692320kjgg3cpxn7chlmpq7z1bmrrn"; - }; - } - { - goPackagePath = "github.com/ghodss/yaml"; - fetch = { - type = "git"; - url = "https://github.com/ghodss/yaml"; - rev = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7"; - sha256 = "0skwmimpy7hlh7pva2slpcplnm912rp3igs98xnqmn859kwa5v8g"; - }; - } - { - goPackagePath = "github.com/gogo/protobuf"; - fetch = { - type = "git"; - url = "https://github.com/gogo/protobuf"; - rev = "1c2b16bc280d6635de6c52fc1471ab962dc36ec9"; - sha256 = "0h9vkfy3ydz0d6x72853yg49r9k54cgjnlv6a7v12gzqw47p941i"; - }; - } - { - goPackagePath = "github.com/golang/glog"; - fetch = { - type = "git"; - url = "https://github.com/golang/glog"; - rev = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"; - sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30"; - }; - } - { - goPackagePath = "github.com/golang/protobuf"; - fetch = { - type = "git"; - url = "https://github.com/golang/protobuf"; - rev = "1909bc2f63dc92bb931deace8b8312c4db72d12f"; - sha256 = "0d4pknkgp5qlbfpw8xp81dqgrfm0na1pfi2ll559nwvjz5vc90g5"; - }; - } - { - goPackagePath = "github.com/google/btree"; - fetch = { - type = "git"; - url = "https://github.com/google/btree"; - rev = "316fb6d3f031ae8f4d457c6c5186b9e3ded70435"; - sha256 = "1fyj10cy2d37mpfk73hjfjwpsgpnmdzf2mrkkvzyx0d41sf46xfd"; - }; - } - { - goPackagePath = "github.com/google/gofuzz"; - fetch = { - type = "git"; - url = "https://github.com/google/gofuzz"; - rev = "24818f796faf91cd76ec7bddd72458fbced7a6c1"; - sha256 = "0cq90m2lgalrdfrwwyycrrmn785rgnxa3l3vp9yxkvnv88bymmlm"; - }; - } - { - goPackagePath = "github.com/googleapis/gnostic"; - fetch = { - type = "git"; - url = "https://github.com/googleapis/gnostic"; - rev = "57b0290873708074edf87ad921eccec8bef5f8ec"; - sha256 = "14raxxsx2bww4f0am0yygv64h950avkswm7bdvq6k4d4lry6dgg8"; - }; - } - { - goPackagePath = "github.com/gophercloud/gophercloud"; - fetch = { - type = "git"; - url = "https://github.com/gophercloud/gophercloud"; - rev = "b4c2377fa77951a0e08163f52dc9b3e206355194"; - sha256 = "00j9ny59zlf3ajwydf2k41n3l92kl2hf0ljx9x73jcfkdkn2xv5k"; - }; - } - { - goPackagePath = "github.com/gregjones/httpcache"; - fetch = { - type = "git"; - url = "https://github.com/gregjones/httpcache"; - rev = "c1f8028e62adb3d518b823a2f8e6a95c38bdd3aa"; - sha256 = "1v7fb4ix2xg0plx5p1f7xd1srvimyss7v7ppn3j7py9ycl560qhr"; - }; - } - { - goPackagePath = "github.com/imdario/mergo"; - fetch = { - type = "git"; - url = "https://github.com/imdario/mergo"; - rev = "e3000cb3d28c72b837601cac94debd91032d19fe"; - sha256 = "1bsz1aj0h266x7g08jj7f3nd3d5islbad0cygb5vh37hjgzirg4d"; - }; - } - { - goPackagePath = "github.com/json-iterator/go"; - fetch = { - type = "git"; - url = "https://github.com/json-iterator/go"; - rev = "ab8a2e0c74be9d3be70b3184d9acc634935ded82"; - sha256 = "1x3wz44p1238gpyzkiiilvvrq9q8dwjdm9kdidq65yjq0zcn0sq4"; - }; - } - { - goPackagePath = "github.com/mattn/go-colorable"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-colorable"; - rev = "6df6d4d004b64986bbb0d1b25945f42b44787e90"; - sha256 = "0ha2biq708is9i3hqc30vihcpajak3qawn0rnacb9k1gyxsxwb60"; - }; - } - { - goPackagePath = "github.com/mattn/go-isatty"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-isatty"; - rev = "fc9e8d8ef48496124e79ae0df75490096eccf6fe"; - sha256 = "1r5f9gkavkb1w6sr0qs5kj16706xirl3qnlq3hqpszkw9w27x65a"; - }; - } - { - goPackagePath = "github.com/modern-go/concurrent"; - fetch = { - type = "git"; - url = "https://github.com/modern-go/concurrent"; - rev = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94"; - sha256 = "0s0fxccsyb8icjmiym5k7prcqx36hvgdwl588y0491gi18k5i4zs"; - }; - } - { - goPackagePath = "github.com/modern-go/reflect2"; - fetch = { - type = "git"; - url = "https://github.com/modern-go/reflect2"; - rev = "94122c33edd36123c84d5368cfb2b69df93a0ec8"; - sha256 = "06a3sablw53n1dqqbr2f53jyksbxdmmk8axaas4yvnhyfi55k4lf"; - }; - } - { - goPackagePath = "github.com/petar/GoLLRB"; - fetch = { - type = "git"; - url = "https://github.com/petar/GoLLRB"; - rev = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4"; - sha256 = "01xp3lcamqkvl91jg6ly202gdsgf64j39rkrcqxi6v4pbrcv7hz0"; - }; - } - { - goPackagePath = "github.com/peterbourgon/diskv"; - fetch = { - type = "git"; - url = "https://github.com/peterbourgon/diskv"; - rev = "5f041e8faa004a95c88a202771f4cc3e991971e6"; - sha256 = "1mxpa5aad08x30qcbffzk80g9540wvbca4blc1r2qyzl65b8929b"; - }; - } - { - goPackagePath = "github.com/pkg/errors"; - fetch = { - type = "git"; - url = "https://github.com/pkg/errors"; - rev = "2b3a18b5f0fb6b4f9190549597d3f962c02bc5eb"; - sha256 = "07fd392kqyaj7fnl4sgzy7fcs0sw4jx3mx2khhgk64n9j9i37l59"; - }; - } - { - goPackagePath = "github.com/pmezard/go-difflib"; - fetch = { - type = "git"; - url = "https://github.com/pmezard/go-difflib"; - rev = "792786c7400a136282c1664665ae0a8db921c6c2"; - sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; - }; - } - { - goPackagePath = "github.com/sirupsen/logrus"; - fetch = { - type = "git"; - url = "https://github.com/sirupsen/logrus"; - rev = "181d419aa9e2223811b824e8f0b4af96f9ba9302"; - sha256 = "08ff47w4clnkym3l0v4hhhfq21zvvwzpljvs0qvki5k0azv7siyc"; - }; - } - { - goPackagePath = "github.com/spf13/pflag"; - fetch = { - type = "git"; - url = "https://github.com/spf13/pflag"; - rev = "e57e3eeb33f795204c1ca35f56c44f83227c6e66"; - sha256 = "13mhx4i913jil32j295m3a36jzvq1y64xig0naadiz7q9ja011r2"; - }; - } - { - goPackagePath = "github.com/stretchr/testify"; - fetch = { - type = "git"; - url = "https://github.com/stretchr/testify"; - rev = "2aa2c176b9dab406a6970f6a55f513e8a8c8b18f"; - sha256 = "1j92x4291flz3i4pk6bi3y59nnsi6lj34zmyfp7axf68fd8vm5ml"; - }; - } - { - goPackagePath = "golang.org/x/crypto"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/crypto"; - rev = "b176d7def5d71bdd214203491f89843ed217f420"; - sha256 = "1ayi4iagsxhf193rx93j6y2rb48730hgm2qbahiq9lawm5g3vc14"; - }; - } - { - goPackagePath = "golang.org/x/net"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/net"; - rev = "1c05540f6879653db88113bc4a2b70aec4bd491f"; - sha256 = "0h8yqb0vcqgllgydrf9d3rzp83w8wlr8f0nm6r1rwf2qg30pq1pd"; - }; - } - { - goPackagePath = "golang.org/x/oauth2"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/oauth2"; - rev = "9a379c6b3e95a790ffc43293c2a78dee0d7b6e20"; - sha256 = "156wff8s9g3sxni2z80wky4v688pvdgfzxbpfp5rmqjvgqnifxkf"; - }; - } - { - goPackagePath = "golang.org/x/sys"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "2d3e384235de683634e9080b58f757466840aa48"; - sha256 = "1w8zrcjv4sfi3skchdbvbixgwzp5n1g0vny8r20dlapnqbazah0x"; - }; - } - { - goPackagePath = "golang.org/x/text"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/text"; - rev = "b19bf474d317b857955b12035d2c5acb57ce8b01"; - sha256 = "0wc8csaafp0ps9jb2hdk8d6xpyw1axhk1np73h0z17x09zk3ylcr"; - }; - } - { - goPackagePath = "golang.org/x/time"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/time"; - rev = "fbb02b2291d28baffd63558aa44b4b56f178d650"; - sha256 = "0jjqcv6rzihlgg4i797q80g1f6ch5diz2kxqh6488gwkb6nds4h4"; - }; - } - { - goPackagePath = "google.golang.org/appengine"; - fetch = { - type = "git"; - url = "https://github.com/golang/appengine"; - rev = "d9a072cfa7b9736e44311ef77b3e09d804bfa599"; - sha256 = "07x7s65q9pydpaniga6zf259kw7qs40q6554wb22inq423wcs0nb"; - }; - } - { - goPackagePath = "gopkg.in/alecthomas/kingpin.v2"; - fetch = { - type = "git"; - url = "https://github.com/alecthomas/kingpin"; - rev = "1087e65c9441605df944fb12c33f0fe7072d18ca"; - sha256 = "18llqzkdqf62qbqcv2fd3j0igl6cwwn4dissf5skkvxrcxjcmmj0"; - }; - } - { - goPackagePath = "gopkg.in/inf.v0"; - fetch = { - type = "git"; - url = "https://github.com/go-inf/inf"; - rev = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"; - sha256 = "0rf3vwyb8aqnac9x9d6ax7z5526c45a16yjm2pvkijr6qgqz8b82"; - }; - } - { - goPackagePath = "gopkg.in/yaml.v2"; - fetch = { - type = "git"; - url = "https://github.com/go-yaml/yaml"; - rev = "eb3733d160e74a9c7e442f435eb3bea458e1d19f"; - sha256 = "1srhvcaa9db3a6xj29mkjr5kg33y71pclrlx4vcwz5m1lgb5c7q6"; - }; - } - { - goPackagePath = "k8s.io/api"; - fetch = { - type = "git"; - url = "https://github.com/kubernetes/api"; - rev = "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"; - sha256 = "1cwrwdm104xd3608b1a5mw6a19w45532p647xdwnyn62rw2f08jx"; - }; - } - { - goPackagePath = "k8s.io/apimachinery"; - fetch = { - type = "git"; - url = "https://github.com/kubernetes/apimachinery"; - rev = "103fd098999dc9c0c88536f5c9ad2e5da39373ae"; - sha256 = "04navnpm59d75dhlz07rmay7m2izrf4m0i9xklxzqg7mlk9g20jc"; - }; - } - { - goPackagePath = "k8s.io/client-go"; - fetch = { - type = "git"; - url = "https://github.com/kubernetes/client-go"; - rev = "1f13a808da65775f22cbf47862c4e5898d8f4ca1"; - sha256 = "1vkcjg80l49hxiadqmkkd031kj6kc10m8mwcnla3k1ml8fv4qna9"; - }; - } -] diff --git a/pkgs/tools/networking/lychee/default.nix b/pkgs/tools/networking/lychee/default.nix index 72f5b6f57fd..657fd108b9a 100644 --- a/pkgs/tools/networking/lychee/default.nix +++ b/pkgs/tools/networking/lychee/default.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "lychee"; - version = "0.7.0"; + version = "0.8.1"; src = fetchFromGitHub { owner = "lycheeverse"; repo = pname; - rev = version; - sha256 = "0kpwpbv0dqb0p4bxjlcjas6x1n91rdsvy2psrc1nyr1sh6gb1q5j"; + rev = "v${version}"; + sha256 = "sha256-TjjSysG4UCXVi5ytWaJVL31TFLHC3Ro5OEB56pzbn7s="; }; - cargoSha256 = "1b915zkg41n3azk4hhg6fgc83n7iq8p7drvdyil2m2a4qdjvp9r3"; + cargoSha256 = "sha256-apRXxd7RBnNjhZb0xAUr5hSTafyMbg0k1wgHT93Z66g="; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/tools/networking/netdiscover/default.nix b/pkgs/tools/networking/netdiscover/default.nix new file mode 100644 index 00000000000..1a7b93eef8a --- /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/networking/ocserv/default.nix b/pkgs/tools/networking/ocserv/default.nix index 2f5dd14757b..5391ec03ae7 100644 --- a/pkgs/tools/networking/ocserv/default.nix +++ b/pkgs/tools/networking/ocserv/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "ocserv"; - version = "0.12.6"; + version = "1.1.2"; src = fetchFromGitLab { owner = "openconnect"; repo = "ocserv"; - rev = "ocserv_${lib.replaceStrings [ "." ] [ "_" ] version}"; - sha256 = "0k7sx9sg8akxwfdl51cvdqkdrx9qganqddgri2yhcgznc3f3pz5b"; + rev = version; + sha256 = "gXolG4zTnJpgI32SuudhvlP9snI0k4Oa1mqE7eGbdE0="; }; nativeBuildInputs = [ autoreconfHook pkg-config ]; @@ -21,6 +21,6 @@ stdenv.mkDerivation rec { homepage = "https://gitlab.com/openconnect/ocserv"; license = licenses.gpl2; description = "This program is openconnect VPN server (ocserv), a server for the openconnect VPN client"; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ neverbehave ]; }; } diff --git a/pkgs/tools/networking/ookla-speedtest/default.nix b/pkgs/tools/networking/ookla-speedtest/default.nix index 200b488cf71..3834355528e 100644 --- a/pkgs/tools/networking/ookla-speedtest/default.nix +++ b/pkgs/tools/networking/ookla-speedtest/default.nix @@ -2,16 +2,16 @@ let pname = "ookla-speedtest"; - version = "1.0.0"; + version = "1.1.0"; srcs = { x86_64-linux = fetchurl { url = "https://install.speedtest.net/app/cli/${pname}-${version}-x86_64-linux.tgz"; - sha256 = "sha256-X+ICjw1EJ+T0Ix2fnPcOZpG7iQpwY211Iy/k2XBjMWg="; + sha256 = "sha256-/NWN8G6uqokjchSnNcC3FU1qDsOjt4Jh2kCnZc5B9H8="; }; aarch64-linux = fetchurl { url = "https://install.speedtest.net/app/cli/${pname}-${version}-aarch64-linux.tgz"; - sha256 = "sha256-BzaE3DSQUIygGwTFhV4Ez9eX/tM/bqam7cJt+8b2qp4="; + sha256 = "sha256-kyOrChC3S8kn4ArO5IylFIstS/N3pXxBVx4ZWI600oU="; }; }; in @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { inherit pname version; - src = srcs.${stdenv.hostPlatform.system}; + src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); setSourceRoot = '' sourceRoot=$PWD diff --git a/pkgs/tools/networking/wg-friendly-peer-names/default.nix b/pkgs/tools/networking/wg-friendly-peer-names/default.nix new file mode 100644 index 00000000000..a2ec966a604 --- /dev/null +++ b/pkgs/tools/networking/wg-friendly-peer-names/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, lib +, fetchFromGitHub +, wireguard-tools +}: + +stdenv.mkDerivation { + pname = "wg-friendly-peer-names"; + version = "unstable-2021-11-08"; + + src = fetchFromGitHub { + owner = "FlyveHest"; + repo = "wg-friendly-peer-names"; + rev = "66b9b6b74ec77b9fec69b2a58296635321d4f5f1"; + sha256 = "pH/b5rCHIqLxz/Fnx+Dm0m005qAUWBsczSU9vGEQ2RQ="; + }; + + installPhase = '' + install -D wgg.sh $out/bin/wgg + ''; + + meta = with lib; { + homepage = "https://github.com/FlyveHest/wg-friendly-peer-names"; + description = "Small shellscript that makes it possible to give peers a friendlier and more readable name in the `wg` peer list"; + license = licenses.mit; + platforms = wireguard-tools.meta.platforms; + maintainers = with maintainers; [ mkg20001 ]; + }; +} diff --git a/pkgs/tools/package-management/cargo-about/default.nix b/pkgs/tools/package-management/cargo-about/default.nix index cf72bd85c08..ac9249b3a9b 100644 --- a/pkgs/tools/package-management/cargo-about/default.nix +++ b/pkgs/tools/package-management/cargo-about/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-about"; - version = "0.4.1"; + version = "0.4.2"; src = fetchFromGitHub { owner = "EmbarkStudios"; repo = "cargo-about"; rev = version; - sha256 = "sha256-Am0VwF37fYsZvUogxnSlP/kwy20J7maFu3Is8f/1b1E="; + sha256 = "sha256-QLPqvlMwCdMfUGCVibCGQdI7UkHV1WBfpBi2Kwi3b1Q="; }; - cargoSha256 = "sha256-gf5OtRGjXmGbnXA4ZYOys6JU+JkF+rYnRSnjy3JE7c0="; + cargoSha256 = "sha256-x9hx9wJlcrGo1zuugPYY4G4Os5x8tIOICKnKq8TuevI="; meta = with lib; { description = "Cargo plugin to generate list of all licenses for a crate"; diff --git a/pkgs/tools/security/dnsx/default.nix b/pkgs/tools/security/dnsx/default.nix index 7872e4a8eac..5b4f0a5da14 100644 --- a/pkgs/tools/security/dnsx/default.nix +++ b/pkgs/tools/security/dnsx/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "dnsx"; - version = "1.0.6"; + version = "1.0.7"; src = fetchFromGitHub { owner = "projectdiscovery"; repo = "dnsx"; rev = "v${version}"; - sha256 = "sha256-rAicKytDtdnPwWdxJvBd5UnMGTAI4NHcPUjISlT7kCw="; + sha256 = "sha256-92J9yRTSk2EP3lXCWH1+Ha+dx3dTNur6LIDMKbGmseI="; }; - vendorSha256 = "sha256-8YoYfn2BFUnVwH9FcAgb1p5CV3dJVrWjEMPfivOGvQE="; + vendorSha256 = "sha256-692PcWFYNInWcZm9NQHLQmRHGFV9XUSFoCqHo7fcGEU="; meta = with lib; { description = "Fast and multi-purpose DNS toolkit"; diff --git a/pkgs/tools/security/exploitdb/default.nix b/pkgs/tools/security/exploitdb/default.nix index f35eecca05a..d5d37cd70a0 100644 --- a/pkgs/tools/security/exploitdb/default.nix +++ b/pkgs/tools/security/exploitdb/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "exploitdb"; - version = "2021-11-16"; + version = "2021-11-18"; src = fetchFromGitHub { owner = "offensive-security"; repo = pname; rev = version; - sha256 = "sha256-xsTmZdEee/lrRYPemny7lUy13xXVVDrb7w1NBnkzmJM="; + sha256 = "sha256-GSqJIM/wAgSKn9BWOSEwmrVTwI6ZOTZGNHRcepDT7MI="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/security/fprintd/tod.nix b/pkgs/tools/security/fprintd/tod.nix new file mode 100644 index 00000000000..4900124f8d1 --- /dev/null +++ b/pkgs/tools/security/fprintd/tod.nix @@ -0,0 +1,21 @@ +{ fetchFromGitLab +, fprintd +, libfprint-tod +}: + +(fprintd.override { libfprint = libfprint-tod; }).overrideAttrs (oldAttrs: + let + pname = "fprintd-tod"; + version = "1.90.9"; + in + { + inherit pname version; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "libfprint"; + repo = "${oldAttrs.pname}"; + rev = "v${version}"; + sha256 = "sha256-rOTVThHOY/Q2IIu2RGiv26UE2V/JFfWWnfKZQfKl5Mg="; + }; + }) diff --git a/pkgs/tools/security/gau/default.nix b/pkgs/tools/security/gau/default.nix index fec4e4e013b..95d5f228c80 100644 --- a/pkgs/tools/security/gau/default.nix +++ b/pkgs/tools/security/gau/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "gau"; - version = "1.2.0"; + version = "2.0.6"; src = fetchFromGitHub { owner = "lc"; repo = pname; rev = "v${version}"; - sha256 = "sha256-hUIUDDP9NtMmJXj5GCD/ISUUcx5prKCVVFztff9txoU="; + sha256 = "sha256-d9Cfd2KD+ymGnzOjlVQkSm3XBamoJIUKQLnRZzSDBtk="; }; - vendorSha256 = "sha256-WMoFbqtBMcjTWX51mEMzpgDEAndCElldNqjG27yXd2w="; + vendorSha256 = "sha256-u5ketxHPwZN2mV0uTgwJbY+ImusGZ9GTTmFAGvdH5yA="; meta = with lib; { description = "Tool to fetch known URLs"; diff --git a/pkgs/tools/security/jwt-cli/default.nix b/pkgs/tools/security/jwt-cli/default.nix index e1cd9ec359f..bf9a93f162b 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/security/masscan/default.nix b/pkgs/tools/security/masscan/default.nix index 46bae3c20c5..b7924936d6c 100644 --- a/pkgs/tools/security/masscan/default.nix +++ b/pkgs/tools/security/masscan/default.nix @@ -17,6 +17,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-mnGC/moQANloR5ODwRjzJzBa55OEZ9QU+9WpAHxQE/g="; }; + postPatch = lib.optionalString stdenv.isDarwin '' + # Fix broken install command + substituteInPlace Makefile --replace "-pm755" "-pDm755" + ''; + nativeBuildInputs = [ makeWrapper installShellFiles ]; makeFlags = [ diff --git a/pkgs/tools/security/metasploit/Gemfile b/pkgs/tools/security/metasploit/Gemfile index d1e114e3245..c4e5370fb5e 100644 --- a/pkgs/tools/security/metasploit/Gemfile +++ b/pkgs/tools/security/metasploit/Gemfile @@ -1,4 +1,4 @@ # frozen_string_literal: true source "https://rubygems.org" -gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/6.1.14" +gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/6.1.15" diff --git a/pkgs/tools/security/metasploit/Gemfile.lock b/pkgs/tools/security/metasploit/Gemfile.lock index 27690111611..3ec1ed8963b 100644 --- a/pkgs/tools/security/metasploit/Gemfile.lock +++ b/pkgs/tools/security/metasploit/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/rapid7/metasploit-framework - revision: 2c47df62b425e4083f4816d71405fed1c0e8b35b - ref: refs/tags/6.1.14 + revision: 1dd828ca9f705d3f05d273b535ff666b5941ddd6 + ref: refs/tags/6.1.15 specs: - metasploit-framework (6.1.14) + metasploit-framework (6.1.15) actionpack (~> 6.0) activerecord (~> 6.0) activesupport (~> 6.0) @@ -128,13 +128,13 @@ GEM arel-helpers (2.12.1) activerecord (>= 3.1.0, < 7) aws-eventstream (1.2.0) - aws-partitions (1.528.0) + aws-partitions (1.533.0) aws-sdk-core (3.122.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-ec2 (1.279.0) + aws-sdk-ec2 (1.281.0) aws-sdk-core (~> 3, >= 3.122.0) aws-sigv4 (~> 1.1) aws-sdk-iam (1.63.0) @@ -143,7 +143,7 @@ GEM aws-sdk-kms (1.51.0) aws-sdk-core (~> 3, >= 3.122.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.105.1) + aws-sdk-s3 (1.106.0) aws-sdk-core (~> 3, >= 3.122.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) @@ -288,7 +288,7 @@ GEM pcaprub patch_finder (1.0.2) pcaprub (0.12.4) - pdf-reader (2.5.0) + pdf-reader (2.6.0) Ascii85 (~> 1.0) afm (~> 0.2.1) hashery (~> 2.0) @@ -330,7 +330,7 @@ GEM rex-core rex-struct2 rex-text - rex-core (0.1.18) + rex-core (0.1.20) rex-encoder (0.1.6) metasm rex-arch diff --git a/pkgs/tools/security/metasploit/default.nix b/pkgs/tools/security/metasploit/default.nix index 674418693c7..4a691122cf4 100644 --- a/pkgs/tools/security/metasploit/default.nix +++ b/pkgs/tools/security/metasploit/default.nix @@ -15,13 +15,13 @@ let }; in stdenv.mkDerivation rec { pname = "metasploit-framework"; - version = "6.1.14"; + version = "6.1.15"; src = fetchFromGitHub { owner = "rapid7"; repo = "metasploit-framework"; rev = version; - sha256 = "sha256-ySQOc/k+kvdSj5g88ujm4e2apvPVbiaspzSbCdEQ4ZA="; + sha256 = "sha256-Wz5FeM7AvRS4mV3BJcWOdp1GgAzTOqRnjBAQp4/Oj5E="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/security/metasploit/gemset.nix b/pkgs/tools/security/metasploit/gemset.nix index 7c1947ddb4d..ff8d0da3f3a 100644 --- a/pkgs/tools/security/metasploit/gemset.nix +++ b/pkgs/tools/security/metasploit/gemset.nix @@ -104,10 +104,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1awcpdvfk6dlb9n5wiksq8vhqwdpmkybv4ga8drmlx6x9li3my5k"; + sha256 = "052y91z5xqysfmnclcp0k9cy7dgjk28xv6dskwww42ljdgjxcmxi"; type = "gem"; }; - version = "1.528.0"; + version = "1.533.0"; }; aws-sdk-core = { groups = ["default"]; @@ -124,10 +124,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1cvf70lj99r59wn35pqxg5c6c2qkgnir0b8fqgi8h757xz6b9m72"; + sha256 = "01ywgc5mh1h19ac10l1ck911qgkxqavwbanp4i6h9ddlcd9jmhm1"; type = "gem"; }; - version = "1.279.0"; + version = "1.281.0"; }; aws-sdk-iam = { groups = ["default"]; @@ -154,10 +154,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "12j7i6l52b6hsnj59grn0m1s9pn6l38zmra6ad8i12vdsvd185w7"; + sha256 = "06ix8lw1r0mw77hnc7ns0fqrsl616g35xw8qcsihzwzgvwb2z0mb"; type = "gem"; }; - version = "1.105.1"; + version = "1.106.0"; }; aws-sigv4 = { groups = ["default"]; @@ -664,12 +664,12 @@ platforms = []; source = { fetchSubmodules = false; - rev = "2c47df62b425e4083f4816d71405fed1c0e8b35b"; - sha256 = "1471238hk6rllyn2cvnmyfk9mvg1wvlg4g4qix9gg4iyz5rhw969"; + rev = "1dd828ca9f705d3f05d273b535ff666b5941ddd6"; + sha256 = "14cgrs7sf40hiiks8fnk1j04d7bniv2jbhaxk6w19gf0rrw4agjv"; type = "git"; url = "https://github.com/rapid7/metasploit-framework"; }; - version = "6.1.14"; + version = "6.1.15"; }; metasploit-model = { groups = ["default"]; @@ -947,10 +947,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "14cxj3ra9nnn334qpm2vsx9s0zk3095s8ih6cwcp47h3hv03c73y"; + sha256 = "0zgv9pp9cqd1cf8bwk7pb5lkm81gn7znnan0a7s42wd0qavs4nnz"; type = "gem"; }; - version = "2.5.0"; + version = "2.6.0"; }; pg = { groups = ["default"]; @@ -1127,10 +1127,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1i3rn2ndf9ijgjfn3c8rpblw8lnqynm2flmfmm6dbfhjyhhawnaz"; + sha256 = "0hy7xrd3pwyfk2199zkgfa6kz1fsx7ngf6s512gpk8gadjc8hq6j"; type = "gem"; }; - version = "0.1.18"; + version = "0.1.20"; }; rex-encoder = { groups = ["default"]; diff --git a/pkgs/tools/security/mkp224o/default.nix b/pkgs/tools/security/mkp224o/default.nix index dc17cc60276..17d8e8ad4ff 100644 --- a/pkgs/tools/security/mkp224o/default.nix +++ b/pkgs/tools/security/mkp224o/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { variants = [ { suffix = "ref10"; configureFlags = ["--enable-ref10"]; } { suffix = "donna"; configureFlags = ["--enable-donna"]; } - ] ++ lib.optionals (stdenv.isi686 || stdenv.isx86_64) [ + ] ++ lib.optionals stdenv.hostPlatform.isx86 [ { suffix = "donna-sse2"; configureFlags = ["--enable-donna-sse2"]; } ] ++ lib.optionals stdenv.isx86_64 [ { suffix = "amd64-51-30k"; configureFlags = ["--enable-amd64-51-30k"]; } diff --git a/pkgs/tools/security/step-ca/default.nix b/pkgs/tools/security/step-ca/default.nix index f99e1fe74db..3a12761ee87 100644 --- a/pkgs/tools/security/step-ca/default.nix +++ b/pkgs/tools/security/step-ca/default.nix @@ -11,16 +11,16 @@ buildGoModule rec { pname = "step-ca"; - version = "0.17.4"; + version = "0.17.6"; src = fetchFromGitHub { owner = "smallstep"; repo = "certificates"; rev = "v${version}"; - sha256 = "sha256-X4dOrd/wxtYLw3C4Lj88RV/J6CEkmsOeqtiVX/6VFHg="; + sha256 = "sha256-hZdsxSEfb+DwnVOnnp9cT6diQWkFVPSa/T8YDsGlg3k="; }; - vendorSha256 = "sha256-/8Glo+U8MS8Y8mKECgTAB7JWmp/rjMQhG4nZkNs+Zgs="; + vendorSha256 = "sha256-OcnqMEotc18rX6BYs3oj8+83MRf7iJJNwjjXUQ5xfp4="; ldflags = [ "-buildid=" ]; diff --git a/pkgs/tools/security/trufflehog/default.nix b/pkgs/tools/security/trufflehog/default.nix index 353590ed87c..57f49988e75 100644 --- a/pkgs/tools/security/trufflehog/default.nix +++ b/pkgs/tools/security/trufflehog/default.nix @@ -12,11 +12,11 @@ let in python3Packages.buildPythonApplication rec { pname = "truffleHog"; - version = "2.1.11"; + version = "2.2.1"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "53619f0c5be082abd377f987291ace80bc3b88f864972b1a30494780980f769e"; + sha256 = "sha256-fw0JyM2iqQrkL4FAXllEozJdkKWELS3eAURx5NZcceQ="; }; # Relax overly restricted version constraint diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix index 7e4ce71ec54..88c786e30b6 100644 --- a/pkgs/tools/system/plan9port/default.nix +++ b/pkgs/tools/system/plan9port/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { pname = "plan9port"; - version = "0.pre+date=2021-10-19"; + version = "2021-10-19"; src = fetchFromGitHub { owner = "9fans"; @@ -101,6 +101,8 @@ stdenv.mkDerivation { kovirobi ]; platforms = platforms.unix; + # TODO: revisit this when the sdk situation on x86_64-darwin changes + broken = stdenv.isDarwin && stdenv.isx86_64; }; } # TODO: investigate the mouse chording support patch diff --git a/pkgs/tools/text/cmigemo/default.nix b/pkgs/tools/text/cmigemo/default.nix index 3562d40bc3e..92be45bbd9d 100644 --- a/pkgs/tools/text/cmigemo/default.nix +++ b/pkgs/tools/text/cmigemo/default.nix @@ -3,6 +3,9 @@ , skk-dicts }: +let + iconvBin = if stdenv.isDarwin then libiconv else buildPackages.stdenv.cc.libc; +in stdenv.mkDerivation { pname = "cmigemo"; version = "1.3e"; @@ -25,7 +28,7 @@ stdenv.mkDerivation { makeFlags = [ "INSTALL=install" ]; preBuild = '' - makeFlagsArray+=(FILTER_UTF8="${lib.getBin buildPackages.stdenv.cc.libc}/bin/iconv -t utf-8 -f cp932") + makeFlagsArray+=(FILTER_UTF8="${lib.getBin iconvBin}/bin/iconv -t utf-8 -f cp932") ''; buildFlags = [ (if stdenv.isDarwin then "osx-all" else "gcc-all") ]; diff --git a/pkgs/tools/text/invoice2data/default.nix b/pkgs/tools/text/invoice2data/default.nix index 8007724f4a5..941f2d6f493 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"; diff --git a/pkgs/tools/text/l2md/default.nix b/pkgs/tools/text/l2md/default.nix index e443cc42a2e..758130e9f0a 100644 --- a/pkgs/tools/text/l2md/default.nix +++ b/pkgs/tools/text/l2md/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "l2md"; - version = "unstable-2020-07-31"; + version = "unstable-2021-10-27"; src = fetchgit { url = "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git"; - rev = "2b9fae141fc2129940e0337732a35a3fc1c33455"; - sha256 = "PNNoD3a+rJwKH6wbOkvVU1IW4+xF7+zQaLFAlyLlYOI="; + rev = "9db252bc1716ebaf0abd3a47a59ea78e4e6253d6"; + sha256 = "sha256-H/leDUwQM55akyXsmTnI2YsnG4i1KQtf4bBt1fizy8E="; }; buildInputs = [ libgit2 ]; diff --git a/pkgs/tools/text/pn/default.nix b/pkgs/tools/text/pn/default.nix index 81e4c1eb358..d77b36651d6 100644 --- a/pkgs/tools/text/pn/default.nix +++ b/pkgs/tools/text/pn/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "pn"; - version = "unstable-2021-01-28"; + version = "0.9.0"; src = fetchFromGitHub { owner = "Orange-OpenSource"; repo = pname; - rev = "41e1215397129ed0d42b5f137fb35b5e0648edda"; - sha256 = "1g8r7y230k01ghraa55g1bhz3fiz6bjdgcsddy2dfa5ih8c4s3jm"; + rev = "v${version}"; + sha256 = "sha256-vRF9MPcw/hCreHVLD6QB7g1r0wQiZv1xrfzIHj1Yf9M="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/tools/text/tidy-viewer/default.nix b/pkgs/tools/text/tidy-viewer/default.nix index 29d243a6504..43b38d06b92 100644 --- a/pkgs/tools/text/tidy-viewer/default.nix +++ b/pkgs/tools/text/tidy-viewer/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "tidy-viewer"; - version = "1.4.2"; + version = "1.4.3"; src = fetchFromGitHub { owner = "alexhallam"; repo = "tv"; rev = version; - sha256 = "sha256-YXYz+SvL6YRwnZ7frmmx4NevNTh0rJcW7e4jSuX3TNs="; + sha256 = "sha256-onLu4XNe3sLfZ273Hq9IvgZEV9ir8oEXX7tQG75K2Hw="; }; - cargoSha256 = "sha256-KwnnoVacTMw7kHLQynv9557zUq8aFZfzBD+Zc9Q6XBs="; + cargoSha256 = "sha256-CYiRi6ny0wzTddpjdnnMHGqcWRM9wVjF34RmETgLH5A="; # this test parses command line arguments # error: Found argument '--test-threads' which wasn't expected, or isn't valid in this context |