diff options
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/archivers/unzip/default.nix | 1 | ||||
-rw-r--r-- | pkgs/tools/audio/openai-whisper-cpp/default.nix | 14 | ||||
-rw-r--r-- | pkgs/tools/audio/openai-whisper-cpp/download-models.patch | 48 | ||||
-rw-r--r-- | pkgs/tools/filesystems/dwarfs/default.nix | 68 | ||||
-rw-r--r-- | pkgs/tools/filesystems/dwarfs/version_info.patch | 58 | ||||
-rw-r--r-- | pkgs/tools/misc/immich-cli/default.nix | 71 | ||||
-rw-r--r-- | pkgs/tools/misc/panoply/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/misc/wyrd/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/networking/containerlab/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/networking/haproxy/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/networking/netcat/default.nix | 1 | ||||
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 4 |
12 files changed, 137 insertions, 146 deletions
diff --git a/pkgs/tools/archivers/unzip/default.nix b/pkgs/tools/archivers/unzip/default.nix index d7533f0bf90fb..ae9a129c766f6 100644 --- a/pkgs/tools/archivers/unzip/default.nix +++ b/pkgs/tools/archivers/unzip/default.nix @@ -102,6 +102,7 @@ stdenv.mkDerivation rec { description = "Extraction utility for archives compressed in .zip format"; license = lib.licenses.info-zip; platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ RossComputerGuy ]; mainProgram = "unzip"; }; } diff --git a/pkgs/tools/audio/openai-whisper-cpp/default.nix b/pkgs/tools/audio/openai-whisper-cpp/default.nix index ab1cbb77e97bb..218872ed1e313 100644 --- a/pkgs/tools/audio/openai-whisper-cpp/default.nix +++ b/pkgs/tools/audio/openai-whisper-cpp/default.nix @@ -25,13 +25,13 @@ let in effectiveStdenv.mkDerivation (finalAttrs: { pname = "whisper-cpp"; - version = "1.5.4"; + version = "1.6.2"; src = fetchFromGitHub { owner = "ggerganov"; repo = "whisper.cpp"; rev = "refs/tags/v${finalAttrs.version}" ; - hash = "sha256-9H2Mlua5zx2WNXbz2C5foxIteuBgeCNALdq5bWyhQCk="; + hash = "sha256-hIEIu7feOZWqxRskf6Ej7l653/9KW8B3cnpPLoCRBAc="; }; # The upstream download script tries to download the models to the @@ -80,6 +80,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { env = lib.optionalAttrs stdenv.isDarwin { WHISPER_COREML = "1"; WHISPER_COREML_ALLOW_FALLBACK = "1"; + WHISPER_METAL_EMBED_LIBRARY = "1"; } // lib.optionalAttrs cudaSupport { WHISPER_CUBLAS = "1"; }; @@ -99,15 +100,6 @@ effectiveStdenv.mkDerivation (finalAttrs: { wrapProgram $out/bin/whisper-cpp-download-ggml-model \ --prefix PATH : ${lib.makeBinPath [wget]} - ${lib.optionalString stdenv.isDarwin '' - install -Dt $out/share/whisper-cpp ggml-metal.metal - - for bin in whisper-cpp whisper-cpp-stream whisper-cpp-command; do - wrapProgram $out/bin/$bin \ - --set-default GGML_METAL_PATH_RESOURCES $out/share/whisper-cpp - done - ''} - runHook postInstall ''; diff --git a/pkgs/tools/audio/openai-whisper-cpp/download-models.patch b/pkgs/tools/audio/openai-whisper-cpp/download-models.patch index 7183c38b51669..7589c2ef36f83 100644 --- a/pkgs/tools/audio/openai-whisper-cpp/download-models.patch +++ b/pkgs/tools/audio/openai-whisper-cpp/download-models.patch @@ -1,51 +1,53 @@ +diff --git a/models/download-ggml-model.sh b/models/download-ggml-model.sh +index 1f1075b..7476c8e 100755 --- a/models/download-ggml-model.sh +++ b/models/download-ggml-model.sh -@@ -9,18 +9,6 @@ - src="https://huggingface.co/ggerganov/whisper.cpp" - pfx="resolve/main/ggml" +@@ -12,18 +12,6 @@ pfx="resolve/main/ggml" + BOLD="\033[1m" + RESET='\033[0m' -# get the path of this script --function get_script_path() { +-get_script_path() { - if [ -x "$(command -v realpath)" ]; then -- echo "$(dirname "$(realpath "$0")")" +- dirname "$(realpath "$0")" - else -- local ret="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" -- echo "$ret" +- _ret="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit ; pwd -P)" +- echo "$_ret" - fi -} - -models_path="${2:-$(get_script_path)}" - # Whisper models - models=( - "tiny.en" -@@ -56,8 +44,8 @@ function list_models { + models="tiny + tiny.en +@@ -64,8 +52,8 @@ list_models() { printf "\n\n" } -if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then -- printf "Usage: $0 <model> [models_path]\n" +- printf "Usage: %s <model> [models_path]\n" "$0" +if [ "$#" -ne 1 ]; then -+ printf "Usage: $0 <model>\n" ++ printf "Usage: %s <model>\n" "$0" list_models + printf "___________________________________________________________\n" + printf "${BOLD}.en${RESET} = english-only ${BOLD}-q5_[01]${RESET} = quantized ${BOLD}-tdrz${RESET} = tinydiarize\n" +@@ -94,8 +82,6 @@ echo "$model" | grep -q '^"tdrz"*$' - exit 1 -@@ -82,8 +70,6 @@ fi - - printf "Downloading ggml model $model from '$src' ...\n" + printf "Downloading ggml model %s from '%s' ...\n" "$model" "$src" --cd "$models_path" +-cd "$models_path" || exit - if [ -f "ggml-$model.bin" ]; then - printf "Model $model already exists. Skipping download.\n" + printf "Model %s already exists. Skipping download.\n" "$model" exit 0 -@@ -105,7 +91,7 @@ if [ $? -ne 0 ]; then +@@ -116,7 +102,7 @@ if [ $? -ne 0 ]; then exit 1 fi --printf "Done! Model '$model' saved in '$models_path/ggml-$model.bin'\n" -+printf "Done! Model '$model' saved in 'ggml-$model.bin'\n" +-printf "Done! Model '%s' saved in '%s/ggml-%s.bin'\n" "$model" "$models_path" "$model" ++printf "Done! Model '%s' saved in 'ggml-%s.bin'\n" "$model" "$model" printf "You can now use it like this:\n\n" --printf " $ ./main -m $models_path/ggml-$model.bin -f samples/jfk.wav\n" -+printf " $ whisper-cpp -m ggml-$model.bin -f samples/jfk.wav\n" +-printf " $ ./main -m %s/ggml-%s.bin -f samples/jfk.wav\n" "$models_path" "$model" ++printf " $ whisper-cpp -m ggml-%s.bin -f samples/jfk.wav\n" "$model" printf "\n" diff --git a/pkgs/tools/filesystems/dwarfs/default.nix b/pkgs/tools/filesystems/dwarfs/default.nix index 0ee916b2d53f8..719ccd1e23d21 100644 --- a/pkgs/tools/filesystems/dwarfs/default.nix +++ b/pkgs/tools/filesystems/dwarfs/default.nix @@ -9,8 +9,10 @@ double-conversion, fmt, fuse3, + flac, glog, gtest, + howard-hinnant-date, jemalloc, libarchive, libevent, @@ -18,60 +20,59 @@ lz4, openssl, pkg-config, + python3, + range-v3, ronn, xxHash, utf8cpp, zstd, }: -let +stdenv.mkDerivation (finalAttrs: { pname = "dwarfs"; - version = "0.9.9"; -in -stdenv.mkDerivation { - inherit pname version; + version = "0.9.10"; src = fetchFromGitHub { owner = "mhx"; repo = "dwarfs"; - rev = "refs/tags/v${version}"; + rev = "refs/tags/v${finalAttrs.version}"; fetchSubmodules = true; - hash = "sha256-Zzm2SaFR31TBBMDfgJulVbqsJBh1He2wBFzHRC/c5vg="; + hash = "sha256-uyYNs+fDV5BfQwfX9Wi3BwiKjSDQHAKRJ1+UvS/fHoE="; }; - patches = [ - ( - with lib.versions; - substituteAll { - src = ./version_info.patch; + cmakeFlags = [ + "-DNIXPKGS_DWARFS_VERSION_OVERRIDE=v${finalAttrs.version}" # see https://github.com/mhx/dwarfs/issues/155 - versionFull = version; # displayed as version number (with v prepended) - versionMajor = major version; - versionMinor = minor version; - versionPatch = patch version; - } - ) - ]; + # Needs to be set so `dwarfs` does not try to download `gtest`; it is not + # a submodule, see: https://github.com/mhx/dwarfs/issues/188#issuecomment-1907657083 + "-DPREFER_SYSTEM_GTEST=ON" - cmakeFlags = [ + # These should no longer be necessary with a version > 0.9.10: + # * https://github.com/mhx/dwarfs/commit/593b22a8a90eb66c0898ae06f097f32f4bf3dfd4 + # * https://github.com/mhx/dwarfs/commit/6e9608b2b01be13e41e6b728aae537c14c00ad82 + # * https://github.com/mhx/dwarfs/commit/ce4bee1ad63c666da57d2cdae9fd65214d8dab7f + "-DPREFER_SYSTEM_LIBFMT=ON" "-DPREFER_SYSTEM_ZSTD=ON" "-DPREFER_SYSTEM_XXHASH=ON" - "-DPREFER_SYSTEM_GTEST=ON" - "-DPREFER_SYSTEM_LIBFMT=ON" # may be added under an option in the future # "-DWITH_LEGACY_FUSE=ON" + "-DWITH_TESTS=ON" ]; nativeBuildInputs = [ bison cmake + howard-hinnant-date # uses only the header-only parts pkg-config + range-v3 # header-only library ronn + (python3.withPackages (ps: [ ps.mistletoe ])) # for man pages ]; buildInputs = [ # dwarfs boost + flac # optional; allows automatic audio compression fmt fuse3 jemalloc @@ -90,17 +91,32 @@ stdenv.mkDerivation { ]; doCheck = true; - nativeCheckInputs = [ gtest ]; + nativeCheckInputs = [ + # https://github.com/mhx/dwarfs/issues/188#issuecomment-1907574427 + # `dwarfs` sets C++20 as the minimum, see + # https://github.com/mhx/dwarfs/blob/2cb5542a5d4274225c5933370adcf00035f6c974/CMakeLists.txt#L129 + # Thus the `gtest` headers, when included, + # refer to symbols that only exist in `.so` files compiled with that version. + (gtest.override { cxx_standard = "20"; }) + ]; # these fail inside of the sandbox due to missing access # to the FUSE device - GTEST_FILTER = "-dwarfs/tools_test.end_to_end/*:dwarfs/tools_test.mutating_ops/*"; + GTEST_FILTER = + let + disabledTests = [ + "dwarfs/tools_test.end_to_end/*" + "dwarfs/tools_test.mutating_and_error_ops/*" + "dwarfs/tools_test.categorize/*" + ]; + in + "-${lib.concatStringsSep ":" disabledTests}"; meta = { description = "Fast high compression read-only file system"; homepage = "https://github.com/mhx/dwarfs"; - changelog = "https://github.com/mhx/dwarfs/blob/v${version}/CHANGES.md"; + changelog = "https://github.com/mhx/dwarfs/blob/v${finalAttrs.version}/CHANGES.md"; license = lib.licenses.gpl3Plus; maintainers = [ lib.maintainers.luftmensch-luftmensch ]; platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/tools/filesystems/dwarfs/version_info.patch b/pkgs/tools/filesystems/dwarfs/version_info.patch deleted file mode 100644 index 8d62bd8d22957..0000000000000 --- a/pkgs/tools/filesystems/dwarfs/version_info.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/cmake/package_version.cmake b/cmake/package_version.cmake -new file mode 100644 -index 0000000..d4fdb9c ---- /dev/null -+++ b/cmake/package_version.cmake -@@ -0,0 +1,12 @@ -+# autogenerated code, do not modify -+ -+set(PRJ_GIT_REV "v@versionFull@") -+set(PRJ_GIT_DESC "v@versionFull@") -+set(PRJ_GIT_BRANCH "HEAD") -+set(PRJ_GIT_ID "v@versionFull@") -+set(PRJ_GIT_RELEASE_TAG "v@versionFull@") -+set(PRJ_VERSION_FULL "@versionFull@") -+set(PRJ_VERSION_SHORT "@versionFull@") -+set(PRJ_VERSION_MAJOR "@versionMajor@") -+set(PRJ_VERSION_MINOR "@versionMinor@") -+set(PRJ_VERSION_PATCH "@versionPatch@") -diff --git a/include/dwarfs/version.h b/include/dwarfs/version.h -new file mode 100644 -index 0000000..54cf86a ---- /dev/null -+++ b/include/dwarfs/version.h -@@ -0,0 +1,16 @@ -+// autogenerated code, do not modify -+ -+#pragma once -+ -+#define PRJ_VERSION_MAJOR @versionMajor@ -+#define PRJ_VERSION_MINOR @versionMinor@ -+#define PRJ_VERSION_PATCH @versionPatch@ -+ -+namespace dwarfs { -+ -+extern char const* PRJ_GIT_REV; -+extern char const* PRJ_GIT_DESC; -+extern char const* PRJ_GIT_BRANCH; -+extern char const* PRJ_GIT_ID; -+ -+} // namespace dwarfs -diff --git a/src/dwarfs/version.cpp b/src/dwarfs/version.cpp -new file mode 100644 -index 0000000..5759120 ---- /dev/null -+++ b/src/dwarfs/version.cpp -@@ -0,0 +1,12 @@ -+// autogenerated code, do not modify -+ -+#include "dwarfs/version.h" -+ -+namespace dwarfs { -+ -+char const* PRJ_GIT_REV = "@versionFull@"; -+char const* PRJ_GIT_DESC = "v@versionFull@"; -+char const* PRJ_GIT_BRANCH = "HEAD"; -+char const* PRJ_GIT_ID = "v@versionFull@"; -+ -+} // namespace dwarfs diff --git a/pkgs/tools/misc/immich-cli/default.nix b/pkgs/tools/misc/immich-cli/default.nix index 82d8e96ec798a..21d0600d92b13 100644 --- a/pkgs/tools/misc/immich-cli/default.nix +++ b/pkgs/tools/misc/immich-cli/default.nix @@ -1,31 +1,70 @@ { lib , buildNpmPackage , fetchFromGitHub +, testers }: -buildNpmPackage { - pname = "immich-cli"; - version = "2.0.6"; - +let + version = "2.2.4"; src = fetchFromGitHub { owner = "immich-app"; repo = "immich"; # Using a fixed commit until upstream has release tags for cli. - rev = "014adf175ad50a61f92804666940e267ab329064"; - hash = "sha256-MK3Watq5/Zp+rymCIfWxAXSgBPDE13g23uDnW7A5x9g="; + rev = "8c2195c8205156f6e3168cc52fa34db334568ea9"; + hash = "sha256-Tseu6aIrYU4Af/jWDi2wDtP77n/aogp7Qkn9mosMaes="; }; - - npmDepsHash = "sha256-ssxOXKE1t/bSb972w/cBeK61IrqPLmx9ODMn6D+2Ezw="; - - postPatch = '' - cd cli - ''; - - meta = { + meta' = { description = "CLI utilities for Immich to help upload images and videos"; homepage = "https://github.com/immich-app/immich"; license = lib.licenses.mit; - mainProgram = "immich"; maintainers = with lib.maintainers; [ felschr pineapplehunter ]; + mainProgram = "immich"; + }; + + open-api-typescript-sdk = buildNpmPackage { + pname = "immich-cli-openapi-typescript-sdk"; + inherit src version; + + npmDepsHash = "sha256-WhNdFaFBwb6ehEQgbNJGdzPb3FdJk1Nefi8DcJfY9Wc="; + + postPatch = '' + cd open-api/typescript-sdk + ''; + meta = { + # using inherit for `builtin.unsafeGetAttrPos` to work correctly + inherit (meta') + description + homepage + license + maintainers; + }; + }; + + immich-cli = buildNpmPackage { + pname = "immich-cli"; + inherit src version; + + npmDepsHash = "sha256-aSTN+I8B/aLT2ItGoyZTlbdn1VCK0ZmOb1QG7ZQuz+Q="; + + postPatch = '' + ln -sv ${open-api-typescript-sdk}/lib/node_modules/@immich/sdk/{build,node_modules} open-api/typescript-sdk + cd cli + ''; + + passthru = { + inherit open-api-typescript-sdk; + tests.version = testers.testVersion { package = immich-cli; }; + }; + + meta = { + # using inherit for `builtin.unsafeGetAttrPos` to work correctly + inherit (meta') + description + homepage + license + maintainers + mainProgram; + }; }; -} +in +immich-cli diff --git a/pkgs/tools/misc/panoply/default.nix b/pkgs/tools/misc/panoply/default.nix index d2a04e3c38f7e..2aef5a0788a8d 100644 --- a/pkgs/tools/misc/panoply/default.nix +++ b/pkgs/tools/misc/panoply/default.nix @@ -2,11 +2,11 @@ stdenvNoCC.mkDerivation rec { pname = "panoply"; - version = "5.4.1"; + version = "5.4.3"; src = fetchurl { url = "https://www.giss.nasa.gov/tools/panoply/download/PanoplyJ-${version}.tgz"; - sha256 = "sha256-C/9kFWDpv4bzqpsUcGpZn7P+fqU6teU39HibYhhva3o="; + sha256 = "sha256-xey1Og0TEMgCc9Me/np7BGnUNYTz98gMFzLm2IcQHtw="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/misc/wyrd/default.nix b/pkgs/tools/misc/wyrd/default.nix index 8f5ad8268e693..18647cae1a232 100644 --- a/pkgs/tools/misc/wyrd/default.nix +++ b/pkgs/tools/misc/wyrd/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { downloadPage = "http://pessimization.com/software/wyrd/"; license = licenses.gpl2Only; maintainers = [ maintainers.prikhi ]; - platforms = platforms.linux; + platforms = platforms.unix; mainProgram = "wyrd"; }; } diff --git a/pkgs/tools/networking/containerlab/default.nix b/pkgs/tools/networking/containerlab/default.nix index aeaa2d044cb60..07cdb09a4955d 100644 --- a/pkgs/tools/networking/containerlab/default.nix +++ b/pkgs/tools/networking/containerlab/default.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "containerlab"; - version = "0.55.0"; + version = "0.55.1"; src = fetchFromGitHub { owner = "srl-labs"; repo = "containerlab"; rev = "v${version}"; - hash = "sha256-g+42nvNR1sWrkeU/oOajtmqeDVjRiwp7i+hrZU+FE00="; + hash = "sha256-Dk1so6CXAbnfyWfqHne/mMc8LYS3JqXj6XM53fQKANk="; }; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix index 225c4b1c8cd9e..4cef8e04ea2d3 100644 --- a/pkgs/tools/networking/haproxy/default.nix +++ b/pkgs/tools/networking/haproxy/default.nix @@ -14,7 +14,6 @@ , openssl , lua5_4 , pcre2 -, systemd }: assert lib.assertOneOf "sslLibrary" sslLibrary [ "quictls" "openssl" "libressl" "wolfssl" ]; @@ -29,17 +28,16 @@ let sslPkg = sslPkgs.${sslLibrary}; in stdenv.mkDerivation (finalAttrs: { pname = "haproxy"; - version = "2.9.7"; + version = "3.0.2"; src = fetchurl { url = "https://www.haproxy.org/download/${lib.versions.majorMinor finalAttrs.version}/src/haproxy-${finalAttrs.version}.tar.gz"; - hash = "sha256-0aClbwCKjS8Ae8DDffaylSUg0fTd4zuNOAJxDlFYwTE="; + hash = "sha256-lnLuQ7EJ8ZNWw11yaHsiLc+CuHk2DG6CZ3OXN2z13DY="; }; buildInputs = [ sslPkg zlib libxcrypt ] ++ lib.optional useLua lua5_4 - ++ lib.optional usePcre pcre2 - ++ lib.optional stdenv.isLinux systemd; + ++ lib.optional usePcre pcre2; # TODO: make it work on bsd as well makeFlags = [ diff --git a/pkgs/tools/networking/netcat/default.nix b/pkgs/tools/networking/netcat/default.nix index 7d7806f1997e2..8271fe9d27a52 100644 --- a/pkgs/tools/networking/netcat/default.nix +++ b/pkgs/tools/networking/netcat/default.nix @@ -15,5 +15,6 @@ stdenv.mkDerivation rec { mainProgram = "netcat"; license = licenses.gpl2Plus; platforms = platforms.unix; + maintainers = with lib.maintainers; [ RossComputerGuy ]; }; } diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 677dcf3aa1996..87077b42d96e4 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -147,8 +147,8 @@ in lib.makeExtensible (self: ({ }; nix_2_18 = common { - version = "2.18.2"; - hash = "sha256-8gNJlBlv2bnffRg0CejiBXc6U/S6YeCLAdHrYvTPyoY="; + version = "2.18.3"; + hash = "sha256-430V4oN1Pid0h3J1yucrik6lbDh5D+pHI455bzLPEDY="; self_attribute_name = "nix_2_18"; }; |