this repo has no description
at develop 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 nodejs_22, 5 pnpm_10, 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "moonlight"; 10 version = (builtins.fromJSON (builtins.readFile ./../package.json)).version; 11 12 src = ./..; 13 14 outputs = [ "out" "firefox" ]; 15 16 nativeBuildInputs = [ 17 nodejs_22 18 pnpm_10.configHook 19 ]; 20 21 pnpmDeps = pnpm_10.fetchDeps { 22 inherit (finalAttrs) pname version src; 23 hash = "sha256-I+zRCUqJabpGJRFBGW0NrM9xzyzeCjioF54zlCpynBU="; 24 }; 25 26 env = { 27 NODE_ENV = "production"; 28 MOONLIGHT_VERSION = "v${finalAttrs.version}"; 29 }; 30 31 buildPhase = '' 32 runHook preBuild 33 34 pnpm run build 35 pnpm run browser-mv2 36 37 runHook postBuild 38 ''; 39 40 installPhase = '' 41 runHook preInstall 42 43 cp -r dist $out 44 45 mkdir -p $firefox/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ 46 mv $out/browser-mv2 $firefox/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{0fb6d66f-f22d-4555-a87b-34ef4bea5e2a} 47 48 runHook postInstall 49 ''; 50 51 meta = with lib; { 52 description = "Yet another Discord mod"; 53 homepage = "https://moonlight-mod.github.io/"; 54 license = licenses.lgpl3; 55 maintainers = with maintainers; [ notnite ]; 56 }; 57})