main
 1{
 2  lib,
 3  buildNpmPackage,
 4  fetchFromGitHub,
 5  jq,
 6}: let
 7  version = "0.7.8";
 8
 9  src = fetchFromGitHub {
10    owner = "iluobei";
11    repo = "miaomiaowu";
12    tag = "v${version}";
13    hash = "sha256-zdD2aW0zqVqBSuzJv5C5hG+hd4/SFkWJo2F5ohWzoKM=";
14  };
15in
16  buildNpmPackage {
17    pname = "miaomiaowu-frontend";
18    inherit version;
19    src = "${src}/miaomiaowu";
20
21    npmDepsHash = "sha256-KwlLVo5OE77OsaYhOF7dvLfa+Q7KbdbtySo1zHIWC0w=";
22    npmDepsFetcherVersion = 2;
23    makeCacheWritable = true;
24
25    postPatch = ''
26      ${lib.getExe jq} '.packages["node_modules/@tailwindcss/oxide"] += {
27        "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.14.tgz",
28        "integrity": "sha512-23yx+VUbBwCg2x5XWdB8+1lkPajzLmALEfMb51zZUBYaYVPDQvBSD/WYDqiVyBIo2BZFa3yw1Rpy3G2Jp+K0dw=="
29      }' package-lock.json > tmp.json
30      mv tmp.json package-lock.json
31    '';
32
33    installPhase = ''
34      mkdir -p $out
35      cp -r ../internal/web/dist/* $out/
36    '';
37  }