pingvin-share: init at 0.29.0

This commit is contained in:
RatCornu 2024-01-31 12:55:08 +01:00
parent 1daf761b45
commit 90e293d122
No known key found for this signature in database
GPG Key ID: B3BE02E379E6E8E2
5 changed files with 125 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "pingvin-share";
meta.maintainers = with lib.maintainers; [ ratcornu ];
nodes.machine = { pkgs, ... }: {
services.pingvin-share = {
enable = true;
backend.port = 9010;
frontend.port = 9011;
};
};
testScript = ''
machine.wait_for_unit("pingvin-share-frontend.service")
machine.wait_for_open_port(9011)
machine.succeed("curl --fail http://127.0.0.1:9010/")
machine.succeed("curl --fail http://127.0.0.1:9011/")
'';
})

View File

@ -0,0 +1,45 @@
{
lib,
buildNpmPackage,
vips,
pkg-config,
nodePackages,
src,
version,
}:
buildNpmPackage {
pname = "pingvin-share-backend";
inherit version;
src = "${src}/backend";
npmInstallFlags = [ "--build-from-source" ];
installPhase = ''
cp -r . $out
ln -s $out/node_modules/.bin $out/bin
'';
preBuild = ''
prisma generate
'';
buildInputs = [ vips ];
nativeBuildInputs = [
pkg-config
nodePackages.prisma
];
npmDepsHash = "sha256-btjvX+2krSc0/bJqeLcVTqHBVWqiTFipp3MidO9wApY=";
makeCacheWritable = true;
npmFlags = [ "--legacy-peer-deps" ];
meta = with lib; {
description = "Backend 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 ];
};
}

View File

@ -0,0 +1,21 @@
{
callPackage,
fetchFromGitHub,
recurseIntoAttrs,
}:
let
version = "0.29.0";
src = fetchFromGitHub {
owner = "stonith404";
repo = "pingvin-share";
rev = "v${version}";
hash = "sha256-ETsIGb6IxGruApUP05cuMtTDNAE23CI1Q2MmjxX3aPo=";
};
in
recurseIntoAttrs {
backend = callPackage ./backend.nix { inherit src version; };
frontend = callPackage ./frontend.nix { inherit src version; };
}

View File

@ -0,0 +1,37 @@
{
lib,
buildNpmPackage,
vips,
pkg-config,
src,
version,
}:
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 ];
npmDepsHash = "sha256-66CUVLbq2XdOQAr69DcvxTMvOgSR/RTKPaq80JG+8dg=";
makeCacheWritable = true;
npmFlags = [ "--legacy-peer-deps" ];
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 ];
};
}

View File

@ -23400,6 +23400,8 @@ with pkgs;
pico-sdk = callPackage ../development/libraries/pico-sdk { };
pingvin-share = callPackage ../servers/pingvin-share { };
pinocchio = callPackage ../development/libraries/pinocchio { };
pipelight = callPackage ../tools/misc/pipelight {