Merge master into staging-next

authored by nixpkgs-ci[bot] and committed by GitHub 83b5d3ba 93bef58d

+699 -21
+7
maintainers/maintainer-list.nix
··· 12543 12543 githubId = 39434424; 12544 12544 name = "Felix Springer"; 12545 12545 }; 12546 + junestepp = { 12547 + email = "git@junestepp.me"; 12548 + github = "junestepp"; 12549 + githubId = 26205306; 12550 + name = "June Stepp"; 12551 + keys = [ { fingerprint = "2561 0243 2233 CFE6 E13E 3C33 348C 6EB3 39AE C582"; } ]; 12552 + }; 12546 12553 junjihashimoto = { 12547 12554 email = "junji.hashimoto@gmail.com"; 12548 12555 github = "junjihashimoto";
+10 -9
pkgs/applications/version-management/git-machete/default.nix pkgs/by-name/gi/git-machete/package.nix
··· 1 1 { 2 2 lib, 3 - buildPythonApplication, 4 - pytest-mock, 5 - pytestCheckHook, 3 + python3, 6 4 fetchFromGitHub, 7 5 installShellFiles, 8 6 git, 9 7 nix-update-script, 10 8 }: 11 9 12 - buildPythonApplication rec { 10 + python3.pkgs.buildPythonApplication rec { 13 11 pname = "git-machete"; 14 12 version = "3.34.1"; 15 13 ··· 22 20 23 21 nativeBuildInputs = [ installShellFiles ]; 24 22 25 - nativeCheckInputs = [ 26 - git 27 - pytest-mock 28 - pytestCheckHook 29 - ]; 23 + nativeCheckInputs = 24 + [ 25 + git 26 + ] 27 + ++ (with python3.pkgs; [ 28 + pytest-mock 29 + pytestCheckHook 30 + ]); 30 31 31 32 disabledTests = [ 32 33 # Requires fully functioning shells including zsh modules and bash
+22 -6
pkgs/by-name/ge/geminicommit/package.nix
··· 4 4 fetchFromGitHub, 5 5 installShellFiles, 6 6 stdenv, 7 + versionCheckHook, 7 8 }: 8 9 9 10 buildGoModule (finalAttrs: { 10 11 pname = "geminicommit"; 11 - version = "0.4.0"; 12 + version = "0.4.1"; 12 13 13 14 src = fetchFromGitHub { 14 15 owner = "tfkhdyt"; 15 16 repo = "geminicommit"; 16 17 tag = "v${finalAttrs.version}"; 17 - hash = "sha256-hJevJkniyICUUr1UyS0A5SKuuYRU0dGHMWzF99Yr2Eo="; 18 + hash = "sha256-QUI5JI1udOo3IOXegoes3pwwgSfxXIjxXIPsA5SuAJo="; 18 19 }; 19 20 20 - vendorHash = "sha256-IfqlPg+HPcOfjlwwuLi2/R21UD83xQzWyUmzM7JSDEs="; 21 + vendorHash = "sha256-AFm+1RQ6sMSe+kY/cw1Ly/8WEj2/yk0nJQiEJzV6jKg="; 21 22 22 23 nativeBuildInputs = [ 23 24 installShellFiles ··· 26 27 postInstall = 27 28 let 28 29 cmd = finalAttrs.meta.mainProgram; 30 + goDefaultCmd = finalAttrs.pname; 29 31 in 30 - lib.optionalString (with stdenv; buildPlatform.canExecute hostPlatform) '' 31 - # `geminicommit` requires write permissions to $HOME for its `config.toml` 32 + # The official github released binary is renamed since v0.4.1, 33 + # see: https://github.com/tfkhdyt/geminicommit/releases/tag/v0.4.1 34 + # Here we link the old name (which is also the `go build` default name) 35 + # for backward compatibility: 36 + '' 37 + mv $out/bin/${goDefaultCmd} $out/bin/${cmd} 38 + ln -s $out/bin/${cmd} $out/bin/${goDefaultCmd} 39 + '' 40 + + lib.optionalString (with stdenv; buildPlatform.canExecute hostPlatform) '' 41 + # `gmc` requires write permissions to $HOME for its `config.toml` 32 42 # ... which is automatically initiated on startup 33 43 export HOME=$(mktemp -d) 34 44 ··· 39 49 done 40 50 ''; 41 51 52 + nativeInstallCheckInputs = [ 53 + versionCheckHook 54 + ]; 55 + 56 + doInstallCheck = true; 57 + 42 58 meta = { 43 59 description = "CLI that generates git commit messages with Google Gemini AI"; 44 60 homepage = "https://github.com/tfkhdyt/geminicommit"; 45 61 license = lib.licenses.gpl3Only; 46 62 maintainers = with lib.maintainers; [ bryango ]; 47 - mainProgram = "geminicommit"; 63 + mainProgram = "gmc"; 48 64 }; 49 65 })
+40
pkgs/by-name/iw/iwmenu/package.nix
··· 1 + { 2 + dbus, 3 + fetchFromGitHub, 4 + lib, 5 + iwd, 6 + rustPlatform, 7 + }: 8 + 9 + rustPlatform.buildRustPackage rec { 10 + pname = "iwmenu"; 11 + version = "0.2.0"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "e-tho"; 15 + repo = "iwmenu"; 16 + tag = "v${version}"; 17 + hash = "sha256-F1w2Lp0/iXUHh0PXAZ/wD78C2uVtAcWlEKqBI5I/hnE="; 18 + }; 19 + 20 + cargoHash = "sha256-NjA8n11pOytXsotEQurYxDHPhwXG5vpdlyscmVUIzfA="; 21 + 22 + buildInputs = [ 23 + dbus 24 + iwd 25 + ]; 26 + 27 + meta = { 28 + homepage = "https://github.com/e-tho/iwmenu"; 29 + description = "Launcher-driven Wi-Fi manager for Linux"; 30 + longDescription = '' 31 + Use `iwmenu --launcher <launcher command>` 32 + Supported launchers are: `dmenu`, `fuzzel`, `rofi`, `walker` and `custom` with `stdin` 33 + for details refer to https://github.com/e-tho/iwmenu/blob/main/README.md#usage 34 + ''; 35 + mainProgram = "iwmenu"; 36 + platforms = lib.platforms.linux; 37 + license = lib.licenses.gpl3Plus; 38 + maintainers = with lib.maintainers; [ vuimuich ]; 39 + }; 40 + }
+38
pkgs/by-name/st/strobealign/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + cmake, 6 + pkg-config, 7 + isa-l, 8 + zlib, 9 + }: 10 + stdenv.mkDerivation (self: { 11 + pname = "strobealign"; 12 + version = "0.16.1"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "ksahlin"; 16 + repo = "strobealign"; 17 + tag = "v${self.version}"; 18 + hash = "sha256-RZxIT6iwanRuPk2sWv/QRkUaPMdterOKCo30FPZHC8o="; 19 + }; 20 + 21 + nativeBuildInputs = [ 22 + cmake 23 + pkg-config 24 + ]; 25 + buildInputs = [ 26 + zlib 27 + isa-l 28 + ]; 29 + 30 + meta = { 31 + description = "Read aligner for short reads"; 32 + mainProgram = "strobealign"; 33 + license = lib.licenses.mit; 34 + homepage = "https://github.com/ksahlin/strobealign"; 35 + maintainers = [ lib.maintainers.jbedo ]; 36 + platforms = lib.platforms.unix; 37 + }; 38 + })
+38
pkgs/by-name/wi/wiremix/package.nix
··· 1 + { 2 + lib, 3 + fetchCrate, 4 + rustPlatform, 5 + pkg-config, 6 + pipewire, 7 + }: 8 + 9 + rustPlatform.buildRustPackage rec { 10 + pname = "wiremix"; 11 + version = "0.4.0"; 12 + 13 + src = fetchCrate { 14 + inherit pname version; 15 + hash = "sha256-LtwKG3phUuNgwXlAJMhZkOenYHGyXGRhNcr6+WKxVz0="; 16 + }; 17 + 18 + useFetchCargoVendor = true; 19 + cargoHash = "sha256-Qc+VubikiYox1zqy2HO3InRI8aFT8AorrFZBQhNGFOQ="; 20 + 21 + nativeBuildInputs = [ 22 + pkg-config 23 + rustPlatform.bindgenHook 24 + ]; 25 + buildInputs = [ pipewire ]; 26 + 27 + meta = { 28 + description = "Simple TUI mixer for PipeWire"; 29 + mainProgram = "wiremix"; 30 + homepage = "https://github.com/tsowell/wiremix"; 31 + license = with lib.licenses; [ 32 + asl20 33 + mit 34 + ]; 35 + maintainers = with lib.maintainers; [ tsowell ]; 36 + platforms = lib.platforms.linux; 37 + }; 38 + }
+2 -2
pkgs/by-name/zs/zsh-forgit/package.nix
··· 15 15 16 16 stdenvNoCC.mkDerivation (finalAttrs: { 17 17 pname = "zsh-forgit"; 18 - version = "25.05.0"; 18 + version = "25.06.0"; 19 19 20 20 src = fetchFromGitHub { 21 21 owner = "wfxr"; 22 22 repo = "forgit"; 23 23 tag = finalAttrs.version; 24 - hash = "sha256-U+MtgunPEmo/kv/lQI2BBi2WUBgt3wFkaUdfRzJWoGQ="; 24 + hash = "sha256-D1we3pOPXNsK8KgEaRBAmD5eH1i2ud4zX1GwYbOyZvY="; 25 25 }; 26 26 27 27 strictDeps = true;
+23
pkgs/games/anki/addons/adjust-sound-volume/default.nix
··· 1 + { 2 + lib, 3 + anki-utils, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + }: 7 + anki-utils.buildAnkiAddon (finalAttrs: { 8 + pname = "adjust-sound-volume"; 9 + version = "0.0.6"; 10 + src = fetchFromGitHub { 11 + owner = "mnogu"; 12 + repo = "adjust-sound-volume"; 13 + rev = "v${finalAttrs.version}"; 14 + hash = "sha256-6reIUz+tHKd4KQpuofLa/tIL5lCloj3yODZ8Cz29jFU="; 15 + }; 16 + passthru.updateScript = nix-update-script { }; 17 + meta = { 18 + description = "Add a new menu item for adjusting the sound volume"; 19 + homepage = "https://github.com/mnogu/adjust-sound-volume"; 20 + license = lib.licenses.agpl3Plus; 21 + maintainers = with lib.maintainers; [ junestepp ]; 22 + }; 23 + })
+27
pkgs/games/anki/addons/anki-connect/default.nix
··· 1 + { 2 + lib, 3 + anki-utils, 4 + fetchFromSourcehut, 5 + nix-update-script, 6 + }: 7 + anki-utils.buildAnkiAddon (finalAttrs: { 8 + pname = "anki-connect"; 9 + version = "24.7.25.0"; 10 + src = fetchFromSourcehut { 11 + owner = "~foosoft"; 12 + repo = "anki-connect"; 13 + rev = finalAttrs.version; 14 + hash = "sha256-N98EoCE/Bx+9QUQVeU64FXHXSek7ASBVv1b9ltJ4G1U="; 15 + }; 16 + sourceRoot = "${finalAttrs.src.name}/plugin"; 17 + passthru.updateScript = nix-update-script { }; 18 + meta = { 19 + description = '' 20 + Enable external applications such as Yomichan to communicate 21 + with Anki over a simple HTTP API 22 + ''; 23 + homepage = "https://foosoft.net/projects/anki-connect/"; 24 + license = lib.licenses.gpl3Plus; 25 + maintainers = with lib.maintainers; [ junestepp ]; 26 + }; 27 + })
+126
pkgs/games/anki/addons/anki-utils.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + symlinkJoin, 5 + lndir, 6 + formats, 7 + runCommand, 8 + }: 9 + { 10 + buildAnkiAddon = lib.extendMkDerivation { 11 + constructDrv = stdenv.mkDerivation; 12 + extendDrvArgs = 13 + finalAttrs: 14 + { 15 + pname, 16 + version, 17 + src, 18 + sourceRoot ? "", 19 + configurePhase ? '' 20 + runHook preConfigure 21 + runHook postConfigure 22 + '', 23 + buildPhase ? '' 24 + runHook preBuild 25 + runHook postBuild 26 + '', 27 + dontPatchELF ? true, 28 + dontStrip ? true, 29 + nativeBuildInputs ? [ ], 30 + passthru ? { }, 31 + meta ? { }, 32 + # Script run after "user_files" folder is populated. 33 + # Used when an add-on needs to process and change "user_files" based 34 + # on what the user added to it. 35 + processUserFiles ? "", 36 + ... 37 + }: 38 + { 39 + inherit 40 + version 41 + src 42 + sourceRoot 43 + configurePhase 44 + buildPhase 45 + dontPatchELF 46 + dontStrip 47 + nativeBuildInputs 48 + ; 49 + 50 + pname = "anki-addon-${pname}"; 51 + 52 + installPrefix = "share/anki/addons/${pname}"; 53 + 54 + installPhase = '' 55 + runHook preInstall 56 + 57 + mkdir -p "$out/$installPrefix" 58 + find . -mindepth 1 -maxdepth 1 | xargs -d'\n' mv -t "$out/$installPrefix/" 59 + 60 + runHook postInstall 61 + ''; 62 + 63 + passthru = { 64 + withConfig = 65 + { 66 + # JSON add-on config. The available options for an add-on are in its 67 + # config.json file. 68 + # See https://addon-docs.ankiweb.net/addon-config.html#config-json 69 + config ? { }, 70 + # Path to a folder to be merged with the add-on "user_files" folder. 71 + # See https://addon-docs.ankiweb.net/addon-config.html#user-files. 72 + userFiles ? null, 73 + }: 74 + let 75 + metaConfigFormat = formats.json { }; 76 + addonMetaConfig = metaConfigFormat.generate "meta.json" { inherit config; }; 77 + in 78 + symlinkJoin { 79 + pname = "${finalAttrs.pname}-with-config"; 80 + inherit (finalAttrs) version meta; 81 + 82 + paths = [ 83 + finalAttrs.finalPackage 84 + ]; 85 + 86 + postBuild = '' 87 + cd $out/${finalAttrs.installPrefix} 88 + 89 + rm -f meta.json 90 + ln -s ${addonMetaConfig} meta.json 91 + 92 + mkdir -p user_files 93 + ${ 94 + if (userFiles != null) then 95 + '' 96 + ${lndir}/bin/lndir -silent "${userFiles}" user_files 97 + '' 98 + else 99 + "" 100 + } 101 + 102 + ${processUserFiles} 103 + ''; 104 + }; 105 + } // passthru; 106 + 107 + meta = { 108 + platforms = lib.platforms.all; 109 + } // meta; 110 + }; 111 + }; 112 + 113 + buildAnkiAddonsDir = 114 + addonPackages: 115 + let 116 + addonDirs = map (pkg: "${pkg}/share/anki/addons") addonPackages; 117 + addons = lib.concatMapStringsSep " " (p: "${p}/*") addonDirs; 118 + in 119 + runCommand "anki-addons" { } '' 120 + mkdir $out 121 + [[ '${addons}' ]] || exit 0 122 + for addon in ${addons}; do 123 + ln -s "$addon" $out/ 124 + done 125 + ''; 126 + }
+18
pkgs/games/anki/addons/default.nix
··· 1 + { 2 + callPackage, 3 + }: 4 + { 5 + adjust-sound-volume = callPackage ./adjust-sound-volume { }; 6 + 7 + anki-connect = callPackage ./anki-connect { }; 8 + 9 + local-audio-yomichan = callPackage ./local-audio-yomichan { }; 10 + 11 + passfail2 = callPackage ./passfail2 { }; 12 + 13 + recolor = callPackage ./recolor { }; 14 + 15 + reviewer-refocus-card = callPackage ./reviewer-refocus-card { }; 16 + 17 + yomichan-forvo-server = callPackage ./yomichan-forvo-server { }; 18 + }
+73
pkgs/games/anki/addons/local-audio-yomichan/default.nix
··· 1 + { 2 + lib, 3 + anki-utils, 4 + fetchFromGitHub, 5 + python3, 6 + nix-update-script, 7 + }: 8 + anki-utils.buildAnkiAddon (finalAttrs: { 9 + pname = "local-audio-yomichan"; 10 + version = "0-unstable-2025-04-26"; 11 + src = fetchFromGitHub { 12 + owner = "yomidevs"; 13 + repo = "local-audio-yomichan"; 14 + rev = "34750f1d8ca1cb473128fea7976a4d981e5e78a4"; 15 + sparseCheckout = [ "plugin" ]; 16 + hash = "sha256-2gyggcvxParay+1B7Sg2COKyocoxaRO1WTz+ymdRp4w="; 17 + }; 18 + sourceRoot = "${finalAttrs.src.name}/plugin"; 19 + processUserFiles = '' 20 + # Addon will try to load extra stuff unless Python package name is "plugin". 21 + temp=$(mktemp -d) 22 + ln -s $PWD $temp/plugin 23 + # Addoon expects `user_files` dir at `$XDG_DATA_HOME/local-audio-yomichan` 24 + ln -s $PWD/user_files $temp/local-audio-yomichan 25 + 26 + PYTHONPATH=$temp \ 27 + WO_ANKI=1 \ 28 + XDG_DATA_HOME=$temp \ 29 + ${lib.getExe python3} -c \ 30 + "from plugin import db_utils; \ 31 + db_utils.init_db()" 32 + ''; 33 + passthru.updateScript = nix-update-script { 34 + extraArgs = [ "--version=branch" ]; 35 + }; 36 + meta = { 37 + description = "Run a local audio server for Yomitan"; 38 + longDescription = '' 39 + This add-on must be configured with an audio collection. 40 + 41 + Example: 42 + 43 + ```nix 44 + pkgs.ankiAddons.local-audio-yomichan.withConfig { 45 + userFiles = 46 + let 47 + audio-collection = 48 + pkgs.runCommand "local-yomichan-audio-collection" 49 + { 50 + outputHashMode = "recursive"; 51 + outputHash = "sha256-NxbcXh2SDPfCd+ZHAWT5JdxRecNbT4Xpo0pxX5/DOfo="; 52 + 53 + src = pkgs.requireFile { 54 + name = "local-yomichan-audio-collection-2023-06-11-opus.tar.xz"; 55 + url = "https://github.com/yomidevs/local-audio-yomichan?tab=readme-ov-file#steps"; 56 + sha256 = "1xsxp8iggklv77rj972mqaa1i8f9hvr3ir0r2mwfqcdz4q120hr1"; 57 + }; 58 + } 59 + ''' 60 + mkdir -p $out 61 + cd $out 62 + tar -xf "$src" 63 + '''; 64 + in 65 + "''${audio-collection}/user_files"; 66 + } 67 + ``` 68 + ''; 69 + homepage = "https://github.com/yomidevs/local-audio-yomichan"; 70 + license = lib.licenses.mit; 71 + maintainers = with lib.maintainers; [ junestepp ]; 72 + }; 73 + })
+34
pkgs/games/anki/addons/passfail2/default.nix
··· 1 + { 2 + lib, 3 + anki-utils, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + }: 7 + anki-utils.buildAnkiAddon (finalAttrs: { 8 + pname = "passfail2"; 9 + version = "0.3.0-unstable-2024-10-17"; 10 + src = fetchFromGitHub { 11 + owner = "lambdadog"; 12 + repo = "passfail2"; 13 + rev = "d5313e4f1217e968b36edbc0a4fe92386209ffe6"; 14 + hash = "sha256-HMe6/fHpYj/MN0dUFj3W71vK7qqcp9l1xm8SAiKkJLs="; 15 + }; 16 + buildPhase = '' 17 + runHook preBuild 18 + 19 + substitute build_info.py.in build_info.py \ 20 + --replace-fail '$version' '"${finalAttrs.version}"' 21 + 22 + runHook postBuild 23 + ''; 24 + passthru.updateScript = nix-update-script { }; 25 + meta = { 26 + description = '' 27 + Replaces the default Anki review buttons with only two options: 28 + “Fail” and “Pass” 29 + ''; 30 + homepage = "https://github.com/lambdadog/passfail2"; 31 + license = lib.licenses.gpl3Plus; 32 + maintainers = with lib.maintainers; [ junestepp ]; 33 + }; 34 + })
+27
pkgs/games/anki/addons/recolor/default.nix
··· 1 + { 2 + lib, 3 + anki-utils, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + }: 7 + anki-utils.buildAnkiAddon (finalAttrs: { 8 + pname = "recolor"; 9 + version = "3.1"; 10 + src = fetchFromGitHub { 11 + owner = "AnKing-VIP"; 12 + repo = "AnkiRecolor"; 13 + rev = finalAttrs.version; 14 + sparseCheckout = [ "src/addon" ]; 15 + hash = "sha256-28DJq2l9DP8O6OsbNQCZ0pm4S6CQ3Yz0Vfvlj+iQw8Y="; 16 + }; 17 + sourceRoot = "${finalAttrs.src.name}/src/addon"; 18 + passthru.updateScript = nix-update-script { }; 19 + meta = { 20 + description = "ReColor your Anki desktop to whatever aesthetic you like"; 21 + homepage = "https://github.com/AnKing-VIP/AnkiRecolor"; 22 + # No license file, but it can be assumed to be AGPL3 based on 23 + # https://ankiweb.net/account/terms. 24 + license = lib.licenses.agpl3Only; 25 + maintainers = with lib.maintainers; [ junestepp ]; 26 + }; 27 + })
+30
pkgs/games/anki/addons/reviewer-refocus-card/default.nix
··· 1 + { 2 + lib, 3 + anki-utils, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + }: 7 + anki-utils.buildAnkiAddon (finalAttrs: { 8 + pname = "reviewer-refocus-card"; 9 + version = "0-unstable-2022-12-24"; 10 + src = fetchFromGitHub { 11 + owner = "glutanimate"; 12 + repo = "anki-addons-misc"; 13 + rev = "7b981836e0a6637a1853f3e8d73d022ab95fed31"; 14 + sparseCheckout = [ "src/reviewer_refocus_card" ]; 15 + hash = "sha256-181hyc4ED+0lBzn1FnrBvNIYIUQF8xEDB3uHK6SkpHw="; 16 + }; 17 + sourceRoot = "${finalAttrs.src.name}/src/reviewer_refocus_card"; 18 + passthru.updateScript = nix-update-script { 19 + extraArgs = [ "--version=branch" ]; 20 + }; 21 + meta = { 22 + description = '' 23 + Set focus to the card area, allowing you to scroll through your cards using 24 + Page Up / Page Down, etc 25 + ''; 26 + homepage = "https://github.com/glutanimate/anki-addons-misc"; 27 + license = lib.licenses.agpl3Only; 28 + maintainers = with lib.maintainers; [ junestepp ]; 29 + }; 30 + })
+25
pkgs/games/anki/addons/yomichan-forvo-server/default.nix
··· 1 + { 2 + lib, 3 + anki-utils, 4 + fetchFromGitHub, 5 + nix-update-script, 6 + }: 7 + anki-utils.buildAnkiAddon { 8 + pname = "yomichan-forvo-server"; 9 + version = "0-unstable-2024-10-21"; 10 + src = fetchFromGitHub { 11 + owner = "jamesnicolas"; 12 + repo = "yomichan-forvo-server"; 13 + rev = "364fc6d5d10969f516e0fa283460dfaf08c98e15"; 14 + hash = "sha256-Jpee9hkXCiBmSW7hzJ1rAg45XVIiLC8WENc09+ySFVI="; 15 + }; 16 + passthru.updateScript = nix-update-script { 17 + extraArgs = [ "--version=branch" ]; 18 + }; 19 + meta = { 20 + description = "Audio server for yomichan that scrapes forvo for audio files"; 21 + homepage = "https://github.com/jamesnicolas/yomichan-forvo-server"; 22 + license = lib.licenses.unlicense; 23 + maintainers = with lib.maintainers; [ junestepp ]; 24 + }; 25 + }
+5
pkgs/games/anki/default.nix
··· 10 10 lame, 11 11 mpv-unwrapped, 12 12 ninja, 13 + callPackage, 13 14 nixosTests, 14 15 nodejs, 15 16 jq, ··· 91 92 ./patches/disable-auto-update.patch 92 93 ./patches/remove-the-gl-library-workaround.patch 93 94 ./patches/skip-formatting-python-code.patch 95 + # Used in with-addons.nix 96 + ./patches/allow-setting-addons-folder.patch 94 97 ]; 95 98 96 99 inherit cargoDeps; ··· 269 272 ''; 270 273 271 274 passthru = { 275 + withAddons = ankiAddons: callPackage ./with-addons.nix { inherit ankiAddons; }; 272 276 tests.anki-sync-server = nixosTests.anki-sync-server; 273 277 }; 274 278 ··· 292 296 inherit (mesa.meta) platforms; 293 297 maintainers = with maintainers; [ 294 298 euank 299 + junestepp 295 300 oxij 296 301 ]; 297 302 # Reported to crash at launch on darwin (as of 2.1.65)
+15
pkgs/games/anki/patches/allow-setting-addons-folder.patch
··· 1 + diff --git a/qt/aqt/profiles.py b/qt/aqt/profiles.py 2 + index 469908c1b2..34612d6e08 100644 3 + --- a/qt/aqt/profiles.py 4 + +++ b/qt/aqt/profiles.py 5 + @@ -310,7 +310,9 @@ def profileFolder(self, create: bool = True) -> str: 6 + return path 7 + 8 + def addonFolder(self) -> str: 9 + - return self._ensureExists(os.path.join(self.base, "addons21")) 10 + + path = Path(os.environ.get("ANKI_ADDONS") or Path(self.base) / "addons21") 11 + + path.mkdir(parents=True, exist_ok=True) 12 + + return str(path.resolve()) 13 + 14 + def backupFolder(self) -> str: 15 + return self._ensureExists(os.path.join(self.profileFolder(), "backups"))
+107
pkgs/games/anki/with-addons.nix
··· 1 + { 2 + lib, 3 + symlinkJoin, 4 + makeWrapper, 5 + anki, 6 + anki-utils, 7 + writeTextDir, 8 + ankiAddons ? [ ], 9 + }: 10 + /* 11 + `ankiAddons` 12 + : A set of Anki add-ons to be installed. Here's a an example: 13 + 14 + ~~~ 15 + pkgs.anki.withAddons [ 16 + # When the add-on is already available in nixpkgs 17 + pkgs.ankiAddons.anki-connect 18 + 19 + # When the add-on is not available in nixpkgs 20 + (pkgs.anki-utils.buildAnkiAddon (finalAttrs: { 21 + pname = "recolor"; 22 + version = "3.1"; 23 + src = pkgs.fetchFromGitHub { 24 + owner = "AnKing-VIP"; 25 + repo = "AnkiRecolor"; 26 + rev = finalAttrs.version; 27 + sparseCheckout = [ "src/addon" ]; 28 + hash = "sha256-28DJq2l9DP8O6OsbNQCZ0pm4S6CQ3Yz0Vfvlj+iQw8Y="; 29 + }; 30 + sourceRoot = "source/src/addon"; 31 + })) 32 + 33 + # When the add-on needs to be configured 34 + pkgs.ankiAddons.passfail2.withConfig { 35 + config = { 36 + again_button_name = "not quite"; 37 + good_button_name = "excellent"; 38 + }; 39 + 40 + user_files = ./dir-to-be-merged-into-addon-user-files-dir; 41 + }; 42 + ] 43 + ~~~ 44 + 45 + The original `anki` executable will be wrapped so that it uses the addons from 46 + `ankiAddons`. 47 + 48 + This only works with Anki versions patched to support the `ANKI_ADDONS` environment 49 + variable. `pkgs.anki` has this, but `pkgs.anki-bin` does not. 50 + */ 51 + let 52 + defaultAddons = [ 53 + (anki-utils.buildAnkiAddon { 54 + pname = "nixos"; 55 + version = "1.0"; 56 + src = writeTextDir "__init__.py" '' 57 + import aqt 58 + from aqt.qt import QMessageBox 59 + import json 60 + 61 + def addons_dialog_will_show(dialog: aqt.addons.AddonsDialog) -> None: 62 + dialog.setEnabled(False) 63 + QMessageBox.information( 64 + dialog, 65 + "NixOS Info", 66 + ("These add-ons are managed by NixOS.<br>" 67 + "See <a href='https://github.com/NixOS/nixpkgs/tree/master/pkgs/games/anki/with-addons.nix'>" 68 + "github.com/NixOS/nixpkgs/tree/master/pkgs/games/anki/with-addons.nix</a>") 69 + ) 70 + 71 + def addon_tried_to_write_config(module: str, conf: dict) -> None: 72 + message_box = QMessageBox( 73 + QMessageBox.Icon.Warning, 74 + "NixOS Info", 75 + (f"The add-on module: \"{module}\" tried to update its config.<br>" 76 + "See <a href='https://github.com/NixOS/nixpkgs/tree/master/pkgs/games/anki/with-addons.nix'>" 77 + "github.com/NixOS/nixpkgs/tree/master/pkgs/games/anki/with-addons.nix</a>" 78 + " for how to configure add-ons managed by NixOS.") 79 + ) 80 + message_box.setDetailedText(json.dumps(conf)) 81 + message_box.exec() 82 + 83 + aqt.gui_hooks.addons_dialog_will_show.append(addons_dialog_will_show) 84 + aqt.mw.addonManager.writeConfig = addon_tried_to_write_config 85 + ''; 86 + meta.maintainers = with lib.maintainers; [ junestepp ]; 87 + }) 88 + ]; 89 + in 90 + symlinkJoin { 91 + inherit (anki) version; 92 + pname = "${anki.pname}-with-addons"; 93 + 94 + paths = [ anki ]; 95 + 96 + nativeBuildInputs = [ makeWrapper ]; 97 + postBuild = '' 98 + wrapProgram $out/bin/anki \ 99 + --set ANKI_ADDONS "${anki-utils.buildAnkiAddonsDir (ankiAddons ++ defaultAddons)}" 100 + ''; 101 + 102 + meta = builtins.removeAttrs anki.meta [ 103 + "name" 104 + "outputsToInstall" 105 + "position" 106 + ]; 107 + }
+4 -1
pkgs/tools/graphics/mangohud/default.nix
··· 10 10 gnused, 11 11 xdg-utils, 12 12 dbus, 13 + libGL, 14 + libX11, 13 15 hwdata, 14 16 mangohud32, 15 17 addDriverRunpath, ··· 20 22 ninja, 21 23 pkg-config, 22 24 unzip, 23 - libX11, 24 25 wayland, 25 26 libXNVCtrl, 26 27 nlohmann_json, ··· 138 139 ]; 139 140 140 141 libdbus = dbus.lib; 142 + libGL = libGL; 143 + libX11 = libX11; 141 144 inherit hwdata; 142 145 }) 143 146 ];
+26 -1
pkgs/tools/graphics/mangohud/hardcode-dependencies.patch
··· 11 11 SPDLOG_ERROR("Could not load libdbus-1.so.3"); 12 12 return false; 13 13 } 14 + diff --git a/src/loaders/loader_glx.cpp b/src/loaders/loader_glx.cpp 15 + index aa453b8..0f6479d 100644 16 + --- a/src/loaders/loader_glx.cpp 17 + +++ b/src/loaders/loader_glx.cpp 18 + @@ -23,7 +23,7 @@ bool glx_loader::Load() { 19 + handle = real_dlopen("glxtrace.so", RTLD_LAZY); 20 + #endif 21 + if (!handle) 22 + - handle = real_dlopen("libGL.so.1", RTLD_LAZY); 23 + + handle = real_dlopen("@libGL@/lib/libGL.so.1", RTLD_LAZY); 24 + if (!handle) { 25 + SPDLOG_ERROR("Failed to open " MANGOHUD_ARCH " libGL.so.1: {}", dlerror()); 26 + return false; 27 + diff --git a/src/loaders/loader_x11.cpp b/src/loaders/loader_x11.cpp 28 + index 214fd50..2f08857 100644 29 + --- a/src/loaders/loader_x11.cpp 30 + +++ b/src/loaders/loader_x11.cpp 31 + @@ -110,6 +110,6 @@ static std::shared_ptr<libx11_loader> loader; 32 + std::shared_ptr<libx11_loader> get_libx11() 33 + { 34 + if (!loader) 35 + - loader = std::make_shared<libx11_loader>("libX11.so.6"); 36 + + loader = std::make_shared<libx11_loader>("@libX11@/lib/libX11.so.6"); 37 + return loader; 38 + } 14 39 diff --git a/src/logging.cpp b/src/logging.cpp 15 - index ca986d4..c4d99ea 100644 40 + index 4ef7023..e24f6da 100644 16 41 --- a/src/logging.cpp 17 42 +++ b/src/logging.cpp 18 43 @@ -28,8 +28,12 @@ string exec(string command) {
+2 -2
pkgs/top-level/all-packages.nix
··· 1310 1310 1311 1311 git-imerge = python3Packages.callPackage ../applications/version-management/git-imerge { }; 1312 1312 1313 - git-machete = python3Packages.callPackage ../applications/version-management/git-machete { }; 1314 - 1315 1313 git-publish = python3Packages.callPackage ../applications/version-management/git-publish { }; 1316 1314 1317 1315 git-recent = callPackage ../applications/version-management/git-recent { ··· 14837 14835 amoeba-data = callPackage ../games/amoeba/data.nix { }; 14838 14836 14839 14837 anki = callPackage ../games/anki { }; 14838 + anki-utils = callPackage ../games/anki/addons/anki-utils.nix { }; 14839 + ankiAddons = recurseIntoAttrs (callPackage ../games/anki/addons { }); 14840 14840 anki-bin = callPackage ../games/anki/bin.nix { }; 14841 14841 anki-sync-server = callPackage ../games/anki/sync-server.nix { }; 14842 14842