Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / jotta-cli / default.nix
blob972c4b94ada745749b18ed5fefda9f8c549a8906
1 { lib, stdenv, fetchzip }:
3 let
4   arch = "amd64";
5 in
6 stdenv.mkDerivation rec {
7   pname = "jotta-cli";
8   version = "0.15.93226";
9   src = fetchzip {
10       url = "https://repo.jotta.us/archives/linux/${arch}/jotta-cli-${version}_linux_${arch}.tar.gz";
11       sha256 = "sha256-RMN/OQHnHCx/xbi/J9LiK6m0TkPvd34GtmR6lr66pKs=";
12       stripRoot = false;
13     };
15   installPhase = ''
16     install -D usr/bin/jotta-cli usr/bin/jottad -t $out/bin/
17     mkdir -p $out/share/bash-completion/completions
18   '';
20   postFixup = ''
21     patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/bin/jotta-cli
22     patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/bin/jottad
23     $out/bin/jotta-cli completion bash > $out/share/bash-completion/completions/jotta-cli.bash
24   '';
26   meta = with lib; {
27     description  = "Jottacloud CLI";
28     homepage     = "https://www.jottacloud.com/";
29     downloadPage = "https://repo.jotta.us/archives/linux/";
30     maintainers  = with maintainers; [ evenbrenden ];
31     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
32     license      = licenses.unfree;
33     platforms    = [ "x86_64-linux" ];
34   };