1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00
nixpkgs/pkgs/servers/psitransfer/default.nix
2024-04-27 11:56:21 +01:00

58 lines
1.2 KiB
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, pkg-config
, vips
}:
let
pname = "psitransfer";
version = "2.2.0";
src = fetchFromGitHub {
owner = "psi-4ward";
repo = "psitransfer";
rev = "v${version}";
hash = "sha256-5o4QliAXgSZekIy0CNWfEuOxNl0uetL8C8RKUJ8HsNA=";
};
app = buildNpmPackage {
pname = "${pname}-app";
inherit version src;
npmDepsHash = "sha256-q7E+osWIf6VZ3JvxCXoZYeF28aMgmKP6EzQkksUUjeY=";
postPatch = ''
# https://github.com/psi-4ward/psitransfer/pull/284
touch public/app/.npmignore
cd app
'';
installPhase = ''
cp -r ../public/app $out
'';
};
in buildNpmPackage {
inherit pname version src;
npmDepsHash = "sha256-EW/Fej58LE/nbJomPtWvEjDveAUdo0jIWwC+ziN0gy0=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
vips # for 'sharp' dependency
];
postPatch = ''
rm -r public/app
cp -r ${app} public/app
'';
dontBuild = true;
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 ];
mainProgram = "psitransfer";
};
}