2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
arch = "amd64";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jotta-cli";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "0.13.55213";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://repo.jotta.us/archives/linux/${arch}/jotta-cli-${version}_linux_${arch}.tar.gz";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-u5DmpKvmgTqwtXLFMdz0dhtPc/2rzEX492OKxyFBqzY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D usr/bin/jotta-cli usr/bin/jottad -t $out/bin/
|
|
|
|
mkdir -p $out/share/bash-completion/completions
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
2021-06-28 23:13:55 +00:00
|
|
|
$out/bin/jotta-cli completion bash > $out/share/bash-completion/completions/jotta-cli.bash
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Jottacloud CLI";
|
|
|
|
homepage = "https://www.jottacloud.com/";
|
|
|
|
downloadPage = "https://repo.jotta.us/archives/linux/";
|
|
|
|
maintainers = with maintainers; [ evenbrenden ];
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|