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

authored by Sandro and committed by GitHub 84e1e2e0 77a52192

+25 -15
+17 -15
pkgs/by-name/ps/psitransfer/package.nix
··· 6 vips, 7 }: 8 9 - let 10 pname = "psitransfer"; 11 - version = "2.2.0"; 12 src = fetchFromGitHub { 13 owner = "psi-4ward"; 14 repo = "psitransfer"; 15 - rev = "v${version}"; 16 - hash = "sha256-5o4QliAXgSZekIy0CNWfEuOxNl0uetL8C8RKUJ8HsNA="; 17 }; 18 app = buildNpmPackage { 19 - pname = "${pname}-app"; 20 - inherit version src; 21 22 - npmDepsHash = "sha256-q7E+osWIf6VZ3JvxCXoZYeF28aMgmKP6EzQkksUUjeY="; 23 24 postPatch = '' 25 # https://github.com/psi-4ward/psitransfer/pull/284 ··· 31 cp -r ../public/app $out 32 ''; 33 }; 34 - in 35 - buildNpmPackage { 36 - inherit pname version src; 37 - 38 - npmDepsHash = "sha256-EW/Fej58LE/nbJomPtWvEjDveAUdo0jIWwC+ziN0gy0="; 39 40 nativeBuildInputs = [ pkg-config ]; 41 buildInputs = [ ··· 44 45 postPatch = '' 46 rm -r public/app 47 - cp -r ${app} public/app 48 ''; 49 50 dontBuild = true; 51 52 meta = { 53 - homepage = "https://github.com/psi-4ward/psitransfer"; 54 description = "Simple open source self-hosted file sharing solution"; 55 license = lib.licenses.bsd2; 56 maintainers = with lib.maintainers; [ hyshka ]; 57 mainProgram = "psitransfer"; 58 }; 59 - }
··· 6 vips, 7 }: 8 9 + buildNpmPackage (finalAttrs: { 10 pname = "psitransfer"; 11 + version = "2.3.0"; 12 + 13 src = fetchFromGitHub { 14 owner = "psi-4ward"; 15 repo = "psitransfer"; 16 + tag = "v${finalAttrs.version}"; 17 + hash = "sha256-XUEvR8dWwFBbZdwVM8PQnYBc17SvGF5uO04vb/nAR2A="; 18 }; 19 + 20 + npmDepsHash = "sha256-BZpd/fsuV77uj2bGZcqBpIuOq3YlUw2bxovOfu8b9iE="; 21 + 22 app = buildNpmPackage { 23 + pname = "psitransfer-app"; 24 + inherit (finalAttrs) version src; 25 26 + npmDepsHash = "sha256-zEGYv6TaHzgPCB3mHP2UMh8VkFqSBdrLuP5KjuEU0p8="; 27 28 postPatch = '' 29 # https://github.com/psi-4ward/psitransfer/pull/284 ··· 35 cp -r ../public/app $out 36 ''; 37 }; 38 39 nativeBuildInputs = [ pkg-config ]; 40 buildInputs = [ ··· 43 44 postPatch = '' 45 rm -r public/app 46 + cp -r ${finalAttrs.app} public/app 47 ''; 48 49 dontBuild = true; 50 51 + passthru.updateScript = ./update.sh; 52 + 53 meta = { 54 description = "Simple open source self-hosted file sharing solution"; 55 + homepage = "https://github.com/psi-4ward/psitransfer"; 56 + changelog = "https://github.com/psi-4ward/psitransfer/releases/tag/v${finalAttrs.version}"; 57 license = lib.licenses.bsd2; 58 maintainers = with lib.maintainers; [ hyshka ]; 59 mainProgram = "psitransfer"; 60 }; 61 + })
+8
pkgs/by-name/ps/psitransfer/update.sh
···
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p nix-update 3 + 4 + set -euo pipefail 5 + 6 + nix-update psitransfer --src-only --version-regex='^v(\d+\.\d+\.\d+)$' 7 + nix-update psitransfer.app --version=skip 8 + nix-update psitransfer --version=skip