nixpkgs/pkgs/servers/psitransfer/default.nix

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

58 lines
1.2 KiB
Nix
Raw Normal View History

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