duplicati: 2.1.0.2 -> 2.1.0.5
This commit is contained in:
parent
19e4869241
commit
c8ca634107
@ -2,44 +2,70 @@
|
|||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
mono,
|
autoPatchelfHook,
|
||||||
sqlite,
|
gcc-unwrapped,
|
||||||
makeWrapper,
|
zlib,
|
||||||
|
lttng-ust_2_12,
|
||||||
|
icu,
|
||||||
|
openssl,
|
||||||
|
makeBinaryWrapper,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
_supportedPlatforms = {
|
||||||
|
"armv7l-linux" = "linux-arm7";
|
||||||
|
"x86_64-linux" = "linux-x64";
|
||||||
|
"aarch64-linux" = "linux-arm64";
|
||||||
|
};
|
||||||
|
_platform = _supportedPlatforms."${stdenv.hostPlatform.system}";
|
||||||
|
# nix hash convert --to sri "sha256:`nix-prefetch-url --unpack https://updates.duplicati.com/stable/duplicati-2.1.0.5_stable_2025-03-04-linux-arm64-cli.zip`"
|
||||||
|
_fileHashForSystem = {
|
||||||
|
"armv7l-linux" = "sha256-FQQ07M0rwvxNkHPW6iK5WBTKgFrZ4LOP4vgINfmtq4k=";
|
||||||
|
"x86_64-linux" = "sha256-1QspF/A3hOtqd8bVbSqClJIHUN9gBrd18J5qvZJLkQE=";
|
||||||
|
"aarch64-linux" = "sha256-mSNInaCkNf1MBZK2M42SjJnYRtB5SyGMvSGSn5oH1Cs=";
|
||||||
|
};
|
||||||
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
# TODO build duplicati from source https://github.com/duplicati/duplicati/blob/master/.github/workflows/build-packages.yml
|
||||||
pname = "duplicati";
|
pname = "duplicati";
|
||||||
version = "2.1.0.2";
|
version = "2.1.0.5";
|
||||||
channel = "beta";
|
channel = "stable";
|
||||||
build_date = "2024-11-29";
|
buildDate = "2025-03-04";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url =
|
url =
|
||||||
with finalAttrs;
|
with finalAttrs;
|
||||||
"https://github.com/duplicati/duplicati/releases/download/v${version}-${version}_${channel}_${build_date}/duplicati-${version}_${channel}_${build_date}.zip";
|
"https://updates.duplicati.com/stable/duplicati-${version}_${channel}_${buildDate}-${_platform}-cli.zip";
|
||||||
hash = "sha256-LmW6yGutxP33ghFqyOLKrGDNCQdr8DDFn/IHigsLpzA=";
|
hash = _fileHashForSystem."${stdenv.hostPlatform.system}";
|
||||||
stripRoot = false;
|
stripRoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [
|
||||||
|
autoPatchelfHook
|
||||||
|
makeBinaryWrapper
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
gcc-unwrapped
|
||||||
|
zlib
|
||||||
|
lttng-ust_2_12
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,share/duplicati-${finalAttrs.version}}
|
runHook preInstall
|
||||||
cp -r * $out/share/duplicati-${finalAttrs.version}
|
|
||||||
makeWrapper "${lib.getExe mono}" $out/bin/duplicati-cli \
|
mkdir -p $out/{bin,share}
|
||||||
--add-flags "$out/share/duplicati-${finalAttrs.version}/Duplicati.CommandLine.exe" \
|
cp -r * "$out/share/"
|
||||||
|
for file in $out/share/duplicati-*; do
|
||||||
|
makeBinaryWrapper "$file" "$out/bin/$(basename $file)" \
|
||||||
--prefix LD_LIBRARY_PATH : ${
|
--prefix LD_LIBRARY_PATH : ${
|
||||||
lib.makeLibraryPath [
|
lib.makeLibraryPath [
|
||||||
sqlite
|
icu
|
||||||
]
|
openssl
|
||||||
}
|
|
||||||
makeWrapper "${lib.getExe mono}" $out/bin/duplicati-server \
|
|
||||||
--add-flags "$out/share/duplicati-${finalAttrs.version}/Duplicati.Server.exe" \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${
|
|
||||||
lib.makeLibraryPath [
|
|
||||||
sqlite
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
done
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -51,6 +77,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
bot-wxt1221
|
bot-wxt1221
|
||||||
];
|
];
|
||||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
||||||
platforms = lib.platforms.all;
|
platforms = builtins.attrNames _supportedPlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user