nixpkgs-suyu/pkgs/servers/psitransfer/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.1 KiB
Nix
Raw Normal View History

2023-07-25 21:03:58 +02:00
{ lib
, buildNpmPackage
, fetchFromGitHub
}:
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
'';
2023-07-25 21:03:58 +02:00
installPhase = ''
cp -r ../public/app $out
'';
};
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;
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";
};
2023-07-25 21:03:58 +02:00
}