2023-07-25 21:03:58 +02:00
|
|
|
{ lib
|
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
2021-11-25 16:12:03 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-07-25 21:03:58 +02:00
|
|
|
pname = "psitransfer";
|
|
|
|
version = "2.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "psi-4ward";
|
|
|
|
repo = "psitransfer";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-dBAieXIwCEstR9m+6+2/OLPKo2qHynZ1t372Il0mkXk=";
|
|
|
|
};
|
|
|
|
app = buildNpmPackage {
|
|
|
|
pname = "${pname}-app";
|
|
|
|
inherit version src;
|
|
|
|
|
|
|
|
npmDepsHash = "sha256-iCd+I/aTMwQqAMRHan3T191XNz4S3Cy6CDxSLIYY7IA=";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/psi-4ward/psitransfer/pull/284
|
|
|
|
touch public/app/.npmignore
|
|
|
|
cd app
|
|
|
|
'';
|
2022-03-28 23:06:29 +02:00
|
|
|
|
2023-07-25 21:03:58 +02:00
|
|
|
installPhase = ''
|
|
|
|
cp -r ../public/app $out
|
|
|
|
'';
|
2021-11-25 16:12:03 +01:00
|
|
|
};
|
2023-07-25 21:03:58 +02:00
|
|
|
in buildNpmPackage {
|
|
|
|
inherit pname version src;
|
|
|
|
|
|
|
|
npmDepsHash = "sha256-H22T5IU8bjbsWhwhchDqppvYfcatbXSWqp6gdoek1Z8=";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm -r public/app
|
|
|
|
cp -r ${app} public/app
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontBuild = true;
|
2021-11-25 16:12:03 +01:00
|
|
|
|
2023-07-25 21:03:58 +02:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/psi-4ward/psitransfer";
|
|
|
|
description = "Simple open source self-hosted file sharing solution";
|
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
maintainers = with lib.maintainers; [ hyshka ];
|
2023-11-23 22:09:35 +01:00
|
|
|
mainProgram = "psitransfer";
|
2021-11-25 16:12:03 +01:00
|
|
|
};
|
2023-07-25 21:03:58 +02:00
|
|
|
}
|