0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

jotta-cli: 0.15.107955 -> 0.16.129390 (#388203)

This commit is contained in:
Arne Keller 2025-03-09 16:51:36 +01:00 committed by GitHub
commit e67d838d93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,40 +3,45 @@
stdenv,
fetchzip,
nixosTests,
installShellFiles,
}:
let
arch = "amd64";
in
stdenv.mkDerivation rec {
pname = "jotta-cli";
version = "0.15.107955";
version = "0.16.129390";
src = fetchzip {
url = "https://repo.jotta.us/archives/linux/${arch}/jotta-cli-${version}_linux_${arch}.tar.gz";
sha256 = "sha256-qCG3yi0ACmqOnn+gaCN8GedciUobpOww50Kz5AdknqU=";
url = "https://repo.jotta.us/archives/linux/amd64/jotta-cli-${version}_linux_amd64.tar.gz";
hash = "sha256-iw8OZ6clpK+CnBFNK5jOSGQ3ReU4pnOQSJFE2LTJNxE=";
stripRoot = false;
};
installPhase = ''
install -D usr/bin/jotta-cli usr/bin/jottad -t $out/bin/
mkdir -p $out/share/bash-completion/completions
'';
nativeBuildInputs = [ installShellFiles ];
postFixup = ''
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/bin/jotta-cli
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/bin/jottad
$out/bin/jotta-cli completion bash > $out/share/bash-completion/completions/jotta-cli.bash
'';
installPhase =
''
runHook preInstall
install -Dm0755 usr/bin/jotta-cli usr/bin/jottad -t $out/bin/
runHook postInstall
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd jotta-cli \
--bash <($out/bin/jotta-cli completion bash) \
--fish <($out/bin/jotta-cli completion fish) \
--zsh <($out/bin/jotta-cli completion zsh)
'';
passthru.tests = { inherit (nixosTests) jotta-cli; };
meta = with lib; {
meta = {
description = "Jottacloud CLI";
homepage = "https://www.jottacloud.com/";
downloadPage = "https://repo.jotta.us/archives/linux/";
maintainers = with maintainers; [ evenbrenden ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with lib.maintainers; [ evenbrenden ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
};
}