depot/third_party/nixpkgs/pkgs/applications/networking/synology-cloud-sync-decryption-tool/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

44 lines
1.5 KiB
Nix

{ lib, writeScript, qt5, fetchurl, autoPatchelfHook }:
qt5.mkDerivation rec {
pname = "synology-cloud-sync-decryption-tool";
version = "027";
src = fetchurl {
url = "https://global.download.synology.com/download/Utility/SynologyCloudSyncDecryptionTool/${version}/Linux/x86_64/SynologyCloudSyncDecryptionTool-${version}_x64.tar.gz";
sha256 = "sha256-EWxADvkfhnMwHIauJj3pH6SvSkkrc4cwAhsf1pWOOWQ=";
};
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp $NIX_BUILD_TOP/SynologyCloudSyncDecryptionTool $out/bin
runHook postInstall
'';
passthru.updateScript = writeScript "update-synology-cloud-sync-decryption-tool" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts
set -euo pipefail
version="$(curl -s https://www.synology.com/en-uk/releaseNote/SynologyCloudSyncDecryptionTool \
| grep -oP '(?<=data-version=")\d+' \
| head -1)"
update-source-version synology-cloud-sync-decryption-tool "$version"
'';
meta = with lib; {
description = "Desktop tool to decrypt data encrypted by Cloud Sync";
homepage = "https://kb.synology.com/en-global/DSM/help/SynologyCloudSyncDecryptionTool/synologycloudsyncdecryptiontool";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ kalbasit ];
platforms = [ "x86_64-linux" ];
mainProgram = "SynologyCloudSyncDecryptionTool";
};
}