fosrl-pangolin: init at 1.2.0 (#414976)

authored by Pol Dellaiera and committed by GitHub 5f40fd42 57dc721f

+66
+66
pkgs/by-name/fo/fosrl-pangolin/package.nix
···
··· 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + esbuild, 5 + buildNpmPackage, 6 + inter, 7 + }: 8 + 9 + buildNpmPackage rec { 10 + pname = "pangolin"; 11 + version = "1.2.0"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "fosrl"; 15 + repo = "pangolin"; 16 + tag = version; 17 + hash = "sha256-2yrim4pr8cgIh/FBuGIuK+ycwImpMiz+m21H5qYARmU="; 18 + }; 19 + 20 + npmDepsHash = "sha256-fi4e79Bk1LC/LizBJ+EhCjDzLR5ZocgVyWbSXsEJKdw="; 21 + nativeBuildInputs = [ esbuild ]; 22 + # Replace the googleapis.com Inter font with a local copy from nixpkgs 23 + # based on 24 + # https://github.com/NixOS/nixpkgs/blob/f7bf574774e466b984063a44330384cdbca67d6c/pkgs/by-name/ne/nextjs-ollama-llm-ui/package.nix 25 + postPatch = '' 26 + substituteInPlace src/app/layout.tsx --replace-fail \ 27 + "{ Figtree, Inter } from \"next/font/google\"" \ 28 + "localFont from \"next/font/local\"" 29 + 30 + substituteInPlace src/app/layout.tsx --replace-fail \ 31 + "Inter({ subsets: [\"latin\"] })" \ 32 + "localFont({ src: './Inter.ttf' })" 33 + 34 + cp "${inter}/share/fonts/truetype/InterVariable.ttf" src/app/Inter.ttf 35 + ''; 36 + 37 + preBuild = '' 38 + npx drizzle-kit generate --dialect sqlite --schema ./server/db/schemas/ --out init 39 + ''; 40 + 41 + installPhase = '' 42 + runHook preInstall 43 + mkdir -p $out/ 44 + 45 + cp -r .next/standalone/* $out/ 46 + cp -r .next/standalone/.next $out/ 47 + 48 + cp -r .next/static $out/.next/static 49 + cp -r dist $out/dist 50 + cp -r init $out/dist/init 51 + 52 + cp server/db/names.json $out/dist/names.json 53 + cp -r public $out/public 54 + cp -r node_modules $out/ 55 + runHook postInstall 56 + ''; 57 + 58 + meta = { 59 + description = "Tunneled reverse proxy server with identity and access control"; 60 + homepage = "https://github.com/fosrl/pangolin"; 61 + changelog = "https://github.com/fosrl/pangolin/releases/tag/${version}"; 62 + license = lib.licenses.agpl3Only; 63 + maintainers = with lib.maintainers; [ jackr ]; 64 + platforms = lib.platforms.linux; 65 + }; 66 + }