depot/third_party/nixpkgs/pkgs/applications/misc/jotta-cli/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
1.1 KiB
Nix

{ stdenv, fetchzip }:
let
arch = "amd64";
in
stdenv.mkDerivation rec {
pname = "jotta-cli";
version = "0.6.24251";
src = fetchzip {
url = "https://repo.jotta.us/archives/linux/${arch}/jotta-cli-${version}_linux_${arch}.tar.gz";
sha256 = "0f26fg5fqpz0f6jxp72cj5f2kf76jah5iaqlqsl87250y0hm330g";
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
$out/bin/jotta-cli completion > $out/share/bash-completion/completions/jotta-cli.bash
'';
meta = with stdenv.lib; {
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" ];
};
}