pingvin-share: init at 0.29.0
This commit is contained in:
parent
1daf761b45
commit
90e293d122
20
nixos/tests/pingvin-share.nix
Normal file
20
nixos/tests/pingvin-share.nix
Normal 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/")
|
||||
'';
|
||||
})
|
45
pkgs/servers/pingvin-share/backend.nix
Normal file
45
pkgs/servers/pingvin-share/backend.nix
Normal 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 ];
|
||||
};
|
||||
}
|
21
pkgs/servers/pingvin-share/default.nix
Normal file
21
pkgs/servers/pingvin-share/default.nix
Normal 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; };
|
||||
}
|
37
pkgs/servers/pingvin-share/frontend.nix
Normal file
37
pkgs/servers/pingvin-share/frontend.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user