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
69 lines
2.2 KiB
Nix
69 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
makeWrapper,
|
|
versionCheckHook,
|
|
}:
|
|
let
|
|
os = if stdenv.hostPlatform.isDarwin then "macos" else "linux";
|
|
arch = if stdenv.hostPlatform.isAarch64 then "aarch64" else "x86_64";
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "clouddrive2";
|
|
version = "0.9.8";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/cloud-fs/cloud-fs.github.io/releases/download/v${finalAttrs.version}/clouddrive-2-${os}-${arch}-${finalAttrs.version}.tgz";
|
|
hash =
|
|
{
|
|
x86_64-linux = "sha256-dla1Mp+frV12v+OkGJwwcTfUKRcWy47tXYx6nWpHMhk=";
|
|
aarch64-linux = "sha256-GjR0zLGLvfZJMQgq9Hq3NQp7Y8QSXU4kW9cUIe5MxyM=";
|
|
x86_64-darwin = "sha256-pQjLwahjtw+lgLJbRpgGM4lbAfZCDtgJSVcqS6TDwug=";
|
|
aarch64-darwin = "sha256-by4reE2OH1Qz+Wn40QMVNZm2JsJHkoZ05OZZEnxGChI=";
|
|
}
|
|
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
mkdir -p $out/opt/clouddrive2
|
|
cp -r wwwroot "$out/opt/clouddrive2/wwwroot"
|
|
cp -r clouddrive "$out/opt/clouddrive2/clouddrive"
|
|
makeWrapper $out/opt/clouddrive2/clouddrive $out/bin/clouddrive
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
nativeInstallCheckPhaseInputs = [ versionCheckHook ];
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
meta = {
|
|
homepage = "https://www.clouddrive2.com";
|
|
changelog = "https://github.com/cloud-fs/cloud-fs.github.io/releases/tag/v${finalAttrs.version}";
|
|
description = "Multi-cloud drives management tool supporting mounting cloud drives locally";
|
|
longDescription = ''
|
|
CloudDrive is a powerful multi-cloud drive management tool that provides a multi-cloud
|
|
drive solution that includes local mounting of cloud drives. It supports lots of cloud
|
|
drives in China.
|
|
'';
|
|
mainProgram = "clouddrive";
|
|
license = lib.licenses.unfree;
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
maintainers = with lib.maintainers; [ ltrump ];
|
|
};
|
|
})
|