This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

pkgs: remove unused dectalk, kokoro, libretro-dolphin, moebius, photocraft-web, sdrpp-brown, zmk-studio

-1019
-104
pkgs/dectalk/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitHub, 5 - autoconf, 6 - automake, 7 - pkg-config, 8 - libpulseaudio, 9 - alsa-lib, 10 - nix-update-script, 11 - }: 12 - 13 - stdenv.mkDerivation (finalAttrs: { 14 - pname = "dectalk"; 15 - version = "0-unstable-2026-10-08"; 16 - 17 - src = fetchFromGitHub { 18 - owner = "dectalk"; 19 - repo = "dectalk"; 20 - rev = "986ea12ec8dac85881394d7bd7daf1f1d5098b9a"; 21 - hash = "sha256-/6IaMJoTeIAXopqVdo65Tgi+Ldtw768lFK9RiBMFhY4="; 22 - }; 23 - 24 - nativeBuildInputs = [ 25 - autoconf 26 - automake 27 - pkg-config 28 - ]; 29 - 30 - buildInputs = [ 31 - libpulseaudio 32 - alsa-lib 33 - ]; 34 - 35 - postPatch = '' 36 - # Replace git version detection with static version since .git is not available 37 - sed -i 's/m4_esyscmd_s(echo $(git describe --always)$(git status --porcelain | awk .*))/${ 38 - builtins.substring 0 7 finalAttrs.src.rev 39 - }/' src/configure.ac 40 - ''; 41 - 42 - configurePhase = '' 43 - runHook preConfigure 44 - cd src 45 - ./autogen.sh 46 - ./configure --prefix=$out 47 - cd .. 48 - runHook postConfigure 49 - ''; 50 - 51 - buildPhase = '' 52 - runHook preBuild 53 - make -C src -j$NIX_BUILD_CORES 54 - runHook postBuild 55 - ''; 56 - 57 - installPhase = '' 58 - runHook preInstall 59 - mkdir -p $out/bin $out/lib $out/dic 60 - 61 - # Libraries 62 - cp dist/lib/*.so $out/lib/ 63 - 64 - # Main binaries 65 - for bin in say dtmemory aclock; do 66 - if [ -f "dist/$bin" ]; then 67 - cp "dist/$bin" $out/bin/ 68 - fi 69 - done 70 - 71 - # Tools 72 - if [ -d dist/tools ]; then 73 - cp dist/tools/* $out/bin/ 74 - fi 75 - 76 - # Dictionaries 77 - cp dist/dic/* $out/dic/ 78 - 79 - # DECtalk config — must be at $out/DECtalk.conf (compiled-in DECTALK_INSTALL_PREFIX) 80 - cp dist/DECtalk.conf $out/DECtalk.conf 81 - 82 - runHook postInstall 83 - ''; 84 - 85 - passthru.updateScript = nix-update-script { 86 - extraArgs = [ 87 - "--flake" 88 - "--version-regex" 89 - "(0-unstable-.*)" 90 - "--version=branch" 91 - "--system" 92 - "x86_64-linux" 93 - ]; 94 - }; 95 - 96 - meta = { 97 - description = "Modern builds of the DECtalk text-to-speech engine"; 98 - homepage = "https://github.com/dectalk/dectalk"; 99 - # license = lib.licenses.unfree; 100 - license = lib.licenses.free; 101 - platforms = lib.platforms.linux; 102 - mainProgram = "say"; 103 - }; 104 - })
-58
pkgs/kokoro/package.nix
··· 1 - { 2 - python3, 3 - fetchurl, 4 - fetchFromGitHub, 5 - }: 6 - let 7 - # Create a python environment with our overrides 8 - python = python3.override { 9 - self = python; 10 - packageOverrides = final: prev: { 11 - # Override kokoro with a more recent version and stdout support 12 - kokoro = prev.kokoro.overridePythonAttrs (old: { 13 - version = "0-unstable-2025-08-06"; 14 - src = fetchFromGitHub { 15 - owner = "hexgrad"; 16 - repo = "kokoro"; 17 - rev = "dfb907a02bba8152ca444717ca5d78747ccb4bec"; 18 - hash = "sha256-GJlc3+RCeYaAvojFFjK22nitDTWFWp6dAPJakw+//j8="; 19 - }; 20 - patches = (old.patches or [ ]) ++ [ 21 - ./stdout-support.patch 22 - ]; 23 - passthru = (old.passthru or { }) // { 24 - # Bumps kokoro (main branch) and the spacy model wheel together. 25 - updateScript = ./update.sh; 26 - }; 27 - }); 28 - # Spacy model - downloaded and packaged as a python package 29 - spacy-en-core-web-sm = final.buildPythonPackage rec { 30 - pname = "en_core_web_sm"; 31 - version = "3.8.0"; 32 - format = "wheel"; 33 - 34 - src = fetchurl { 35 - url = "https://github.com/explosion/spacy-models/releases/download/${pname}-${version}/${pname}-${version}-py3-none-any.whl"; 36 - hash = "sha256-GTJCnbcn1L/z3u1rNM/AXfF3lPSlLusmz4ko98Gg+4U="; 37 - }; 38 - 39 - propagatedBuildInputs = [ final.spacy ]; 40 - 41 - pythonImportsCheck = [ "en_core_web_sm" ]; 42 - }; 43 - 44 - # Create a patched misaki that doesn't try to download spacy models 45 - misaki = prev.misaki.overridePythonAttrs (old: { 46 - postPatch = (old.postPatch or "") + '' 47 - # Patch out the spacy model download - we provide it as a dependency instead 48 - substituteInPlace misaki/en.py \ 49 - --replace-fail "if not spacy.util.is_package(name):" "if False:" \ 50 - --replace-fail "spacy.cli.download(name)" "pass" 51 - ''; 52 - 53 - propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ final.spacy-en-core-web-sm ]; 54 - }); 55 - }; 56 - }; 57 - in 58 - python.pkgs.kokoro
-153
pkgs/kokoro/stdout-support.patch
··· 1 - --- a/kokoro/__main__.py 2025-12-21 20:28:56.595838972 +0100 2 - +++ b/kokoro/__main__.py 2025-12-21 20:50:06.842504063 +0100 3 - @@ -3,7 +3,10 @@ 4 - python3 -m kokoro --text "The sky above the port was the color of television, tuned to a dead channel." -o file.wav --debug 5 - 6 - echo "Bom dia mundo, como vão vocês" > text.txt 7 - -python3 -m kokoro -i text.txt -l p --voice pm_alex > audio.wav 8 - +python3 -m kokoro -i text.txt -l p --voice pm_alex -o output.wav 9 - + 10 - +# Streaming from stdin to stdout (pipe to mpv): 11 - +ollama run llama3 "tell me a joke" | python3 -m kokoro -o - --stream | mpv --demuxer=rawaudio --demuxer-rawaudio-rate=24000 --demuxer-rawaudio-format=s16le --demuxer-rawaudio-channels=1 - 12 - 13 - Common issues: 14 - pip not installed: `uv pip install pip` 15 - @@ -13,6 +16,7 @@ 16 - """ 17 - 18 - import argparse 19 - +import sys 20 - import wave 21 - from pathlib import Path 22 - from typing import Generator, TYPE_CHECKING 23 - @@ -47,22 +51,58 @@ 24 - yield from pipeline(text, voice=voice, speed=speed, split_pattern=r"\n+") 25 - 26 - 27 - +def write_wav_audio(wav_file, text: str, kokoro_language: str, voice: str, speed=1) -> None: 28 - + """Write audio frames to an open wav file handle.""" 29 - + wav_file.setnchannels(1) # Mono audio 30 - + wav_file.setsampwidth(2) # 2 bytes per sample (16-bit audio) 31 - + wav_file.setframerate(24000) # Sample rate 32 - + 33 - + for result in generate_audio( 34 - + text, kokoro_language=kokoro_language, voice=voice, speed=speed 35 - + ): 36 - + logger.debug(result.phonemes) 37 - + if result.audio is None: 38 - + continue 39 - + audio_bytes = (result.audio.numpy() * 32767).astype(np.int16).tobytes() 40 - + wav_file.writeframes(audio_bytes) 41 - + 42 - + 43 - def generate_and_save_audio( 44 - - output_file: Path, text: str, kokoro_language: str, voice: str, speed=1 45 - + output_file: str, text: str, kokoro_language: str, voice: str, speed=1 46 - +) -> None: 47 - + if output_file == "-": 48 - + # Write to stdout 49 - + with wave.open(sys.stdout.buffer, "wb") as wav_file: 50 - + write_wav_audio(wav_file, text, kokoro_language, voice, speed) 51 - + else: 52 - + with wave.open(str(Path(output_file).resolve()), "wb") as wav_file: 53 - + write_wav_audio(wav_file, text, kokoro_language, voice, speed) 54 - + 55 - + 56 - +def stream_audio_raw( 57 - + input_stream, kokoro_language: str, voice: str, speed: float 58 - ) -> None: 59 - - with wave.open(str(output_file.resolve()), "wb") as wav_file: 60 - - wav_file.setnchannels(1) # Mono audio 61 - - wav_file.setsampwidth(2) # 2 bytes per sample (16-bit audio) 62 - - wav_file.setframerate(24000) # Sample rate 63 - - 64 - - for result in generate_audio( 65 - - text, kokoro_language=kokoro_language, voice=voice, speed=speed 66 - - ): 67 - + """Stream audio as raw PCM s16le to stdout, processing stdin line by line.""" 68 - + from kokoro import KPipeline 69 - + 70 - + if not voice.startswith(kokoro_language): 71 - + logger.warning(f"Voice {voice} is not made for language {kokoro_language}") 72 - + 73 - + pipeline = KPipeline(lang_code=kokoro_language) 74 - + output = sys.stdout.buffer 75 - + 76 - + for line in input_stream: 77 - + line = line.rstrip('\n\r') 78 - + if not line: 79 - + continue 80 - + logger.debug(f"Processing line: {line!r}") 81 - + for result in pipeline(line, voice=voice, speed=speed, split_pattern=r"\n+"): 82 - logger.debug(result.phonemes) 83 - if result.audio is None: 84 - continue 85 - audio_bytes = (result.audio.numpy() * 32767).astype(np.int16).tobytes() 86 - - wav_file.writeframes(audio_bytes) 87 - + output.write(audio_bytes) 88 - + output.flush() 89 - 90 - 91 - def main() -> None: 92 - @@ -83,8 +123,8 @@ 93 - "-o", 94 - "--output-file", 95 - "--output_file", 96 - - type=Path, 97 - - help="Path to output WAV file", 98 - + type=str, 99 - + help="Path to output WAV file (use - for stdout)", 100 - required=True, 101 - ) 102 - parser.add_argument( 103 - @@ -107,6 +147,11 @@ 104 - help="Speech speed", 105 - ) 106 - parser.add_argument( 107 - + "--stream", 108 - + action="store_true", 109 - + help="Stream mode: read stdin line-by-line, output raw PCM s16le 24kHz mono (for piping to mpv)", 110 - + ) 111 - + parser.add_argument( 112 - "--debug", 113 - action="store_true", 114 - help="Print DEBUG messages to console", 115 - @@ -118,6 +163,20 @@ 116 - 117 - lang = args.language or args.voice[0] 118 - 119 - + # Streaming mode: read stdin line by line, output raw PCM 120 - + if args.stream: 121 - + if args.output_file != "-": 122 - + logger.warning("Streaming mode always outputs to stdout, ignoring output file") 123 - + if args.text: 124 - + raise Exception("Cannot use --text with --stream, use stdin") 125 - + if args.input_file: 126 - + with open(args.input_file) as f: 127 - + stream_audio_raw(f, lang, args.voice, args.speed) 128 - + else: 129 - + stream_audio_raw(sys.stdin, lang, args.voice, args.speed) 130 - + return 131 - + 132 - + # Non-streaming mode: read all input, output WAV 133 - if args.text is not None and args.input_file is not None: 134 - raise Exception("You cannot specify both 'text' and 'input_file'") 135 - elif args.text: 136 - @@ -126,14 +185,13 @@ 137 - file: Path = args.input_file 138 - text = file.read_text() 139 - else: 140 - - import sys 141 - - print("Press Ctrl+D to stop reading input and start generating", flush=True) 142 - + print("Press Ctrl+D to stop reading input and start generating", file=sys.stderr, flush=True) 143 - text = '\n'.join(sys.stdin) 144 - 145 - logger.debug(f"Input text: {text!r}") 146 - 147 - - out_file: Path = args.output_file 148 - - if not out_file.suffix == ".wav": 149 - + out_file: str = args.output_file 150 - + if out_file != "-" and not out_file.endswith(".wav"): 151 - logger.warning("The output file name should end with .wav") 152 - generate_and_save_audio( 153 - output_file=out_file,
-93
pkgs/kokoro/update.sh
··· 1 - #!/usr/bin/env bash 2 - set -euo pipefail 3 - 4 - # Bumps two sources together: hexgrad/kokoro (main branch, 0-unstable-DATE) 5 - # and the en_core_web_sm wheel misaki needs. The spacy model only loads with a 6 - # matching spacy major.minor, so it follows the newest model release for the 7 - # spacy version in our nixpkgs. 8 - attr=kokoro 9 - owner=hexgrad 10 - repo=kokoro 11 - branch=main 12 - 13 - # Run by update-pkgs from the flake root ($0 is a read-only store copy). 14 - pkg=pkgs/kokoro/package.nix 15 - system=$(nix eval --raw --impure --expr 'builtins.currentSystem') 16 - build_attr=".#packages.$system.$attr" 17 - 18 - # Line number of the n-th line matching an ERE. 19 - line_of() { 20 - grep -nE "$1" "$pkg" | awk -F: -v n="${2:-1}" 'NR == n { print $1 }' 21 - } 22 - # Replace the quoted value on line $1. 23 - set_value() { 24 - local tmp 25 - tmp=$(mktemp) 26 - awk -v l="$1" -v v="$2" 'NR == l { sub(/"[^"]*"/, "\"" v "\"") } { print }' "$pkg" >"$tmp" 27 - cat "$tmp" >"$pkg" 28 - rm -f "$tmp" 29 - } 30 - value_at() { 31 - awk -v l="$1" 'NR == l { match($0, /"[^"]*"/); print substr($0, RSTART + 1, RLENGTH - 2) }' "$pkg" 32 - } 33 - 34 - # Field locations: kokoro block first, spacy model block second. 35 - kokoro_version_line=$(line_of '^[[:space:]]*version = "0-unstable-') 36 - kokoro_rev_line=$(line_of '^[[:space:]]*rev = "') 37 - kokoro_hash_line=$(line_of '^[[:space:]]*hash = "' 1) 38 - model_version_line=$(line_of '^[[:space:]]*version = "[0-9]+\.[0-9]+\.[0-9]+"') 39 - model_hash_line=$(line_of '^[[:space:]]*hash = "' 2) 40 - 41 - old_rev=$(value_at "$kokoro_rev_line") 42 - old_model=$(value_at "$model_version_line") 43 - 44 - new_rev=$(curl -fsSL "https://api.github.com/repos/$owner/$repo/commits/$branch" | jq -r .sha) 45 - 46 - spacy_version=$(nix eval --raw "$build_attr.pythonModule.pkgs.spacy.version") 47 - spacy_mm=$(echo "$spacy_version" | cut -d. -f1-2) 48 - new_model=$(curl -fsSL "https://api.github.com/repos/explosion/spacy-models/releases?per_page=100" | 49 - jq -r --arg p "en_core_web_sm-$spacy_mm." ' 50 - [.[] | select(.prerelease | not) | .tag_name | select(startswith($p)) 51 - | ltrimstr("en_core_web_sm-")] 52 - | sort_by(split(".") | map(tonumber)) | last // empty') 53 - if [ -z "$new_model" ]; then 54 - echo "$attr: no en_core_web_sm release for spacy $spacy_mm, keeping $old_model" >&2 55 - new_model=$old_model 56 - fi 57 - 58 - if [ "$old_rev" = "$new_rev" ] && [ "$old_model" = "$new_model" ]; then 59 - echo "$attr: already up to date ($new_rev, en_core_web_sm $new_model)" 60 - exit 0 61 - fi 62 - 63 - # Blank the hashes of whatever changed: with the old ones in place nix reuses 64 - # the cached FODs and the build "succeeds" on stale sources. 65 - if [ "$old_rev" != "$new_rev" ]; then 66 - new_date=$(curl -fsSL "https://api.github.com/repos/$owner/$repo/commits/$new_rev" | jq -r .commit.committer.date | cut -d T -f1) 67 - set_value "$kokoro_rev_line" "$new_rev" 68 - set_value "$kokoro_version_line" "0-unstable-$new_date" 69 - set_value "$kokoro_hash_line" "" 70 - fi 71 - if [ "$old_model" != "$new_model" ]; then 72 - set_value "$model_version_line" "$new_model" 73 - set_value "$model_hash_line" "" 74 - fi 75 - 76 - # Probe builds are *expected* to fail (hash mismatch); `|| true` keeps 77 - # errexit from aborting. One FOD fails per build; the two fetches are 78 - # independent, so match the reported derivation name to pick the field. 79 - for _ in 1 2; do 80 - out=$({ nix build --no-link "$build_attr" 2>&1 || true; } | tee /dev/stderr) 81 - got=$(echo "$out" | awk '/got:/ && !seen { print $2; seen = 1 }') 82 - [ -n "$got" ] || break 83 - if echo "$out" | grep -q 'hash mismatch in fixed-output derivation.*en_core_web_sm'; then 84 - set_value "$model_hash_line" "$got" 85 - echo "$attr: en_core_web_sm hash → $got" 86 - else 87 - set_value "$kokoro_hash_line" "$got" 88 - echo "$attr: src hash → $got" 89 - fi 90 - done 91 - 92 - echo "$attr: updated to $new_rev, en_core_web_sm $new_model" 93 - nix build --no-link "$build_attr"
-18
pkgs/libretro-dolphin/disable-background-shaders.patch
··· 1 - diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp 2 - --- a/Source/Core/VideoBackends/OGL/Render.cpp 3 - +++ b/Source/Core/VideoBackends/OGL/Render.cpp 4 - @@ -674,8 +674,14 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_ 5 - g_Config.backend_info.bSupportsComputeShaders && g_ogl_config.bSupportsImageLoadStore; 6 - 7 - // Background compiling is supported only when shared contexts aren't broken. 8 - +#ifdef __LIBRETRO__ 9 - + // Libretro cannot create shared GL contexts via CreateSharedContext(), 10 - + // so disable background shader compilation entirely. 11 - + g_Config.backend_info.bSupportsBackgroundCompiling = false; 12 - +#else 13 - g_Config.backend_info.bSupportsBackgroundCompiling = 14 - !DriverDetails::HasBug(DriverDetails::BUG_SHARED_CONTEXT_SHADER_COMPILATION); 15 - +#endif 16 - 17 - // Program binaries are supported on GL4.1+, ARB_get_program_binary, or ES3. 18 - if (supports_glsl_cache)
-9
pkgs/libretro-dolphin/package.nix
··· 1 - { 2 - libretro, 3 - }: 4 - 5 - libretro.dolphin.overrideAttrs (old: { 6 - patches = (old.patches or [ ]) ++ [ 7 - ./disable-background-shaders.patch 8 - ]; 9 - })
-150
pkgs/moebius/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - buildNpmPackage, 5 - fetchFromGitHub, 6 - makeWrapper, 7 - makeDesktopItem, 8 - copyDesktopItems, 9 - electron_43, 10 - nix-update-script, 11 - }: 12 - 13 - let 14 - electron = electron_43; 15 - in 16 - buildNpmPackage (finalAttrs: { 17 - pname = "moebius"; 18 - # Upstream's last tagged release (1.0.29) only ships x86_64 binaries; build the 19 - # newer master commit from source so it runs natively on every platform. 20 - version = "1.0.29-unstable-2023-12-18"; 21 - 22 - src = fetchFromGitHub { 23 - owner = "blocktronics"; 24 - repo = "moebius"; 25 - rev = "1f624d62654d614177635ab18a288253c3b917eb"; 26 - hash = "sha256-Uu6vEhbXXiVbUTgC/WeF+SVCf0oLzg4OnGFZIx7SJ6I="; 27 - }; 28 - 29 - npmDepsHash = "sha256-hLZF0FvyAgJVURmU6M4UYFauZz5SLvH2+6W2qDogoXU="; 30 - 31 - passthru.updateScript = nix-update-script { 32 - extraArgs = [ 33 - "--flake" 34 - "--version=branch" 35 - ]; 36 - }; 37 - 38 - # discord-rpc pulls the optional native `register-scheme` git dependency, which 39 - # is only used outside Electron (inside Electron it falls back to 40 - # app.setAsDefaultProtocolClient), so drop it and build a pure-JS closure. 41 - forceGitDeps = true; 42 - npmFlags = [ 43 - "--omit=dev" 44 - "--omit=optional" 45 - ]; 46 - 47 - # We ship the app on nixpkgs' Electron; don't download a private one or run the 48 - # electron-builder packaging step. 49 - env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; 50 - dontNpmBuild = true; 51 - 52 - nativeBuildInputs = [ 53 - makeWrapper 54 - ] 55 - ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; 56 - 57 - desktopItems = lib.optionals stdenv.hostPlatform.isLinux [ 58 - (makeDesktopItem { 59 - name = "moebius"; 60 - desktopName = "Moebius"; 61 - comment = finalAttrs.meta.description; 62 - exec = "moebius %U"; 63 - icon = "moebius"; 64 - startupWMClass = "Moebius"; 65 - categories = [ "Graphics" ]; 66 - mimeTypes = [ "text/x-ansi" ]; 67 - }) 68 - ]; 69 - 70 - installPhase = '' 71 - runHook preInstall 72 - 73 - app=$out/libexec/moebius 74 - res=$app/resources 75 - mkdir -p "$app" "$out/bin" 76 - cp -r app node_modules package.json "$app/" 77 - 78 - # Sample art and control-character sheets the app loads at runtime. 79 - mkdir -p "$res" 80 - cp -r build/ans "$res/ans" 81 - cp -r build/png "$res/png" 82 - 83 - # The app switches resource paths on app.isPackaged; we run an unpacked tree, 84 - # so pin both branches to the store copy above. 85 - find "$app/app" -name '*.js' | while read -r f; do 86 - substituteInPlace "$f" \ 87 - --replace-quiet 'remote.app.isPackaged' 'true' \ 88 - --replace-quiet 'process.resourcesPath' "\"$res\"" 89 - done 90 - 91 - # @electron/remote 2.1.0 calls the internal features.isViewApiEnabled(), 92 - # removed in modern Electron; guard it (the fix shipped upstream in 2.1.2). 93 - substituteInPlace "$app/node_modules/@electron/remote/dist/src/common/module-names.js" \ 94 - --replace-fail 'if (!features || features.isViewApiEnabled()) {' \ 95 - 'if (!features || !features.isViewApiEnabled || features.isViewApiEnabled()) {' 96 - 97 - makeWrapper ${lib.getExe electron} $out/bin/moebius \ 98 - --add-flags "$app" \ 99 - ${lib.optionalString stdenv.hostPlatform.isLinux '' 100 - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" 101 - ''} 102 - '' 103 - + lib.optionalString stdenv.hostPlatform.isLinux '' 104 - for size in 16 32 128 512 1024; do 105 - install -Dm644 build/icons/icon_''${size}x''${size}.png \ 106 - $out/share/icons/hicolor/''${size}x''${size}/apps/moebius.png 107 - done 108 - '' 109 - + lib.optionalString stdenv.hostPlatform.isDarwin '' 110 - appdir="$out/Applications/Moebius.app/Contents" 111 - mkdir -p "$appdir/MacOS" "$appdir/Resources" 112 - cp build/icon.icns "$appdir/Resources/moebius.icns" 113 - makeWrapper $out/bin/moebius "$appdir/MacOS/Moebius" 114 - cat > "$appdir/Info.plist" <<EOF 115 - <?xml version="1.0" encoding="UTF-8"?> 116 - <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 117 - <plist version="1.0"> 118 - <dict> 119 - <key>CFBundleName</key><string>Moebius</string> 120 - <key>CFBundleDisplayName</key><string>Moebius</string> 121 - <key>CFBundleExecutable</key><string>Moebius</string> 122 - <key>CFBundleIdentifier</key><string>org.andyherbert.moebius</string> 123 - <key>CFBundleIconFile</key><string>moebius.icns</string> 124 - <key>CFBundleShortVersionString</key><string>${finalAttrs.version}</string> 125 - <key>CFBundlePackageType</key><string>APPL</string> 126 - <key>LSMinimumSystemVersion</key><string>10.13</string> 127 - <key>NSHighResolutionCapable</key><true/> 128 - </dict> 129 - </plist> 130 - EOF 131 - '' 132 - + '' 133 - runHook postInstall 134 - ''; 135 - 136 - meta = { 137 - description = "Modern ANSI and ASCII art editor with a Photoshop-style half-block brush"; 138 - homepage = "https://blocktronics.github.io/moebius/"; 139 - downloadPage = "https://github.com/blocktronics/moebius/releases"; 140 - license = lib.licenses.asl20; 141 - maintainers = [ ]; 142 - platforms = [ 143 - "x86_64-linux" 144 - "aarch64-linux" 145 - "x86_64-darwin" 146 - "aarch64-darwin" 147 - ]; 148 - mainProgram = "moebius"; 149 - }; 150 - })
-81
pkgs/photocraft-web/package.nix
··· 1 - { 2 - lib, 3 - rustPlatform, 4 - fetchFromGitHub, 5 - fetchCrate, 6 - buildWasmBindgenCli, 7 - trunk, 8 - binaryen, 9 - llvmPackages, 10 - }: 11 - 12 - let 13 - # trunk refuses to run a wasm-bindgen whose version differs from the one in 14 - # Cargo.lock, and nixpkgs only ships up to 0.2.127. 15 - wasm-bindgen-cli = buildWasmBindgenCli rec { 16 - src = fetchCrate { 17 - pname = "wasm-bindgen-cli"; 18 - version = "0.2.129"; 19 - hash = "sha256-pcecKQd7E8Opw6bkFoE569epUi7gh5qpQF1e5PJY6V8="; 20 - }; 21 - 22 - cargoDeps = rustPlatform.fetchCargoVendor { 23 - inherit src; 24 - inherit (src) pname version; 25 - hash = "sha256-vmUrWVU7kPJJxO5qIVeAkwQyWDELO1Z4Z5gitz2kco8="; 26 - }; 27 - }; 28 - in 29 - rustPlatform.buildRustPackage (finalAttrs: { 30 - pname = "photocraft-web"; 31 - version = "0.8.2"; 32 - 33 - src = fetchFromGitHub { 34 - owner = "storytold"; 35 - repo = "photocraft"; 36 - tag = "v${finalAttrs.version}"; 37 - hash = "sha256-kqKpZ8IBPmCd93XXvyxyAjPjJEWFfZh49qQc9KMSp4Y="; 38 - }; 39 - 40 - cargoHash = "sha256-dafKVsoBYuChW0nsjUhk5GqCChAO07A4Rhhv2UAdEx0="; 41 - 42 - nativeBuildInputs = [ 43 - trunk 44 - wasm-bindgen-cli 45 - binaryen 46 - llvmPackages.bintools-unwrapped 47 - ]; 48 - 49 - # Shown in Help › About (crates/engine/src/build_info.rs). 50 - env.PHOTOCRAFT_BUILD_SHA = finalAttrs.src.tag; 51 - 52 - buildPhase = '' 53 - runHook preBuild 54 - (cd apps/photocraft-web && HOME=$TMPDIR trunk build --offline --frozen --release) 55 - runHook postBuild 56 - ''; 57 - 58 - # The test suite targets the native workspace, not the wasm bundle. 59 - doCheck = false; 60 - 61 - installPhase = '' 62 - runHook preInstall 63 - cp -r dist/web $out 64 - runHook postInstall 65 - ''; 66 - 67 - passthru = { 68 - inherit wasm-bindgen-cli; 69 - updateScript = ./update.sh; 70 - }; 71 - 72 - meta = { 73 - description = "PhotoCraft image editor compiled to WebAssembly, as a static site"; 74 - homepage = "https://getartcraft.com/apps/photocraft"; 75 - license = with lib.licenses; [ 76 - mit 77 - asl20 78 - ]; 79 - platforms = lib.platforms.all; 80 - }; 81 - })
-72
pkgs/photocraft-web/update.sh
··· 1 - #!/usr/bin/env bash 2 - set -euo pipefail 3 - 4 - # Bumps photocraft to the latest GitHub release and keeps the bundled 5 - # wasm-bindgen-cli in lockstep with the wasm-bindgen version in Cargo.lock 6 - # (trunk refuses mismatched versions), so nix-update alone is not enough. 7 - owner=storytold 8 - repo=photocraft 9 - attr=photocraft-web 10 - 11 - # Run by update-pkgs from the flake root ($0 is a read-only store copy). 12 - pkg=pkgs/photocraft-web/package.nix 13 - system=$(nix eval --raw --impure --expr 'builtins.currentSystem') 14 - flake_attr=".#packages.$system.$attr" 15 - 16 - tag=$(curl -fsSL "https://api.github.com/repos/$owner/$repo/releases/latest" | jq -r .tag_name) 17 - new_version=${tag#v} 18 - old_version=$(nix eval --raw "$flake_attr.version") 19 - 20 - new_wb=$(curl -fsSL "https://raw.githubusercontent.com/$owner/$repo/$tag/Cargo.lock" \ 21 - | awk '/^name = "wasm-bindgen"$/ && !seen { getline; gsub(/version = |"/, ""); print; seen = 1 }') 22 - old_wb=$(nix eval --raw "$flake_attr.wasm-bindgen-cli.version") 23 - if [ -z "$new_wb" ]; then 24 - echo "$attr: could not find wasm-bindgen in Cargo.lock of $tag" >&2 25 - exit 1 26 - fi 27 - 28 - if [ "$old_version" = "$new_version" ] && [ "$old_wb" = "$new_wb" ]; then 29 - echo "$attr: already up to date ($new_version, wasm-bindgen $new_wb)" 30 - exit 0 31 - fi 32 - 33 - # Blank every hash we bump, otherwise nix reuses the cached old FODs. 34 - sed -i \ 35 - -e "/pname = \"$attr\"/,/version = /s|version = \"[^\"]*\"|version = \"$new_version\"|" \ 36 - -e "/repo = \"$repo\"/,/hash = /s|hash = \"[^\"]*\"|hash = \"\"|" \ 37 - -e "s|cargoHash = \"[^\"]*\"|cargoHash = \"\"|" \ 38 - "$pkg" 39 - if [ "$old_wb" != "$new_wb" ]; then 40 - sed -i \ 41 - -e "/pname = \"wasm-bindgen-cli\"/,/hash = /s|version = \"[^\"]*\"|version = \"$new_wb\"|" \ 42 - -e "/pname = \"wasm-bindgen-cli\"/,/hash = /s|hash = \"[^\"]*\"|hash = \"\"|" \ 43 - -e "/fetchCargoVendor/,/hash = /s|hash = \"[^\"]*\"|hash = \"\"|" \ 44 - "$pkg" 45 - fi 46 - 47 - # The probe build is *expected* to fail (hash mismatch); `|| true` keeps 48 - # pipefail/errexit from turning that into an empty `got`. 49 - probe_hash() { 50 - { nix build --no-link "$flake_attr.$1" 2>&1 || true; } | tee /dev/stderr \ 51 - | awk '/got:/ && !seen { print $2; seen = 1 }' || true 52 - } 53 - 54 - # fill <sub-attr> <sed address range start> <field> 55 - fill() { 56 - local got 57 - got=$(probe_hash "$1") 58 - if [ -n "$got" ]; then 59 - sed -i "$2,/$3 = /s|$3 = \"[^\"]*\"|$3 = \"$got\"|" "$pkg" 60 - echo "$attr: $1 → $got" 61 - fi 62 - } 63 - 64 - if [ "$old_wb" != "$new_wb" ]; then 65 - fill wasm-bindgen-cli.src '/pname = "wasm-bindgen-cli"/' hash 66 - fill wasm-bindgen-cli.cargoDeps '/fetchCargoVendor/' hash 67 - fi 68 - fill src "/repo = \"$repo\"/" hash 69 - fill cargoDeps '/cargoHash/' cargoHash 70 - 71 - echo "$attr: updated $old_version → $new_version (wasm-bindgen $old_wb → $new_wb)" 72 - nix build --no-link "$flake_attr"
-237
pkgs/sdrpp-brown/package.nix
··· 1 - { 2 - stdenv, 3 - lib, 4 - fetchFromGitHub, 5 - fetchurl, 6 - nix-update-script, 7 - cmake, 8 - pkg-config, 9 - unzip, 10 - libX11, 11 - glfw, 12 - glew, 13 - fftw, 14 - fftwFloat, 15 - volk, 16 - zstd, 17 - libpulseaudio, 18 - orc, 19 - 20 - # Sources 21 - airspy_source ? true, 22 - airspy, 23 - airspyhf_source ? true, 24 - airspyhf, 25 - audio_source ? true, 26 - bladerf_source ? stdenv.hostPlatform.isLinux, 27 - libbladeRF, 28 - file_source ? true, 29 - hackrf_source ? true, 30 - hackrf, 31 - hermes_source ? true, 32 - hl2_source ? true, 33 - kiwisdr_source ? true, 34 - limesdr_source ? true, 35 - limesuite, 36 - network_source ? true, 37 - plutosdr_source ? stdenv.hostPlatform.isLinux, 38 - libiio, 39 - libad9361, 40 - rfspace_source ? true, 41 - rtl_sdr_source ? true, 42 - rtl-sdr-osmocom, 43 - libusb1, 44 - rtl_tcp_source ? true, 45 - sdrplay_source ? false, 46 - sdrplay, 47 - sdrpp_server_source ? true, 48 - soapy_source ? true, 49 - soapysdr-with-plugins, 50 - spectran_http_source ? true, 51 - spyserver_source ? true, 52 - usrp_source ? false, 53 - uhd, 54 - boost, 55 - 56 - # Sinks 57 - audio_sink ? true, 58 - rtaudio, 59 - mpeg_adts_sink ? false, # downloads lame at build time - disable for now 60 - network_sink ? true, 61 - portaudio_sink ? false, 62 - portaudio, 63 - 64 - # Decoders 65 - atv_decoder ? true, 66 - ch_extravhf_decoder ? false, # requires itpp/mbe libraries 67 - ch_tetra_demodulator ? true, 68 - dab_decoder ? false, 69 - falcon9_decoder ? false, 70 - ft8_decoder ? true, 71 - kg_sstv_decoder ? false, 72 - m17_decoder ? false, 73 - codec2, 74 - meteor_demodulator ? true, 75 - pager_decoder ? true, 76 - radio ? true, 77 - weather_sat_decoder ? false, 78 - 79 - # Misc 80 - discord_presence ? true, 81 - frequency_manager ? true, 82 - iq_exporter ? true, 83 - recorder ? true, 84 - rigctl_client ? true, 85 - rigctl_server ? true, 86 - scanner ? true, 87 - noise_reduction ? true, 88 - }: 89 - 90 - let 91 - # ETSI TETRA codec - pre-fetched to avoid network access during build 92 - etsiCodec = fetchurl { 93 - url = "http://www.etsi.org/deliver/etsi_en/300300_300399/30039502/01.03.01_60/en_30039502v010301p0.zip"; 94 - hash = "sha256-H+GMR3PIzLUu8jyltKCwhBs41U3dXZx9huuLBg8TLzk="; 95 - # etsi.org answers 403 to curl's default user agent 96 - curlOptsList = [ 97 - "-A" 98 - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0 Safari/537.36" 99 - ]; 100 - }; 101 - in 102 - stdenv.mkDerivation (_finalAttrs: { 103 - pname = "sdrpp-brown"; 104 - 105 - version = "0-unstable-2026-08-12"; 106 - 107 - src = fetchFromGitHub { 108 - owner = "sannysanoff"; 109 - repo = "SDRPlusPlusBrown"; 110 - rev = "5fca05446b3f985ab49c7c3c257980aaf2ec34fe"; 111 - hash = "sha256-CYiw61DaosK7xMpCmwjy18AEcASJgsIhI+T4NtsLUrM="; 112 - }; 113 - 114 - nativeBuildInputs = [ 115 - cmake 116 - pkg-config 117 - ] 118 - ++ lib.optional ch_tetra_demodulator unzip; 119 - 120 - buildInputs = [ 121 - glfw 122 - glew 123 - fftw 124 - fftwFloat 125 - volk 126 - zstd 127 - orc 128 - ] 129 - ++ lib.optional stdenv.hostPlatform.isLinux libX11 130 - ++ lib.optional stdenv.hostPlatform.isLinux libpulseaudio 131 - ++ lib.optional airspy_source airspy 132 - ++ lib.optional airspyhf_source airspyhf 133 - ++ lib.optional bladerf_source libbladeRF 134 - ++ lib.optional hackrf_source hackrf 135 - ++ lib.optional limesdr_source limesuite 136 - ++ lib.optionals rtl_sdr_source [ 137 - rtl-sdr-osmocom 138 - libusb1 139 - ] 140 - ++ lib.optional sdrplay_source sdrplay 141 - ++ lib.optional soapy_source soapysdr-with-plugins 142 - ++ lib.optionals plutosdr_source [ 143 - libiio 144 - libad9361 145 - ] 146 - ++ lib.optionals usrp_source [ 147 - uhd 148 - boost 149 - ] 150 - ++ lib.optional (audio_source || audio_sink) rtaudio 151 - ++ lib.optional portaudio_sink portaudio 152 - ++ lib.optional (dab_decoder || m17_decoder) codec2; 153 - 154 - # Pre-place the ETSI codec in the build directory so CMake doesn't try to download it 155 - preConfigure = lib.optionalString ch_tetra_demodulator '' 156 - mkdir -p build/decoder_modules/ch_tetra_demodulator/etsi_codec 157 - cp ${etsiCodec} build/decoder_modules/ch_tetra_demodulator/etsi_codec/etsi_tetra_codec.zip 158 - ''; 159 - 160 - cmakeFlags = [ 161 - # Sources 162 - (lib.cmakeBool "OPT_BUILD_AIRSPYHF_SOURCE" airspyhf_source) 163 - (lib.cmakeBool "OPT_BUILD_AIRSPY_SOURCE" airspy_source) 164 - (lib.cmakeBool "OPT_BUILD_AUDIO_SOURCE" audio_source) 165 - (lib.cmakeBool "OPT_BUILD_BLADERF_SOURCE" bladerf_source) 166 - (lib.cmakeBool "OPT_BUILD_FILE_SOURCE" file_source) 167 - (lib.cmakeBool "OPT_BUILD_HACKRF_SOURCE" hackrf_source) 168 - (lib.cmakeBool "OPT_BUILD_HERMES_SOURCE" hermes_source) 169 - (lib.cmakeBool "OPT_BUILD_HL2_SOURCE" hl2_source) 170 - (lib.cmakeBool "OPT_BUILD_KIWISDR_SOURCE" kiwisdr_source) 171 - (lib.cmakeBool "OPT_BUILD_LIMESDR_SOURCE" limesdr_source) 172 - (lib.cmakeBool "OPT_BUILD_NETWORK_SOURCE" network_source) 173 - (lib.cmakeBool "OPT_BUILD_PLUTOSDR_SOURCE" plutosdr_source) 174 - (lib.cmakeBool "OPT_BUILD_RFSPACE_SOURCE" rfspace_source) 175 - (lib.cmakeBool "OPT_BUILD_RTL_SDR_SOURCE" rtl_sdr_source) 176 - (lib.cmakeBool "OPT_BUILD_RTL_TCP_SOURCE" rtl_tcp_source) 177 - (lib.cmakeBool "OPT_BUILD_SDRPLAY_SOURCE" sdrplay_source) 178 - (lib.cmakeBool "OPT_BUILD_SDRPP_SERVER_SOURCE" sdrpp_server_source) 179 - (lib.cmakeBool "OPT_BUILD_SOAPY_SOURCE" soapy_source) 180 - (lib.cmakeBool "OPT_BUILD_SPECTRAN_HTTP_SOURCE" spectran_http_source) 181 - (lib.cmakeBool "OPT_BUILD_SPYSERVER_SOURCE" spyserver_source) 182 - (lib.cmakeBool "OPT_BUILD_USRP_SOURCE" usrp_source) 183 - 184 - # Sinks 185 - (lib.cmakeBool "OPT_BUILD_AUDIO_SINK" audio_sink) 186 - (lib.cmakeBool "OPT_BUILD_MPEG_ADTS_SINK" mpeg_adts_sink) 187 - (lib.cmakeBool "OPT_BUILD_NETWORK_SINK" network_sink) 188 - (lib.cmakeBool "OPT_BUILD_NEW_PORTAUDIO_SINK" portaudio_sink) 189 - 190 - # Decoders 191 - (lib.cmakeBool "OPT_BUILD_ATV_DECODER" atv_decoder) 192 - (lib.cmakeBool "OPT_BUILD_CH_EXTRAVHF_DECODER" ch_extravhf_decoder) 193 - (lib.cmakeBool "OPT_BUILD_CH_TETRA_DEMODULATOR" ch_tetra_demodulator) 194 - (lib.cmakeBool "OPT_BUILD_DAB_DECODER" dab_decoder) 195 - (lib.cmakeBool "OPT_BUILD_FALCON9_DECODER" falcon9_decoder) 196 - (lib.cmakeBool "OPT_BUILD_FT8_DECODER" ft8_decoder) 197 - (lib.cmakeBool "OPT_BUILD_KG_SSTV_DECODER" kg_sstv_decoder) 198 - (lib.cmakeBool "OPT_BUILD_M17_DECODER" m17_decoder) 199 - (lib.cmakeBool "OPT_BUILD_METEOR_DEMODULATOR" meteor_demodulator) 200 - (lib.cmakeBool "OPT_BUILD_PAGER_DECODER" pager_decoder) 201 - (lib.cmakeBool "OPT_BUILD_RADIO" radio) 202 - (lib.cmakeBool "OPT_BUILD_WEATHER_SAT_DECODER" weather_sat_decoder) 203 - 204 - # Misc 205 - (lib.cmakeBool "OPT_BUILD_DISCORD_PRESENCE" discord_presence) 206 - (lib.cmakeBool "OPT_BUILD_FREQUENCY_MANAGER" frequency_manager) 207 - (lib.cmakeBool "OPT_BUILD_IQ_EXPORTER" iq_exporter) 208 - (lib.cmakeBool "OPT_BUILD_RECORDER" recorder) 209 - (lib.cmakeBool "OPT_BUILD_RIGCTL_CLIENT" rigctl_client) 210 - (lib.cmakeBool "OPT_BUILD_RIGCTL_SERVER" rigctl_server) 211 - (lib.cmakeBool "OPT_BUILD_SCANNER" scanner) 212 - (lib.cmakeBool "OPT_BUILD_NOISE_REDUCTION_LOGMMSE" noise_reduction) 213 - ]; 214 - 215 - env.NIX_CFLAGS_COMPILE = "-fpermissive"; 216 - 217 - hardeningDisable = lib.optional stdenv.cc.isClang "format"; 218 - 219 - passthru.updateScript = nix-update-script { 220 - extraArgs = [ 221 - "--flake" 222 - "--version=branch" 223 - "--version-regex" 224 - "(0-unstable-.*)" 225 - "--system" 226 - "x86_64-linux" 227 - ]; 228 - }; 229 - 230 - meta = { 231 - description = "SDR++ Brown Edition - Cross-Platform SDR Software with KiwiSDR support"; 232 - homepage = "https://github.com/sannysanoff/SDRPlusPlusBrown"; 233 - license = lib.licenses.gpl3Only; 234 - platforms = lib.platforms.linux; 235 - mainProgram = "sdrpp"; 236 - }; 237 - })
-44
pkgs/zmk-studio/package.nix
··· 1 - { 2 - lib, 3 - appimageTools, 4 - fetchurl, 5 - nix-update-script, 6 - }: 7 - 8 - let 9 - pname = "zmk-studio"; 10 - version = "0.3.1"; 11 - 12 - src = fetchurl { 13 - url = "https://github.com/zmkfirmware/zmk-studio/releases/download/v${version}/ZMK.Studio_${version}_amd64.AppImage"; 14 - hash = "sha256-kDt3AxPV1901WH3n6+mmylLwnvRrAuHSlFlRK9qEoOs="; 15 - }; 16 - 17 - appimageContents = appimageTools.extractType2 { inherit pname version src; }; 18 - in 19 - appimageTools.wrapType2 { 20 - inherit pname version src; 21 - 22 - passthru.updateScript = nix-update-script { 23 - extraArgs = [ 24 - "--flake" 25 - "--system" 26 - "x86_64-linux" 27 - ]; 28 - }; 29 - 30 - extraInstallCommands = '' 31 - install -Dm444 "${appimageContents}/ZMK Studio.desktop" $out/share/applications/zmk-studio.desktop 32 - install -Dm444 ${appimageContents}/zmk-studio.png $out/share/icons/hicolor/128x128/apps/zmk-studio.png 33 - ''; 34 - 35 - meta = { 36 - description = "Runtime keymap editor for ZMK keyboards"; 37 - homepage = "https://zmk.studio/"; 38 - downloadPage = "https://github.com/zmkfirmware/zmk-studio/releases"; 39 - license = lib.licenses.mit; 40 - maintainers = [ ]; 41 - platforms = [ "x86_64-linux" ]; 42 - mainProgram = "zmk-studio"; 43 - }; 44 - }