diff options
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/admin/qovery-cli/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/archivers/rar/default.nix | 35 | ||||
-rwxr-xr-x | pkgs/tools/archivers/rar/update.sh | 78 | ||||
-rw-r--r-- | pkgs/tools/misc/tailspin/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/networking/ipinfo/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/security/nuclei/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/security/responder/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/system/lshw/default.nix | 54 | ||||
-rw-r--r-- | pkgs/tools/text/mdbook-i18n-helpers/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/text/runiq/default.nix | 12 |
10 files changed, 125 insertions, 89 deletions
diff --git a/pkgs/tools/admin/qovery-cli/default.nix b/pkgs/tools/admin/qovery-cli/default.nix index 7a89891e9cc2..0a0351d736ba 100644 --- a/pkgs/tools/admin/qovery-cli/default.nix +++ b/pkgs/tools/admin/qovery-cli/default.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "qovery-cli"; - version = "0.79.2"; + version = "0.80.0"; src = fetchFromGitHub { owner = "Qovery"; repo = "qovery-cli"; rev = "refs/tags/v${version}"; - hash = "sha256-vbN0og4IflqfIRQ/de/OQMjew0JIXmwj+nz9Dpg397s="; + hash = "sha256-HEOv58cUF/U/fa52cxre4HXXXNONSfHqbInI5nYvk0Q="; }; - vendorHash = "sha256-afRcW1MkRcVON2xmBvoeUzDR/JByViF4EEgGC0ftZeo="; + vendorHash = "sha256-Vvc2YoZnoCzIU/jE6XSg/eVkWTwl6i04Fd5RHTaS1WM="; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/tools/archivers/rar/default.nix b/pkgs/tools/archivers/rar/default.nix index a1c22835752b..168316813f76 100644 --- a/pkgs/tools/archivers/rar/default.nix +++ b/pkgs/tools/archivers/rar/default.nix @@ -1,39 +1,43 @@ -{ lib, stdenv, fetchurl, autoPatchelfHook, installShellFiles }: +{ lib +, stdenv +, fetchurl +, autoPatchelfHook +, installShellFiles +}: let - version = "6.21"; + version = "6.24"; downloadVersion = lib.replaceStrings [ "." ] [ "" ] version; - # Use `nix store prefetch-file <url>` to generate the hashes for the other systems - # TODO: create update script - srcUrl = { + # Use `./update.sh` to generate the entries below + srcs = { i686-linux = { url = "https://www.rarlab.com/rar/rarlinux-x32-${downloadVersion}.tar.gz"; - hash = "sha256-mDeRmLTjF0ZLv4JoLrgI8YBFFulBSKfOPb6hrxDZIkU="; + hash = "sha256-aacgJH0iJLRNEaZuVyzl/FxZgSnW3dIZFUfaqt0l88M="; }; x86_64-linux = { url = "https://www.rarlab.com/rar/rarlinux-x64-${downloadVersion}.tar.gz"; - hash = "sha256-3fr5aVkh/r6OfBEcZULJSZp5ydakJOLRPlgzMdlwGTM="; + hash = "sha256-iOIqjoQSXJR2N7vyjHRuM4oKYyedgPn51zc2A4ddses="; }; aarch64-darwin = { url = "https://www.rarlab.com/rar/rarmacos-arm-${downloadVersion}.tar.gz"; - hash = "sha256-OR9HBlRteTzuyQ06tyXTSrFTBHFwmZ41kUfvgflogT4="; + hash = "sha256-2r4zWDT7Xw/CNvA7oNEsGfrXJDzFa5gNthIB/5TYR5U="; }; x86_64-darwin = { url = "https://www.rarlab.com/rar/rarmacos-x64-${downloadVersion}.tar.gz"; - hash = "sha256-UN3gmEuIpCXwmw3/l+KdarAYLy1DxGoPAOB2bfJTGbw="; + hash = "sha256-4vENPNfMpQstsm9+8+glHPK9fAlDmnHWbCHW+HUwSX4="; }; - }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); + }; manSrc = fetchurl { url = "https://aur.archlinux.org/cgit/aur.git/plain/rar.1?h=rar&id=8e39a12e88d8a3b168c496c44c18d443c876dd10"; name = "rar.1"; hash = "sha256-93cSr9oAsi+xHUtMsUvICyHJe66vAImS2tLie7nt8Uw="; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "rar"; inherit version; - src = fetchurl srcUrl; + src = fetchurl (srcs.${stdenv.hostPlatform.system}); dontBuild = true; @@ -57,12 +61,15 @@ stdenv.mkDerivation rec { installManPage ${manSrc} ''; + passthru.updateScript = ./update.sh; + meta = with lib; { description = "Utility for RAR archives"; homepage = "https://www.rarlab.com/"; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; + mainProgram = "rar"; maintainers = with maintainers; [ thiagokokada ]; - platforms = with platforms; linux ++ darwin; + platforms = lib.attrNames srcs; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; } diff --git a/pkgs/tools/archivers/rar/update.sh b/pkgs/tools/archivers/rar/update.sh new file mode 100755 index 000000000000..f81562727f29 --- /dev/null +++ b/pkgs/tools/archivers/rar/update.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl gawk gnused pup jq + +set -euo pipefail + +DIRNAME=$(dirname "$0") +readonly DIRNAME +readonly NIXPKGS_ROOT="../../../.." +readonly NIX_FLAGS=(--extra-experimental-features 'nix-command flakes') + +# awk is used for parsing the RARLAB website to get the newest version +readonly AWK_FIELD_SEPARATOR='[-.]' +# shellcheck disable=SC2016 +readonly AWK_COMMAND=' +# We will get the following output from pup: +# /rar/rarlinux-x64-700b3.tar.gz +# /rar/rarmacos-x64-700b3.tar.gz +# /rar/rarlinux-x64-624.tar.gz +# /rar/rarbsd-x64-624.tar.gz +# /rar/rarmacos-x64-624.tar.gz + +# Ignore anything that is flagged as beta (e.g.: `/rar/rarlinux-x64-700b3.tar.gz`) +!/[0-9]+b[0-9]*.tar.gz$/ { + # /rar/rarlinux-x64-624.tar.gz -> 624 + val = $3 + # Only get the value if it is bigger than the current one + if (val > max) max = val +} +END { + # 624 -> 6.24 + printf "%.2f\n", max/100 +} +' + +updateHash() { + local -r version="${1//./}" + local -r arch="$2" + local -r os="$3" + local -r nix_arch="$4" + + url="https://www.rarlab.com/rar/rar$os-$arch-$version.tar.gz" + hash=$(nix store prefetch-file --json "$url" | jq -r .hash) + currentHash=$(cd "$DIRNAME" && nix "${NIX_FLAGS[@]}" eval --raw "$NIXPKGS_ROOT#legacyPackages.$nix_arch.rar.src.outputHash") + + sed -i "s|$currentHash|$hash|g" "$DIRNAME/default.nix" +} + +updateVersion() { + local -r version="$1" + sed -i "s|version = \"[0-9.]*\";|version = \"$version\";|g" "$DIRNAME/default.nix" +} + +latestVersion="${1:-}" +if [[ -z "$latestVersion" ]]; then + latestVersion=$( + curl --silent --location --fail https://www.rarlab.com/download.htm | \ + pup 'a[href*=".tar.gz"] attr{href}' | \ + awk -F"$AWK_FIELD_SEPARATOR" "$AWK_COMMAND" + ) +fi +readonly latestVersion +echo "Latest version: $latestVersion" + +currentVersion=$(cd "$DIRNAME" && nix "${NIX_FLAGS[@]}" eval --raw "$NIXPKGS_ROOT#legacyPackages.x86_64-linux.rar.version") +readonly currentVersion +echo "Current version: $currentVersion" + +if [[ "$currentVersion" == "$latestVersion" ]]; then + echo "rar is up-to-date" + exit 0 +fi + +updateHash "$latestVersion" x32 linux i686-linux +updateHash "$latestVersion" x64 linux x86_64-linux +updateHash "$latestVersion" arm macos aarch64-darwin +updateHash "$latestVersion" x64 macos x86_64-darwin + +updateVersion "$latestVersion" diff --git a/pkgs/tools/misc/tailspin/default.nix b/pkgs/tools/misc/tailspin/default.nix index b46b25979a51..913e9cfd36da 100644 --- a/pkgs/tools/misc/tailspin/default.nix +++ b/pkgs/tools/misc/tailspin/default.nix @@ -5,16 +5,16 @@ rustPlatform.buildRustPackage rec { pname = "tailspin"; - version = "2.2.0"; + version = "2.3.0"; src = fetchFromGitHub { owner = "bensadeh"; repo = "tailspin"; rev = version; - hash = "sha256-ggh0y50yzqWQbjdP/weboEmo4CpfAGZmtt1WWLokpZ8="; + hash = "sha256-xbnJ2QoTrJwzWIm/GfYW9QCn0DsfA9jLC6rwik4Pxs8="; }; - cargoHash = "sha256-R67bHDGFxCStKKHTR820r0CjbrqjQ6evtnBMaqCDRYM="; + cargoHash = "sha256-ios/qRp2crV3g7g/jATuUp/zBdDOCEMhAWfeKFM8NdM="; meta = with lib; { description = "A log file highlighter"; diff --git a/pkgs/tools/networking/ipinfo/default.nix b/pkgs/tools/networking/ipinfo/default.nix index 16b68e4801c6..e9db76d73f56 100644 --- a/pkgs/tools/networking/ipinfo/default.nix +++ b/pkgs/tools/networking/ipinfo/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "ipinfo"; - version = "3.2.0"; + version = "3.3.0"; src = fetchFromGitHub { owner = pname; repo = "cli"; rev = "refs/tags/${pname}-${version}"; - hash = "sha256-bqA8Y3mVHSwhUcvr3biWbH6K73MYmo3f7wSMS4J+Bk8="; + hash = "sha256-B0Qb6RFBAUBpE1o8GqKQtxpndeHermMlwlWlfIa7rmM="; }; vendorHash = null; diff --git a/pkgs/tools/security/nuclei/default.nix b/pkgs/tools/security/nuclei/default.nix index c0c0fdef6fb9..7763aff3cdbb 100644 --- a/pkgs/tools/security/nuclei/default.nix +++ b/pkgs/tools/security/nuclei/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "nuclei"; - version = "3.1.3"; + version = "3.1.4"; src = fetchFromGitHub { owner = "projectdiscovery"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-XTKJq7bq6iNzZ4LnxQxqzbNDdNh0ixFclB3kniNvg2I="; + hash = "sha256-ueZnsP53+BYsU8ooYgz/IZYQ6AXj/nkOYuLdNGKGB2Q="; }; - vendorHash = "sha256-C/CDMj+R7p0wkjHSQX6GMRDU1PEDHi8574JS/A2zrzk="; + vendorHash = "sha256-YZNjhTspsGk1xWlPav99hPKgxolpuwNF6PMjh/Zc6h4="; subPackages = [ "cmd/nuclei/" diff --git a/pkgs/tools/security/responder/default.nix b/pkgs/tools/security/responder/default.nix index 51120e8a575d..a51bb40ac5fd 100644 --- a/pkgs/tools/security/responder/default.nix +++ b/pkgs/tools/security/responder/default.nix @@ -6,14 +6,14 @@ python3.pkgs.buildPythonApplication rec { pname = "responder"; - version = "3.1.3.0"; + version = "3.1.4.0"; format = "other"; src = fetchFromGitHub { owner = "lgandx"; repo = "Responder"; rev = "refs/tags/v${version}"; - hash = "sha256-ZnWUkV+9fn08Ze4468wSUtldABrmn+88N2Axc+Mip2A="; + hash = "sha256-BVSA/ZhpGz6UGyDRJUc4nlRJZ1/Y7er1vVOI+IbIqGk="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/system/lshw/default.nix b/pkgs/tools/system/lshw/default.nix deleted file mode 100644 index 5a6318ea4c21..000000000000 --- a/pkgs/tools/system/lshw/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, hwdata -, gtk2 -, pkg-config -, gettext -, sqlite # compile GUI -, withGUI ? false -}: - -stdenv.mkDerivation rec { - pname = "lshw"; - # FIXME: when switching to a stable release: - # Fix repology.org by not including the prefixed B, otherwise the `pname` attr - # gets filled as `lshw-B.XX.XX` in `nix-env --query --available --attr nixpkgs.lshw --meta` - # See https://github.com/NixOS/nix/pull/4463 for a definitive fix - version = "unstable-2023-03-20"; - - src = fetchFromGitHub { - owner = "lyonel"; - repo = pname; - rev = "b4e067307906ec6f277cce5c8a882f5edd03cbbc"; - #rev = "B.${version}"; - sha256 = "sha256-ahdaQeYZEFCVxwAMJPMB9bfo3ndIiqFyM6OghXwtm1A="; - }; - - nativeBuildInputs = [ pkg-config gettext ]; - - buildInputs = [ hwdata ] - ++ lib.optionals withGUI [ gtk2 sqlite ]; - - makeFlags = [ - "PREFIX=$(out)" - "VERSION=${src.rev}" - ]; - - buildFlags = [ "all" ] ++ lib.optional withGUI "gui"; - - hardeningDisable = lib.optionals stdenv.hostPlatform.isStatic [ "fortify" ]; - - installTargets = [ "install" ] ++ lib.optional withGUI "install-gui"; - - enableParallelBuilding = true; - - meta = with lib; { - homepage = "https://ezix.org/project/wiki/HardwareLiSter"; - description = "Provide detailed information on the hardware configuration of the machine"; - license = licenses.gpl2; - maintainers = with maintainers; [ thiagokokada ]; - platforms = platforms.linux; - mainProgram = "lshw"; - }; -} diff --git a/pkgs/tools/text/mdbook-i18n-helpers/default.nix b/pkgs/tools/text/mdbook-i18n-helpers/default.nix index e3485f46295a..a0c80149d6af 100644 --- a/pkgs/tools/text/mdbook-i18n-helpers/default.nix +++ b/pkgs/tools/text/mdbook-i18n-helpers/default.nix @@ -5,16 +5,17 @@ rustPlatform.buildRustPackage rec { pname = "mdbook-i18n-helpers"; - version = "0.2.4"; + version = "0.3.0"; src = fetchFromGitHub { owner = "google"; repo = "mdbook-i18n-helpers"; - rev = "refs/tags/${version}"; - hash = "sha256-TxSALv/uqRFdv4JZ8BCiAlirMcizGRkw0YxMCBVkgo4="; + # TODO fix once upstream uses semver for tags again + rev = "refs/tags/mdbook-i18n-helpers-${version}"; + hash = "sha256-oS1U76BgTW+YnhyLPRTlIg03RR9s5oybFIdCm3MVkvc="; }; - cargoHash = "sha256-BhaSK2A/z05a75dEx8c4RHKau1HRJabOcQ6/eLvcdio="; + cargoHash = "sha256-bDv6pJTFs6U5vnWy5vcLv28Mjf7zrepsfs+JCu00xkA="; meta = with lib; { description = "Helpers for a mdbook i18n workflow based on Gettext"; diff --git a/pkgs/tools/text/runiq/default.nix b/pkgs/tools/text/runiq/default.nix index 7b1e99978a45..42b9e2aef395 100644 --- a/pkgs/tools/text/runiq/default.nix +++ b/pkgs/tools/text/runiq/default.nix @@ -1,15 +1,19 @@ -{ fetchCrate, lib, rustPlatform }: +{ lib, rustPlatform, fetchCrate, stdenv, darwin }: rustPlatform.buildRustPackage rec { pname = "runiq"; - version = "1.2.2"; + version = "2.0.0"; src = fetchCrate { inherit pname version; - sha256 = "sha256-WPQgTQICZ0DFr+7D99UGMx+I78376IC6iIJ3tCsj0Js="; + sha256 = "sha256-qcgPuJOpK2fCsHAgzoIKF7upb9B3ySIZkpu9xf4JnCc="; }; - cargoSha256 = "sha256-QKtrd690eoPXyd5CQg5/yAiTDk297y60XaUdoeFAe0c="; + cargoHash = "sha256-WSMV0GNKNckN9uSPN647iDloGkNtaKcrZbeyglUappc="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; meta = with lib; { description = "An efficient way to filter duplicate lines from input, à la uniq"; |