Files
nixpkgs/pkgs/by-name/ps/psitransfer/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.4 KiB
Nix

{
lib,
buildNpmPackage,
fetchFromGitHub,
pkg-config,
vips,
}:
buildNpmPackage (finalAttrs: {
pname = "psitransfer";
version = "2.3.0";
src = fetchFromGitHub {
owner = "psi-4ward";
repo = "psitransfer";
tag = "v${finalAttrs.version}";
hash = "sha256-XUEvR8dWwFBbZdwVM8PQnYBc17SvGF5uO04vb/nAR2A=";
};
npmDepsHash = "sha256-BZpd/fsuV77uj2bGZcqBpIuOq3YlUw2bxovOfu8b9iE=";
app = buildNpmPackage {
pname = "psitransfer-app";
inherit (finalAttrs) version src;
npmDepsHash = "sha256-zEGYv6TaHzgPCB3mHP2UMh8VkFqSBdrLuP5KjuEU0p8=";
postPatch = ''
# https://github.com/psi-4ward/psitransfer/pull/284
touch public/app/.npmignore
cd app
'';
installPhase = ''
cp -r ../public/app $out
'';
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
vips # for 'sharp' dependency
];
postPatch = ''
rm -r public/app
cp -r ${finalAttrs.app} public/app
'';
dontBuild = true;
passthru.updateScript = ./update.sh;
meta = {
description = "Simple open source self-hosted file sharing solution";
homepage = "https://github.com/psi-4ward/psitransfer";
changelog = "https://github.com/psi-4ward/psitransfer/releases/tag/v${finalAttrs.version}";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ hyshka ];
mainProgram = "psitransfer";
};
})