Commit 76809db

HPCesia <me@hpcesia.com>
2026-06-12 18:35:34
new package: miaomiaowu
Assisted-by: opencode/deepseek-v4-flash
1 parent 082ea4e
Changed files (3)
pkgs/miaomiaowu/default.nix
@@ -0,0 +1,77 @@
+{
+  lib,
+  buildGoModule,
+  buildNpmPackage,
+  fetchFromGitHub,
+  runCommand,
+  jq,
+}: let
+  version = "0.7.8";
+
+  src = fetchFromGitHub {
+    owner = "iluobei";
+    repo = "miaomiaowu";
+    tag = "v0.7.8";
+    hash = "sha256-zdD2aW0zqVqBSuzJv5C5hG+hd4/SFkWJo2F5ohWzoKM=";
+  };
+
+  # @tailwindcss/oxide is missing resolved/integrity in the lockfile,
+  # which causes prefetch-npm-deps to not download it.
+  srcPatched =
+    runCommand "miaomiaowu-source-patched" {
+      nativeBuildInputs = [jq];
+    } ''
+      cp -r ${src} $out
+      chmod -R u+w $out
+      jq '.packages["node_modules/@tailwindcss/oxide"] += {
+        "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.14.tgz",
+        "integrity": "sha512-23yx+VUbBwCg2x5XWdB8+1lkPajzLmALEfMb51zZUBYaYVPDQvBSD/WYDqiVyBIo2BZFa3yw1Rpy3G2Jp+K0dw=="
+      }' "$out/miaomiaowu/package-lock.json" > tmp.json
+      mv tmp.json "$out/miaomiaowu/package-lock.json"
+    '';
+
+  frontend = buildNpmPackage {
+    pname = "miaomiaowu-frontend";
+    inherit version;
+
+    src = "${srcPatched}/miaomiaowu";
+
+    npmDepsHash = "sha256-KwlLVo5OE77OsaYhOF7dvLfa+Q7KbdbtySo1zHIWC0w=";
+    npmDepsFetcherVersion = 2;
+    makeCacheWritable = true;
+
+    installPhase = ''
+      mkdir -p $out
+      cp -r ../internal/web/dist/* $out/
+    '';
+  };
+
+  srcWithFrontend = runCommand "miaomiaowu-source-with-frontend" {} ''
+    cp -r ${src} $out
+    chmod -R u+w $out
+    cp -r ${frontend} $out/internal/web/dist
+  '';
+in
+  buildGoModule (finalAttrs: {
+    pname = "miaomiaowu";
+    inherit version;
+
+    src = srcWithFrontend;
+
+    vendorHash = "sha256-Q3dpE3sncuSOVjDa2LgevNGb9VJj7mR0cn/sZiGRxjI=";
+
+    subPackages = ["./cmd/server"];
+
+    ldflags = ["-s" "-w"];
+
+    postInstall = ''
+      mv $out/bin/server $out/bin/${finalAttrs.pname}
+    '';
+
+    meta = {
+      description = "Personal Clash subscriptions management system";
+      homepage = "https://github.com/iluobei/miaomiaowu";
+      license = lib.licenses.mit;
+      platforms = lib.platforms.linux;
+    };
+  })
default.nix
@@ -26,6 +26,8 @@
 
   kelivo = pkgs.callPackage ./pkgs/kelivo {};
 
+  miaomiaowu = pkgs.callPackage ./pkgs/miaomiaowu {};
+
   localbooru-bin = pkgs.callPackage ./pkgs/localbooru-bin {};
 
   mo2-lint = pkgs.callPackage ./pkgs/mo2-lint {};
README.md
@@ -14,6 +14,7 @@
 | `harmonoid` | [harmonoid](https://harmonoid.com/) | `0.3.22` | **Unfree** | Plays & manages your music library. Looks beautiful & juicy. |
 | `kelivo` | [kelivo](https://github.com/Chevey339/kelivo) | `1.1.15` | [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html) | LLM chat client |
 | `localbooru-bin` | [localbooru-bin](https://github.com/resucutie/localbooru) | `1.6.1` | [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) | Cross platform local booru collection that exclusively works on local storage, without selfhosting |
+| `miaomiaowu` | [miaomiaowu](https://github.com/iluobei/miaomiaowu) | `0.7.8` | [MIT](https://spdx.org/licenses/MIT.html) | Personal Clash subscriptions management system |
 | `mo2-lint` | [mo2-lint](https://github.com/Furglitch/modorganizer2-linux-installer) | `7.0.0-rc3` | [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) | An easy-to-use Mod Organizer 2 installer for Linux, rewrited in Python. |
 | `musly-player` | [musly-player](https://github.com/dddevid/Musly) | `1.0.13` | [CC-BY-NC-SA-4.0](https://spdx.org/licenses/CC-BY-NC-SA-4.0.html) | A beautiful Flutter music streaming client for Subsonic-compatible servers with a modern Apple Music-inspired UI. |
 | `nocturne` | [nocturne](https://github.com/Jeffser/Nocturne) | `1.2.2` | [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) | An Adwaita Music Player / Library Manager  |