diff options
Diffstat (limited to 'pkgs/by-name/ko')
-rw-r--r-- | pkgs/by-name/ko/koboldcpp/package.nix | 154 | ||||
-rw-r--r-- | pkgs/by-name/ko/koji/package.nix | 2 | ||||
-rw-r--r-- | pkgs/by-name/ko/kokkos/package.nix | 4 | ||||
-rw-r--r-- | pkgs/by-name/ko/komac/package.nix | 16 | ||||
-rw-r--r-- | pkgs/by-name/ko/konbucase/package.nix | 6 | ||||
-rw-r--r-- | pkgs/by-name/ko/kontemplate/package.nix | 37 | ||||
-rw-r--r-- | pkgs/by-name/ko/koodo-reader/fix-isdev.patch | 13 | ||||
-rw-r--r-- | pkgs/by-name/ko/koodo-reader/package.nix | 50 | ||||
-rw-r--r-- | pkgs/by-name/ko/kor/package.nix | 8 | ||||
-rw-r--r-- | pkgs/by-name/ko/kotlin-interactive-shell/package.nix | 47 |
10 files changed, 293 insertions, 44 deletions
diff --git a/pkgs/by-name/ko/koboldcpp/package.nix b/pkgs/by-name/ko/koboldcpp/package.nix new file mode 100644 index 0000000000000..b8ae2e0b6ea1a --- /dev/null +++ b/pkgs/by-name/ko/koboldcpp/package.nix @@ -0,0 +1,154 @@ +{ + lib, + fetchFromGitHub, + stdenv, + makeWrapper, + gitUpdater, + python311Packages, + tk, + + darwin, + + koboldLiteSupport ? true, + + config, + cudaPackages ? { }, + + openblasSupport ? !stdenv.isDarwin, + openblas, + + cublasSupport ? config.cudaSupport, + + clblastSupport ? stdenv.isLinux, + clblast, + ocl-icd, + + vulkanSupport ? true, + vulkan-loader, + + metalSupport ? stdenv.isDarwin && stdenv.isAarch64, + + # You can find list of x86_64 options here: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html + # For ARM here: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html + # If you set "march" to "native", specify "mtune" as well; otherwise, it will be set to "generic". (credit to: https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/) + # For example, if you have an AMD Ryzen CPU, you will set "march" to "x86-64" and "mtune" to "znver2" + march ? "", + mtune ? "", +}: + +let + makeBool = option: bool: (if bool then "${option}=1" else ""); + + effectiveStdenv = if cublasSupport then cudaPackages.backendStdenv else stdenv; +in +effectiveStdenv.mkDerivation (finalAttrs: { + pname = "koboldcpp"; + version = "1.68"; + + src = fetchFromGitHub { + owner = "LostRuins"; + repo = "koboldcpp"; + rev = "refs/tags/v${finalAttrs.version}"; + sha256 = "sha256-zqRlQ8HgT4fmGHD6uxxa2duZrx9Vhxd+gm1XQ7w9ay0="; + }; + + enableParallelBuilding = true; + + nativeBuildInputs = [ + makeWrapper + python311Packages.wrapPython + ]; + + pythonInputs = builtins.attrValues { inherit (python311Packages) tkinter customtkinter packaging; }; + + buildInputs = + [ tk ] + ++ finalAttrs.pythonInputs + ++ lib.optionals effectiveStdenv.isDarwin [ + darwin.apple_sdk_11_0.frameworks.Accelerate + darwin.apple_sdk_11_0.frameworks.CoreVideo + darwin.apple_sdk_11_0.frameworks.CoreGraphics + darwin.apple_sdk_11_0.frameworks.CoreServices + ] + ++ lib.optionals metalSupport [ + darwin.apple_sdk_11_0.frameworks.MetalKit + darwin.apple_sdk_11_0.frameworks.Foundation + darwin.apple_sdk_11_0.frameworks.MetalPerformanceShaders + ] + ++ lib.optionals openblasSupport [ openblas ] + ++ lib.optionals cublasSupport [ + cudaPackages.libcublas + cudaPackages.cuda_nvcc + cudaPackages.cuda_cudart + cudaPackages.cuda_cccl + ] + ++ lib.optionals clblastSupport [ + clblast + ocl-icd + ] + ++ lib.optionals vulkanSupport [ vulkan-loader ]; + + pythonPath = finalAttrs.pythonInputs; + + darwinLdFlags = lib.optionals stdenv.isDarwin [ + "-F${darwin.apple_sdk_11_0.frameworks.CoreServices}/Library/Frameworks" + "-F${darwin.apple_sdk_11_0.frameworks.Accelerate}/Library/Frameworks" + "-framework CoreServices" + "-framework Accelerate" + ]; + metalLdFlags = lib.optionals metalSupport [ + "-F${darwin.apple_sdk_11_0.frameworks.Foundation}/Library/Frameworks" + "-F${darwin.apple_sdk_11_0.frameworks.Metal}/Library/Frameworks" + "-framework Foundation" + "-framework Metal" + ]; + + env.NIX_LDFLAGS = lib.concatStringsSep " " (finalAttrs.darwinLdFlags ++ finalAttrs.metalLdFlags); + + env.NIX_CFLAGS_COMPILE = + lib.optionalString (march != "") "-march=${march}" + lib.optionalString (mtune != "") "-mtune=${mtune}"; + + makeFlags = [ + (makeBool "LLAMA_OPENBLAS" openblasSupport) + (makeBool "LLAMA_CUBLAS" cublasSupport) + (makeBool "LLAMA_CLBLAST" clblastSupport) + (makeBool "LLAMA_VULKAN" vulkanSupport) + (makeBool "LLAMA_METAL" metalSupport) + ]; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/bin" + + install -Dm755 koboldcpp.py "$out/bin/koboldcpp.unwrapped" + cp *.so "$out/bin" + cp *.embd "$out/bin" + + ${lib.optionalString (!koboldLiteSupport) '' + rm "$out/bin/kcpp_docs.embd" + rm "$out/bin/klite.embd" + ''} + + runHook postInstall + ''; + + postFixup = '' + wrapPythonProgramsIn "$out/bin" "$pythonPath" + makeWrapper "$out/bin/koboldcpp.unwrapped" "$out/bin/koboldcpp" \ + --prefix PATH ${lib.makeBinPath [ tk ]} + ''; + + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + + meta = { + description = "Way to run various GGML and GGUF models"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ + maxstrid + donteatoreo + ]; + mainProgram = "koboldcpp"; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/ko/koji/package.nix b/pkgs/by-name/ko/koji/package.nix index b42362245e2dc..b39314887cf06 100644 --- a/pkgs/by-name/ko/koji/package.nix +++ b/pkgs/by-name/ko/koji/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { ]; meta = with lib; { - description = "An interactive CLI for creating conventional commits"; + description = "Interactive CLI for creating conventional commits"; homepage = "https://github.com/its-danny/koji"; license = with licenses; [ mit ]; maintainers = with maintainers; [ ByteSudoer ]; diff --git a/pkgs/by-name/ko/kokkos/package.nix b/pkgs/by-name/ko/kokkos/package.nix index 33634ddfaca9e..86e671834e0bd 100644 --- a/pkgs/by-name/ko/kokkos/package.nix +++ b/pkgs/by-name/ko/kokkos/package.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "kokkos"; - version = "4.3.00"; + version = "4.3.01"; src = fetchFromGitHub { owner = "kokkos"; repo = "kokkos"; rev = finalAttrs.version; - hash = "sha256-0MMztgw+okZM/xr2vQucwkkT04iueQSlSQJ6MN/756I="; + hash = "sha256-x496DKEBMNUUZ2rBNT2MPBV8Obi5aUKQuHwjLiNPMhk="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ko/komac/package.nix b/pkgs/by-name/ko/komac/package.nix index 3a87faa3c4ab2..53dcc93d7b140 100644 --- a/pkgs/by-name/ko/komac/package.nix +++ b/pkgs/by-name/ko/komac/package.nix @@ -1,6 +1,8 @@ { lib , stdenv , fetchFromGitHub +, pkg-config +, openssl , rustPlatform , darwin , testers @@ -8,12 +10,12 @@ }: let - version = "2.1.0"; + version = "2.2.1"; src = fetchFromGitHub { owner = "russellbanks"; repo = "Komac"; rev = "v${version}"; - hash = "sha256-L8UYpNqjRyqf4hPQwD9LaXWu6jYaP34yTwTxcqg+e2U="; + hash = "sha256-dPX8/JUQ+vugd+M/jIjBf4/sNbac0FVQ0obhyAAGI84="; }; in rustPlatform.buildRustPackage { @@ -21,9 +23,13 @@ rustPlatform.buildRustPackage { pname = "komac"; - cargoHash = "sha256-J4QZzbyDr4SDt6LlAy9ZdpqgIufZCZHmOC9eu70wMsM="; + cargoHash = "sha256-CDPN90X3m/9FRLolAVCIcAuajZbB5OAgLcFXq2ICS8g="; - buildInputs = lib.optionals stdenv.isDarwin [ + nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + + buildInputs = lib.optionals stdenv.isLinux [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; @@ -35,7 +41,7 @@ rustPlatform.buildRustPackage { }; meta = with lib; { - description = "The Community Manifest Creator for WinGet"; + description = "Community Manifest Creator for WinGet"; homepage = "https://github.com/russellbanks/Komac"; changelog = "https://github.com/russellbanks/Komac/releases/tag/${src.rev}"; license = licenses.gpl3Plus; diff --git a/pkgs/by-name/ko/konbucase/package.nix b/pkgs/by-name/ko/konbucase/package.nix index 56a977eeeb138..ac40c78a11ff6 100644 --- a/pkgs/by-name/ko/konbucase/package.nix +++ b/pkgs/by-name/ko/konbucase/package.nix @@ -5,7 +5,7 @@ , ninja , vala , pkg-config -, wrapGAppsHook +, wrapGAppsHook3 , pantheon , gtksourceview5 }: @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { ninja vala pkg-config - wrapGAppsHook + wrapGAppsHook3 ]; buildInputs = [ @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { homepage = "https://github.com/ryonakano/konbucase"; - description = "A case converting app suitable for coding or typing"; + description = "Case converting app suitable for coding or typing"; license = licenses.gpl3Only; maintainers = with maintainers; [ galaxy ]; platforms = platforms.linux; diff --git a/pkgs/by-name/ko/kontemplate/package.nix b/pkgs/by-name/ko/kontemplate/package.nix new file mode 100644 index 0000000000000..6ab1a96f3ad2a --- /dev/null +++ b/pkgs/by-name/ko/kontemplate/package.nix @@ -0,0 +1,37 @@ +{ lib +, buildGoModule +, fetchgit +}: +buildGoModule { + pname = "kontemplate"; + version = "1.8.0-unstable-2024-06-09"; + + src = fetchgit { + url = "https://code.tvl.fyi/depot.git"; + sha256 = "sha256-Cv/y1Tj+hUKP0gi9ceS1Gml1WRYbUGSeWfJfXyX6dLA="; + rev = "b16ddb54b0327606cec2df220eaabb1328e18e3e"; + }; + + modRoot = "ops/kontemplate"; + + vendorHash = "sha256-xPGVM2dq5fAVOiuodOXhDm3v3k+ncNLhlk6aCtF5S9E="; + + meta = { + description = "Extremely simple Kubernetes resource templates"; + mainProgram = "kontemplate"; + homepage = "https://code.tvl.fyi/about/ops/kontemplate"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ mbode tazjin ]; + platforms = lib.platforms.unix; + + longDescription = '' + Kontemplate is a simple CLI tool that can take sets of + Kubernetes resource files with placeholders and insert values + per environment. + + It can be used as a simple way of deploying the same set of + resources to different Kubernetes contexts with context-specific + configuration. + ''; + }; +} diff --git a/pkgs/by-name/ko/koodo-reader/fix-isdev.patch b/pkgs/by-name/ko/koodo-reader/fix-isdev.patch deleted file mode 100644 index 956cb2042f0b8..0000000000000 --- a/pkgs/by-name/ko/koodo-reader/fix-isdev.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/main.js b/main.js -index a4b5c8ef..743d63ca 100644 ---- a/main.js -+++ b/main.js -@@ -8,7 +8,7 @@ const { - nativeTheme, - } = require("electron"); - const path = require("path"); --const isDev = require("electron-is-dev"); -+const isDev = false; - const Store = require("electron-store"); - const store = new Store(); - const fs = require("fs"); diff --git a/pkgs/by-name/ko/koodo-reader/package.nix b/pkgs/by-name/ko/koodo-reader/package.nix index 6386cece98efa..5a53af807eea4 100644 --- a/pkgs/by-name/ko/koodo-reader/package.nix +++ b/pkgs/by-name/ko/koodo-reader/package.nix @@ -8,10 +8,13 @@ makeDesktopItem, copyDesktopItems, makeWrapper, - wrapGAppsHook, + wrapGAppsHook3, electron, }: +let + electronDist = electron + (if stdenv.isDarwin then "/Applications" else "/libexec/electron"); +in mkYarnPackage rec { pname = "koodo-reader"; version = "1.6.6"; @@ -29,23 +32,27 @@ mkYarnPackage rec { # should be copied from `koodo-reader.src` packageJSON = ./package.json; - patches = [ ./fix-isdev.patch ]; - offlineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; hash = "sha256-VvYkotVb74zR9+/IWiQwOX/6RJf+xukpi7okRovfVzc="; }; - nativeBuildInputs = [ - copyDesktopItems - makeWrapper - wrapGAppsHook - ]; + nativeBuildInputs = + [ + makeWrapper + ] + ++ lib.optionals (!stdenv.isDarwin) [ + copyDesktopItems + wrapGAppsHook3 + ]; dontWrapGApps = true; env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; + # disable code signing on Darwin + env.CSC_IDENTITY_AUTO_DISCOVERY = "false"; + configurePhase = '' runHook preConfigure @@ -60,8 +67,11 @@ mkYarnPackage rec { export HOME=$(mktemp -d) yarn --offline build + + cp -r ${electronDist} electron-dist + chmod -R u+w electron-dist yarn --offline run electron-builder --dir \ - -c.electronDist=${electron}/libexec/electron \ + -c.electronDist=electron-dist \ -c.electronVersion=${electron.version} runHook postBuild @@ -70,21 +80,30 @@ mkYarnPackage rec { installPhase = '' runHook preInstall - install -Dm644 assets/icons/256x256.png $out/share/icons/hicolor/256x256/apps/koodo-reader.png - install -Dm644 ${./mime-types.xml} $out/share/mime/packages/koodo-reader.xml + ${lib.optionalString (!stdenv.isDarwin) '' + install -Dm644 assets/icons/256x256.png $out/share/icons/hicolor/256x256/apps/koodo-reader.png + install -Dm644 ${./mime-types.xml} $out/share/mime/packages/koodo-reader.xml + + mkdir -p $out/share/lib/koodo-reader + cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/lib/koodo-reader + ''} - mkdir -p $out/share/lib/koodo-reader - cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/lib/koodo-reader + ${lib.optionalString stdenv.isDarwin '' + mkdir -p $out/Applications + cp -r dist/mac*/"Koodo Reader.app" $out/Applications + makeWrapper "$out/Applications/Koodo Reader.app/Contents/MacOS/Koodo Reader" $out/bin/koodo-reader + ''} runHook postInstall ''; # we use makeShellWrapper instead of the makeBinaryWrapper provided by wrapGAppsHook for proper shell variable expansion - postFixup = '' - makeShellWrapper ${electron}/bin/electron $out/bin/koodo-reader \ + postFixup = lib.optionalString (!stdenv.isDarwin) '' + makeShellWrapper ${lib.getExe electron} $out/bin/koodo-reader \ --add-flags $out/share/lib/koodo-reader/resources/app.asar \ "''${gappsWrapperArgs[@]}" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ + --set-default ELECTRON_IS_DEV 0 \ --inherit-argv0 ''; @@ -117,7 +136,6 @@ mkYarnPackage rec { ]; meta = { - broken = stdenv.isDarwin; changelog = "https://github.com/troyeguo/koodo-reader/releases/tag/v${version}"; description = "A cross-platform ebook reader"; longDescription = '' diff --git a/pkgs/by-name/ko/kor/package.nix b/pkgs/by-name/ko/kor/package.nix index 09abafc69d7cc..9a8863a303445 100644 --- a/pkgs/by-name/ko/kor/package.nix +++ b/pkgs/by-name/ko/kor/package.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "kor"; - version = "0.3.8"; + version = "0.5.1"; src = fetchFromGitHub { owner = "yonahd"; repo = pname; rev = "v${version}"; - hash = "sha256-4lXLmh8BP7h6k8Tt/oklvv7fmDvmdKQP0P7gaCM2TK0="; + hash = "sha256-mGHSfOW40NTFK1csckSNriCYF2bEQD/M1Zs34i3PptI="; }; - vendorHash = "sha256-ScV12Xb+tVluXC2Jat44atkKXZIzIcUdZ+lyD1Y3dIM="; + vendorHash = "sha256-9aZy1i0VrDRySt5A5aQHBXa0mPgD+rsyeqQrd6snWKc="; preCheck = '' HOME=$(mktemp -d) @@ -24,7 +24,7 @@ buildGoModule rec { ]; meta = with lib; { - description = "A Golang Tool to discover unused Kubernetes Resources"; + description = "Golang Tool to discover unused Kubernetes Resources"; homepage = "https://github.com/yonahd/kor"; changelog = "https://github.com/yonahd/kor/releases/tag/v${version}"; license = licenses.mit; diff --git a/pkgs/by-name/ko/kotlin-interactive-shell/package.nix b/pkgs/by-name/ko/kotlin-interactive-shell/package.nix new file mode 100644 index 0000000000000..752be68d42452 --- /dev/null +++ b/pkgs/by-name/ko/kotlin-interactive-shell/package.nix @@ -0,0 +1,47 @@ +{ lib, maven, fetchFromGitHub, makeWrapper, jre }: + +maven.buildMavenPackage rec { + pname = "kotlin-interactive-shell"; + version = "0.5.2"; + + src = fetchFromGitHub { + owner = "Kotlin"; + repo = "kotlin-interactive-shell"; + rev = "v${version}"; + hash = "sha256-3DTyo7rPswpEVzFkcprT6FD+ITGJ+qCXFKXEGoCK+oE="; + }; + + mvnHash = "sha256-m1o0m0foqJhEzWjC9behBeld5HT08WClcZN2xc3fZrI="; + mvnParameters = "compile"; + + nativeBuildInputs = [ makeWrapper ]; + + doCheck = false; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{bin,lib} + cp lib/ki-shell.jar $out/lib/ki-shell.jar + makeWrapper ${lib.getExe jre} $out/bin/ki \ + --add-flags "-jar $out/lib/ki-shell.jar" + + runHook postInstall + ''; + + meta = with lib; { + description = "Kotlin Language Interactive Shell"; + longDescription = '' + The shell is an extensible implementation of Kotlin REPL with a rich set of features including: + - Syntax highlight + - Type inference command + - Downloading dependencies in runtime using Maven coordinates + - List declared symbols + ''; + homepage = "https://github.com/Kotlin/kotlin-interactive-shell"; + license = licenses.asl20; + maintainers = [ maintainers.starsep ]; + platforms = jre.meta.platforms; + mainProgram = "ki"; + }; +} |