recipes.nix/packages/autobrr/web.nix
Adithya Nair dee0348c05
Some checks failed
Build and Push to Cachix / Push to Binary Cache (X86-64) (push) Failing after 1m5s
Build and Push to Cachix / Push to Binary Cache (aarch64) (push) Successful in 16m4s
initial commit
2024-11-03 19:11:03 +05:30

40 lines
777 B
Nix

{ stdenv, nodejs, pnpm, fetchFromGitHub }:
let
inherit (import ./sources.nix { inherit fetchFromGitHub; }) pname version src pnpmDepsHash;
in
stdenv.mkDerivation (finalAttrs: {
pname = "${pname}-web";
inherit src version;
sourceRoot = "${finalAttrs.src.name}/web";
nativeBuildInputs = [
nodejs
pnpm.configHook
];
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src sourceRoot;
hash = pnpmDepsHash;
};
# postPatch = ''
#substituteInPlace ./vite.config.ts \
# --replace 'outDir: "../internal/server/public_html"' 'outDir: "dist"'
#'';
postBuild = ''
pnpm run build
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share
mv dist $out/share/autobrr-web
runHook postInstall
'';
})