psitransfer: 2.2.0 -> 2.3.0, add updateScript, modernize (#429226)

This commit is contained in:
Sandro
2025-08-03 23:13:56 +02:00
committed by GitHub
2 changed files with 26 additions and 16 deletions
+18 -16
View File
@@ -6,20 +6,24 @@
vips,
}:
let
buildNpmPackage (finalAttrs: {
pname = "psitransfer";
version = "2.2.0";
version = "2.3.0";
src = fetchFromGitHub {
owner = "psi-4ward";
repo = "psitransfer";
rev = "v${version}";
hash = "sha256-5o4QliAXgSZekIy0CNWfEuOxNl0uetL8C8RKUJ8HsNA=";
tag = "v${finalAttrs.version}";
hash = "sha256-XUEvR8dWwFBbZdwVM8PQnYBc17SvGF5uO04vb/nAR2A=";
};
app = buildNpmPackage {
pname = "${pname}-app";
inherit version src;
npmDepsHash = "sha256-q7E+osWIf6VZ3JvxCXoZYeF28aMgmKP6EzQkksUUjeY=";
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
@@ -31,11 +35,6 @@ let
cp -r ../public/app $out
'';
};
in
buildNpmPackage {
inherit pname version src;
npmDepsHash = "sha256-EW/Fej58LE/nbJomPtWvEjDveAUdo0jIWwC+ziN0gy0=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
@@ -44,16 +43,19 @@ buildNpmPackage {
postPatch = ''
rm -r public/app
cp -r ${app} public/app
cp -r ${finalAttrs.app} public/app
'';
dontBuild = true;
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://github.com/psi-4ward/psitransfer";
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";
};
}
})
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
set -euo pipefail
nix-update psitransfer --src-only --version-regex='^v(\d+\.\d+\.\d+)$'
nix-update psitransfer.app --version=skip
nix-update psitransfer --version=skip