diff options
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/broot/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/byobu/default.nix | 76 | ||||
-rw-r--r-- | pkgs/tools/misc/colord/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/misc/cyberchef/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/misc/esphome/default.nix | 7 | ||||
-rw-r--r-- | pkgs/tools/misc/faketty/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/fastfetch/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/misc/fend/default.nix | 10 | ||||
-rw-r--r-- | pkgs/tools/misc/lockfile-progs/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/misc/mise/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/ollama/default.nix | 251 | ||||
-rw-r--r-- | pkgs/tools/misc/osm2pgsql/default.nix | 77 | ||||
-rw-r--r-- | pkgs/tools/misc/tagref/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/topicctl/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/misc/xq/default.nix | 6 |
15 files changed, 158 insertions, 316 deletions
diff --git a/pkgs/tools/misc/broot/default.nix b/pkgs/tools/misc/broot/default.nix index 17090d28ca93e..ee907902ada87 100644 --- a/pkgs/tools/misc/broot/default.nix +++ b/pkgs/tools/misc/broot/default.nix @@ -18,16 +18,16 @@ rustPlatform.buildRustPackage rec { pname = "broot"; - version = "1.33.1"; + version = "1.34.0"; src = fetchFromGitHub { owner = "Canop"; repo = pname; rev = "v${version}"; - hash = "sha256-k8rBf1kSeumtOHixJR9g90q+u5eIL0584fvTK/Qg/FU="; + hash = "sha256-5CWcc55OunZwCTqODQnvPUnn5cJET83PfIyDyzmpOkA="; }; - cargoHash = "sha256-MxWtPc1C+L5ZSPOyXwxzdAWe5WbZiPW+Zfv1P1j73JQ="; + cargoHash = "sha256-kNZPAU8QSR9hDwalvsRqRL4gaKTyvUA2gZ/bBB6/YDU="; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/tools/misc/byobu/default.nix b/pkgs/tools/misc/byobu/default.nix deleted file mode 100644 index efcf679c19947..0000000000000 --- a/pkgs/tools/misc/byobu/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ lib, stdenv, fetchurl, makeWrapper -, python3, perl, textual-window-manager -, gettext, vim, bc, screen }: - -let - pythonEnv = python3.withPackages (ps: with ps; [ snack ]); -in -stdenv.mkDerivation rec { - version = "5.133"; - pname = "byobu"; - - src = fetchurl { - url = "https://launchpad.net/byobu/trunk/${version}/+download/byobu_${version}.orig.tar.gz"; - sha256 = "0qvmmdnvwqbgbhn5c8asmrmjhclcl029py2d2zvmd7h5ij7s93jd"; - }; - - doCheck = true; - - strictdeps = true; - nativeBuildInputs = [ makeWrapper gettext ]; - buildInputs = [ perl ]; # perl is needed for `lib/byobu/include/*` scripts - propagatedBuildInputs = [ textual-window-manager screen ]; - - postPatch = '' - substituteInPlace usr/bin/byobu-export.in \ - --replace "gettext" "${gettext}/bin/gettext" - substituteInPlace usr/lib/byobu/menu \ - --replace "gettext" "${gettext}/bin/gettext" - ''; - - postInstall = '' - # Byobu does not compile its po files for some reason - for po in po/*.po; do - lang=''${po#po/} - lang=''${lang%.po} - # Path where byobu looks for translations as observed in the source code and strace - mkdir -p $out/share/byobu/po/$lang/LC_MESSAGES/ - msgfmt $po -o $out/share/byobu/po/$lang/LC_MESSAGES/byobu.mo - done - - # Override the symlinks otherwise they mess with the wrapping - cp --remove-destination $out/bin/byobu $out/bin/byobu-screen - cp --remove-destination $out/bin/byobu $out/bin/byobu-tmux - - for i in $out/bin/byobu*; do - # We don't use the usual ".$package-wrapped" because arg0 within the shebang scripts - # points to the filename and byobu matches against this to know which backend - # to start with - file=".$(basename $i)" - mv $i $out/bin/$file - makeWrapper "$out/bin/$file" "$out/bin/$(basename $i)" --argv0 $(basename $i) \ - --set BYOBU_PATH ${lib.escapeShellArg (lib.makeBinPath [ vim bc ])} \ - --set BYOBU_PYTHON "${pythonEnv}/bin/python" - done - ''; - - meta = with lib; { - homepage = "https://launchpad.net/byobu/"; - description = "Text-based window manager and terminal multiplexer"; - - longDescription = - ''Byobu is a GPLv3 open source text-based window manager and terminal multiplexer. - It was originally designed to provide elegant enhancements to the otherwise functional, - plain, practical GNU Screen, for the Ubuntu server distribution. - Byobu now includes an enhanced profiles, convenient keybindings, - configuration utilities, and toggle-able system status notifications for both - the GNU Screen window manager and the more modern Tmux terminal multiplexer, - and works on most Linux, BSD, and Mac distributions. - ''; - - license = licenses.gpl3; - - platforms = platforms.unix; - maintainers = with maintainers; [ qknight berbiche ]; - }; -} diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix index 989f7d57e0b89..2a4c2c0016689 100644 --- a/pkgs/tools/misc/colord/default.nix +++ b/pkgs/tools/misc/colord/default.nix @@ -32,13 +32,13 @@ stdenv.mkDerivation rec { pname = "colord"; - version = "1.4.7"; + version = "1.4.6"; outputs = [ "out" "dev" "devdoc" "man" "installedTests" ]; src = fetchurl { url = "https://www.freedesktop.org/software/colord/releases/${pname}-${version}.tar.xz"; - hash = "sha256-3gLZkQY0rhWVR1hc7EFORQ9xHCcjVFO0+bOKnyNhplM="; + sha256 = "dAdjGie/5dG2cueuQndwAcEF2GC3tzkig8jGMA3ojm8="; }; patches = [ diff --git a/pkgs/tools/misc/cyberchef/default.nix b/pkgs/tools/misc/cyberchef/default.nix index caa1f693f3683..588df6403bb28 100644 --- a/pkgs/tools/misc/cyberchef/default.nix +++ b/pkgs/tools/misc/cyberchef/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "cyberchef"; - version = "10.7.0"; + version = "10.8.2"; src = fetchzip { url = "https://github.com/gchq/CyberChef/releases/download/v${version}/CyberChef_v${version}.zip"; - sha256 = "sha256-/miIdPP00vIh3Em8BFDoxkYFpgU4Vty4V5RiCgqOKPo="; + sha256 = "sha256-CD09gve4QEkCBKZoNtTdSPOfGSogGoGwWMYWGzMHowg="; stripRoot = false; }; diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix index 75004801ddab0..268cb68b4dc21 100644 --- a/pkgs/tools/misc/esphome/default.nix +++ b/pkgs/tools/misc/esphome/default.nix @@ -19,14 +19,14 @@ let in python.pkgs.buildPythonApplication rec { pname = "esphome"; - version = "2024.2.0"; + version = "2024.2.1"; pyproject = true; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-k8caA5Q4QcP7H1Nn5yvFsfExVwipAlFSb/DphkzYNtU="; + hash = "sha256-MAyK8Wx/d7lJKEueeL7GhxxKu8EygwjylPGXB2Y3bWM="; }; nativeBuildInputs = with python.pkgs; [ @@ -59,8 +59,9 @@ python.pkgs.buildPythonApplication rec { colorama cryptography esphome-dashboard - kconfiglib icmplib + kconfiglib + packaging paho-mqtt pillow platformio diff --git a/pkgs/tools/misc/faketty/default.nix b/pkgs/tools/misc/faketty/default.nix index 815eb5a631c9e..d05360ccffe30 100644 --- a/pkgs/tools/misc/faketty/default.nix +++ b/pkgs/tools/misc/faketty/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "faketty"; - version = "1.0.14"; + version = "1.0.15"; src = fetchCrate { inherit pname version; - hash = "sha256-oma8Vmp1AMmEGyZG8i/ztiyYH0RrLZ/l/vXgPJs+5o0="; + hash = "sha256-f32Y9Aj4Z9y6Da9rbRgwi9BGPl4FsI790BH52cIIoPA="; }; - cargoHash = "sha256-+gojthIR5WMSjN1gCUyN0cKHWYBKBezsckVZJD7JncM="; + cargoHash = "sha256-+M1oq2CHUK6CIDFiUNLjO1UmHI19D5zdHVl8dvmQ1G8="; postPatch = '' patchShebangs tests/test.sh diff --git a/pkgs/tools/misc/fastfetch/default.nix b/pkgs/tools/misc/fastfetch/default.nix index 91d9844fd1f64..bcfbdfa9becb6 100644 --- a/pkgs/tools/misc/fastfetch/default.nix +++ b/pkgs/tools/misc/fastfetch/default.nix @@ -43,13 +43,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "fastfetch"; - version = "2.8.3"; + version = "2.8.5"; src = fetchFromGitHub { owner = "fastfetch-cli"; repo = "fastfetch"; rev = finalAttrs.version; - hash = "sha256-W6SmKyTBR0cXAkgcbbM1lEiHFanqCaa2lhAb+zQP/mg="; + hash = "sha256-aIGT2NwtkKJ1uTgy4rvFegzJadRuGkki63gpnVCPKbw="; }; outputs = [ "out" "man" ]; @@ -131,11 +131,6 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "ENABLE_XRANDR" x11Support) ]; - env.NIX_CFLAGS_COMPILE = toString [ - # Needed with GCC 12 - "-Wno-error=uninitialized" - ]; - postInstall = '' wrapProgram $out/bin/fastfetch \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}" diff --git a/pkgs/tools/misc/fend/default.nix b/pkgs/tools/misc/fend/default.nix index a3e46fa4f18d9..7e65fe68dfd5f 100644 --- a/pkgs/tools/misc/fend/default.nix +++ b/pkgs/tools/misc/fend/default.nix @@ -16,16 +16,16 @@ rustPlatform.buildRustPackage rec { pname = "fend"; - version = "1.4.0"; + version = "1.4.3"; src = fetchFromGitHub { owner = "printfn"; - repo = pname; + repo = "fend"; rev = "v${version}"; - sha256 = "sha256-s6b15FhVfEwsHtVt4bhd6LDxl/WW1PXlUrH2XFOTT5E="; + hash = "sha256-X96r5wN5eq1PZD/JGqnG/0kg6PYEdnj5h9zc+GXQjQM="; }; - cargoHash = "sha256-Ilsv0mo7/4eEdRH3jWZXdF4LSYYdWr6gCvnMMAZn5j0="; + cargoHash = "sha256-UIZs45OQ1j57VEb6g4P0AwjmEsjMt0am5FUXXDODaWI="; nativeBuildInputs = [ pandoc installShellFiles copyDesktopItems ]; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; @@ -46,7 +46,7 @@ rustPlatform.buildRustPackage rec { ''; postInstall = '' - install -D -m 444 $src/icon/fend-icon-256.png $out/share/icons/hicolor/256x256/apps/fend.png + install -D -m 444 $src/icon/icon.svg $out/share/icons/hicolor/scalable/apps/fend.svg ''; desktopItems = [ diff --git a/pkgs/tools/misc/lockfile-progs/default.nix b/pkgs/tools/misc/lockfile-progs/default.nix index eec9564f0f5cf..4d85d95c6de98 100644 --- a/pkgs/tools/misc/lockfile-progs/default.nix +++ b/pkgs/tools/misc/lockfile-progs/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall mkdir -p $out/bin $out/man/man1 - install -s bin/* $out/bin + install bin/* $out/bin install man/*.1 $out/man/man1 runHook postInstall ''; diff --git a/pkgs/tools/misc/mise/default.nix b/pkgs/tools/misc/mise/default.nix index b0d48fd6fcfb3..4afa360df25b7 100644 --- a/pkgs/tools/misc/mise/default.nix +++ b/pkgs/tools/misc/mise/default.nix @@ -17,16 +17,16 @@ rustPlatform.buildRustPackage rec { pname = "mise"; - version = "2024.2.16"; + version = "2024.2.18"; src = fetchFromGitHub { owner = "jdx"; repo = "mise"; rev = "v${version}"; - hash = "sha256-SrLgLYe0jeVzLoJZahqVrlYDd2FJ3G1uxrHx2BKjbHM="; + hash = "sha256-YidcjhPgaDODtz0EpktIsRmnRMryvGJKQ2vx/MEQG9s="; }; - cargoHash = "sha256-G/NR53u+rX9Q7tJVYi1tlXQL+gxK7wfqN3IpkoXzTRk="; + cargoHash = "sha256-QXtjM2yGOCf1nGOvrJCcLlI+MAGiu6bfsc/hSENNd1k="; nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; diff --git a/pkgs/tools/misc/ollama/default.nix b/pkgs/tools/misc/ollama/default.nix index 6ce576644d49a..32b7f5fcbfc34 100644 --- a/pkgs/tools/misc/ollama/default.nix +++ b/pkgs/tools/misc/ollama/default.nix @@ -8,6 +8,7 @@ , makeWrapper , stdenv +, pkgs , cmake , gcc12 , clblast @@ -17,98 +18,21 @@ , linuxPackages , darwin -, enableRocm ? false -, enableCuda ? false + # one of `[ null "rocm" "cuda" ]` +, acceleration ? null }: let pname = "ollama"; - version = "0.1.24"; + version = "0.1.26"; - warnIfNotLinux = warning: (lib.warnIfNot stdenv.isLinux warning stdenv.isLinux); - gpuWarning = api: "building ollama with ${api} is only supported on linux; falling back to cpu"; - rocmIsEnabled = enableRocm && (warnIfNotLinux (gpuWarning "rocm")); - cudaIsEnabled = enableCuda && (warnIfNotLinux (gpuWarning "cuda")); - enableLinuxGpu = rocmIsEnabled || cudaIsEnabled; - - appleFrameworks = darwin.apple_sdk_11_0.frameworks; - metalFrameworks = [ - appleFrameworks.Accelerate - appleFrameworks.Metal - appleFrameworks.MetalKit - appleFrameworks.MetalPerformanceShaders - ]; - - src = fetchFromGitHub { - owner = "jmorganca"; - repo = "ollama"; - rev = "v${version}"; - hash = "sha256-GwZA1QUH8I8m2bGToIcMMaB5MBnioQP4+n1SauUJYP8="; - fetchSubmodules = true; - }; - preparePatch = patch: hash: fetchpatch { - url = "file://${src}/llm/patches/${patch}"; - inherit hash; - stripLen = 1; - extraPrefix = "llm/llama.cpp/"; - }; - inherit (lib) licenses platforms maintainers; - ollama = { - inherit pname version src; - vendorHash = "sha256-wXRbfnkbeXPTOalm7SFLvHQ9j46S/yLNbFy+OWNSamQ="; - - nativeBuildInputs = [ - cmake - ] ++ lib.optionals enableLinuxGpu [ - makeWrapper - ] ++ lib.optionals stdenv.isDarwin - metalFrameworks; - - patches = [ - # remove uses of `git` in the `go generate` script - # instead use `patch` where necessary - ./remove-git.patch - # replace a hardcoded use of `g++` with `$CXX` - ./replace-gcc.patch - - # ollama's patches of llama.cpp's example server - # `ollama/llm/generate/gen_common.sh` -> "apply temporary patches until fix is upstream" - (preparePatch "01-cache.diff" "sha256-PC4yN98hFvK+PEITiDihL8ki3bJuLVXrAm0CGf8GPJE=") - (preparePatch "02-shutdown.diff" "sha256-cElAp9Z9exxN964vB/YFuBhZoEcoAwGSMCnbh+l/V4Q=") - ]; - postPatch = '' - # use a patch from the nix store in the `go generate` script - substituteInPlace llm/generate/gen_common.sh \ - --subst-var-by cmakeIncludePatch '${./cmake-include.patch}' - # `ollama/llm/generate/gen_common.sh` -> "avoid duplicate main symbols when we link into the cgo binary" - substituteInPlace llm/llama.cpp/examples/server/server.cpp \ - --replace-fail 'int main(' 'int __main(' - # replace inaccurate version number with actual release version - substituteInPlace version/version.go --replace-fail 0.0.0 '${version}' - ''; - preBuild = '' - export OLLAMA_SKIP_PATCHING=true - # build llama.cpp libraries for ollama - go generate ./... - ''; - - ldflags = [ - "-s" - "-w" - "-X=github.com/jmorganca/ollama/version.Version=${version}" - "-X=github.com/jmorganca/ollama/server.mode=release" - ]; - - meta = { - description = "Get up and running with large language models locally"; - homepage = "https://github.com/jmorganca/ollama"; - license = licenses.mit; - platforms = platforms.unix; - mainProgram = "ollama"; - maintainers = with maintainers; [ abysssol dit7ya elohmeier ]; - }; - }; + validAccel = lib.assertOneOf "ollama.acceleration" acceleration [ null "rocm" "cuda" ]; + warnIfNotLinux = api: (lib.warnIfNot stdenv.isLinux + "building ollama with `${api}` is only supported on linux; falling back to cpu" + stdenv.isLinux); + enableRocm = validAccel && (acceleration == "rocm") && (warnIfNotLinux "rocm"); + enableCuda = validAccel && (acceleration == "cuda") && (warnIfNotLinux "cuda"); rocmClang = linkFarm "rocm-clang" { llvm = rocmPackages.llvm.clang; @@ -120,10 +44,6 @@ let rocmClang ]; }; - rocmVars = { - ROCM_PATH = rocmPath; - CLBlast_DIR = "${clblast}/lib/cmake/CLBlast"; - }; cudaToolkit = buildEnv { name = "cuda-toolkit"; @@ -133,50 +53,129 @@ let cudaPackages.cuda_cudart ]; }; - cudaVars = { - CUDA_LIB_DIR = "${cudaToolkit}/lib"; - CUDACXX = "${cudaToolkit}/bin/nvcc"; - CUDAToolkit_ROOT = cudaToolkit; - }; - - linuxGpuLibs = { - buildInputs = lib.optionals rocmIsEnabled [ - rocmPackages.clr - rocmPackages.hipblas - rocmPackages.rocblas - rocmPackages.rocsolver - rocmPackages.rocsparse - libdrm - ] ++ lib.optionals cudaIsEnabled [ - cudaPackages.cuda_cudart - ]; - }; - - appleGpuLibs = { buildInputs = metalFrameworks; }; - runtimeLibs = lib.optionals rocmIsEnabled [ + runtimeLibs = lib.optionals enableRocm [ rocmPackages.rocm-smi - ] ++ lib.optionals cudaIsEnabled [ + ] ++ lib.optionals enableCuda [ linuxPackages.nvidia_x11 ]; - runtimeLibWrapper = { - postFixup = '' - mv "$out/bin/${pname}" "$out/bin/.${pname}-unwrapped" - makeWrapper "$out/bin/.${pname}-unwrapped" "$out/bin/${pname}" \ - --suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath runtimeLibs}' - ''; - }; + + appleFrameworks = darwin.apple_sdk_11_0.frameworks; + metalFrameworks = [ + appleFrameworks.Accelerate + appleFrameworks.Metal + appleFrameworks.MetalKit + appleFrameworks.MetalPerformanceShaders + ]; + goBuild = - if cudaIsEnabled then + if enableCuda then buildGoModule.override { stdenv = overrideCC stdenv gcc12; } else buildGoModule; + + src = fetchFromGitHub { + owner = "jmorganca"; + repo = "ollama"; + rev = "v${version}"; + hash = "sha256-Kw3tt9ayEMgI2V6OeaOkWfNwqfCL7MDD/nN5iXk5LnY="; + fetchSubmodules = true; + }; + preparePatch = patch: hash: fetchpatch { + url = "file://${src}/llm/patches/${patch}"; + inherit hash; + stripLen = 1; + extraPrefix = "llm/llama.cpp/"; + }; + inherit (lib) licenses platforms maintainers; in -goBuild (ollama - // (lib.optionalAttrs rocmIsEnabled rocmVars) - // (lib.optionalAttrs cudaIsEnabled cudaVars) - // (lib.optionalAttrs enableLinuxGpu linuxGpuLibs) - // (lib.optionalAttrs enableLinuxGpu runtimeLibWrapper) +goBuild ((lib.optionalAttrs enableRocm { + ROCM_PATH = rocmPath; + CLBlast_DIR = "${clblast}/lib/cmake/CLBlast"; +}) // (lib.optionalAttrs enableCuda { + CUDA_LIB_DIR = "${cudaToolkit}/lib"; + CUDACXX = "${cudaToolkit}/bin/nvcc"; + CUDAToolkit_ROOT = cudaToolkit; +}) // { + inherit pname version src; + vendorHash = "sha256-zTrBighPBqZ9hhkEV3UawJZUYyPRay7+P6wkhDtpY7M="; + + nativeBuildInputs = [ + cmake + ] ++ lib.optionals (enableRocm || enableCuda) [ + makeWrapper + ] ++ lib.optionals stdenv.isDarwin + metalFrameworks; + + buildInputs = lib.optionals enableRocm [ + rocmPackages.clr + rocmPackages.hipblas + rocmPackages.rocblas + rocmPackages.rocsolver + rocmPackages.rocsparse + libdrm + ] ++ lib.optionals enableCuda [ + cudaPackages.cuda_cudart + ] ++ lib.optionals stdenv.isDarwin + metalFrameworks; + + patches = [ + # remove uses of `git` in the `go generate` script + # instead use `patch` where necessary + ./remove-git.patch + # replace a hardcoded use of `g++` with `$CXX` + ./replace-gcc.patch + + # ollama's patches of llama.cpp's example server + # `ollama/llm/generate/gen_common.sh` -> "apply temporary patches until fix is upstream" + (preparePatch "01-cache.diff" "sha256-MTTln2G0G8dntihUzEjPM1ruTsApb4ZToBczJb8EG68=") + (preparePatch "02-cudaleaks.diff" "sha256-Cu7E9iEcvddPL9mPPI5Z96qmwWigi3f0WgSpPRjGc88=") + ]; + postPatch = '' + # use a patch from the nix store in the `go generate` script + substituteInPlace llm/generate/gen_common.sh \ + --subst-var-by cmakeIncludePatch '${./cmake-include.patch}' + # `ollama/llm/generate/gen_common.sh` -> "avoid duplicate main symbols when we link into the cgo binary" + substituteInPlace llm/llama.cpp/examples/server/server.cpp \ + --replace-fail 'int main(' 'int __main(' + # replace inaccurate version number with actual release version + substituteInPlace version/version.go --replace-fail 0.0.0 '${version}' + ''; + preBuild = '' + export OLLAMA_SKIP_PATCHING=true + # build llama.cpp libraries for ollama + go generate ./... + ''; + postFixup = '' + # the app doesn't appear functional at the moment, so hide it + mv "$out/bin/app" "$out/bin/.ollama-app" + '' + lib.optionalString (enableRocm || enableCuda) '' + # expose runtime libraries necessary to use the gpu + mv "$out/bin/ollama" "$out/bin/.ollama-unwrapped" + makeWrapper "$out/bin/.ollama-unwrapped" "$out/bin/ollama" \ + --suffix LD_LIBRARY_PATH : '/run/opengl-driver/lib:${lib.makeLibraryPath runtimeLibs}' + ''; + + ldflags = [ + "-s" + "-w" + "-X=github.com/jmorganca/ollama/version.Version=${version}" + "-X=github.com/jmorganca/ollama/server.mode=release" + ]; - // (lib.optionalAttrs stdenv.isDarwin appleGpuLibs)) + # for now, just test that rocm and cuda build + passthru.tests = lib.optionalAttrs stdenv.isLinux { + rocm = pkgs.ollama.override { acceleration = "rocm"; }; + cuda = pkgs.ollama.override { acceleration = "cuda"; }; + }; + + meta = { + description = "Get up and running with large language models locally"; + homepage = "https://github.com/jmorganca/ollama"; + license = licenses.mit; + platforms = platforms.unix; + mainProgram = "ollama"; + maintainers = with maintainers; [ abysssol dit7ya elohmeier ]; + }; +}) diff --git a/pkgs/tools/misc/osm2pgsql/default.nix b/pkgs/tools/misc/osm2pgsql/default.nix deleted file mode 100644 index 59ea5afb0e933..0000000000000 --- a/pkgs/tools/misc/osm2pgsql/default.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ lib, stdenv -, fetchFromGitHub -, cmake -, expat -, fmt -, proj -, bzip2 -, zlib -, boost -, postgresql -, python3 -, withLuaJIT ? false -, lua -, luajit -, libosmium -, nlohmann_json -, opencv -, potrace -, protozero -, testers -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "osm2pgsql"; - version = "1.10.0"; - - src = fetchFromGitHub { - owner = "osm2pgsql-dev"; - repo = "osm2pgsql"; - rev = finalAttrs.version; - hash = "sha256-IFAQ7iA37QXnWOSxUjh9EW7ss85k0h948JGuuUcpr5w="; - }; - - postPatch = '' - # Remove bundled libraries - rm -r contrib - ''; - - nativeBuildInputs = [ cmake ]; - - buildInputs = [ - boost - bzip2 - expat - fmt - libosmium - nlohmann_json - opencv - postgresql - potrace - proj - protozero - (python3.withPackages (p: with p; [ psycopg2 pyosmium ])) - zlib - ] ++ lib.optional withLuaJIT luajit - ++ lib.optional (!withLuaJIT) lua; - - cmakeFlags = [ - "-DEXTERNAL_LIBOSMIUM=ON" - "-DEXTERNAL_PROTOZERO=ON" - "-DEXTERNAL_FMT=ON" - ] ++ lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON"; - - installFlags = [ "install-gen" ]; - - passthru.tests.version = testers.testVersion { - package = finalAttrs.finalPackage; - }; - - meta = with lib; { - description = "OpenStreetMap data to PostgreSQL converter"; - homepage = "https://osm2pgsql.org"; - license = licenses.gpl2Plus; - platforms = platforms.unix; - maintainers = with maintainers; teams.geospatial.members ++ [ jglukasik das-g ]; - }; -}) diff --git a/pkgs/tools/misc/tagref/default.nix b/pkgs/tools/misc/tagref/default.nix index 84eeef609eec4..0b8ebf82730de 100644 --- a/pkgs/tools/misc/tagref/default.nix +++ b/pkgs/tools/misc/tagref/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "tagref"; - version = "1.9.0"; + version = "1.9.1"; src = fetchFromGitHub { owner = "stepchowfun"; repo = pname; rev = "v${version}"; - sha256 = "sha256-SPmpQR4RMimU6RnljmqV9z0WvDRZkc+Y+C32BnNmK/E="; + sha256 = "sha256-4F9u1wzeBgYP3L6h08xMvgq62ix/SOaFaLl7uEf1j1c="; }; - cargoHash = "sha256-VufTLK1LDQlIiNNsV9q24sHTmcT1Y7bCnhIXPRvuRAU="; + cargoHash = "sha256-AO6BGevCoLCH4vpyrXrgF3FrjUa3lHA7ynXfk4KKigM="; meta = with lib; { description = "Manage cross-references in your code"; diff --git a/pkgs/tools/misc/topicctl/default.nix b/pkgs/tools/misc/topicctl/default.nix index 3eb949381af87..b38c0242a3b0b 100644 --- a/pkgs/tools/misc/topicctl/default.nix +++ b/pkgs/tools/misc/topicctl/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "topicctl"; - version = "1.14.0"; + version = "1.14.1"; src = fetchFromGitHub { owner = "segmentio"; repo = "topicctl"; rev = "v${version}"; - sha256 = "sha256-Vmx+6UXNWCnVmLskk1J4Pug3+99cdk4WXjA2zO4agvU="; + sha256 = "sha256-Eft1grHJKSfr6ePJa7vdq6ckAP38ASXOTwJSvW0Ptp4="; }; vendorHash = "sha256-+mnnvdna1g6JE29weOJZmdO3jFp2a75dV9wK2XcWJ9s="; diff --git a/pkgs/tools/misc/xq/default.nix b/pkgs/tools/misc/xq/default.nix index deddb3306440a..987e5f1efc741 100644 --- a/pkgs/tools/misc/xq/default.nix +++ b/pkgs/tools/misc/xq/default.nix @@ -5,14 +5,14 @@ rustPlatform.buildRustPackage rec { pname = "xq"; - version = "0.3.0"; + version = "0.3.1"; src = fetchCrate { inherit pname version; - sha256 = "sha256-mgvs3/gseLnFtAciW5txtYqo+8DyyQC7y/tN1kDqcb4="; + sha256 = "sha256-KR5gjRJH392s7Ue0F26slj4sRosFAAAahf6up+yOQno="; }; - cargoHash = "sha256-lSyJqGWlk3ldgAkyebuyUDLp8mJdwnw8ee6ZHQXU2Y4="; + cargoHash = "sha256-eL7VFLRfRVF2seWgHLWGudsTt5u+JcnNrJiD7K47EPA="; meta = with lib; { description = "Pure rust implementation of jq"; |