2024-01-31 11:55:08 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildNpmPackage,
|
|
|
|
vips,
|
|
|
|
pkg-config,
|
|
|
|
src,
|
|
|
|
version,
|
2024-02-09 19:06:25 +00:00
|
|
|
nixosTests,
|
2024-01-31 11:55:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildNpmPackage {
|
|
|
|
pname = "pingvin-share-frontend";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = "${src}/frontend";
|
|
|
|
|
|
|
|
npmInstallFlags = [ "--build-from-source" ];
|
|
|
|
installPhase = ''
|
|
|
|
cp -r . $out
|
|
|
|
ln -s $out/node_modules/.bin $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ vips ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2024-10-01 17:27:30 +00:00
|
|
|
npmDepsHash = "sha256-laVAVwx/A/6TunCmmZYQKAuYqv1xTG3e1DIonj2S9IU=";
|
2024-01-31 11:55:08 +00:00
|
|
|
makeCacheWritable = true;
|
|
|
|
npmFlags = [ "--legacy-peer-deps" ];
|
|
|
|
|
2024-02-09 19:06:25 +00:00
|
|
|
passthru.tests = {
|
|
|
|
pingvin-share = nixosTests.pingvin-share;
|
|
|
|
};
|
|
|
|
|
2024-01-31 11:55:08 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Frontend of pingvin-share, a self-hosted file sharing platform";
|
|
|
|
homepage = "https://github.com/stonith404/pingvin-share";
|
|
|
|
downloadPage = "https://github.com/stonith404/pingvin-share/releases";
|
|
|
|
changelog = "https://github.com/stonith404/pingvin-share/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ ratcornu ];
|
|
|
|
};
|
|
|
|
}
|