aboutsummaryrefslogblamecommitdiff
path: root/pkgs/sapi/default.nix
blob: f48d48809f1d431aadfc288de6898c0eadda1edb (plain) (tree)
1
2
3
4
5
6
7
8
9





           
   
                     
             

                                                                                                                   
                                                                     


      

                         

                  
                  



                                                   














                                           
                                     

    
{
  stdenv,
  fetchurl,
  lib,
  ...
}:
let
  version = "1.2.10";
  sources = {
    aarch64-darwin = {
      url = "https://artifactory.rbx.com:443/artifactory/generic-rbx-local/sapi-cli/darwin-arm64/v${version}/sapi";
      sha256 = "sha256-PQJuwCGEx7Yn92oTYFWqhTWmcHBSnWBMQLUZpx81VIQ=";
    };
  };
in
stdenv.mkDerivation rec {
  pname = "sapi";
  inherit version;

  src = fetchurl {
    inherit (sources.${stdenv.hostPlatform.system})
      url
      sha256
      ;
  };

  installPhase = ''
    mkdir -p $out/bin
    cp $src $out/bin/sapi
    chmod +x $out/bin/sapi
  '';

  dontUnpack = true;
  dontStrip = true;

  meta = with lib; {
    description = "sapi command-line tool";
    homepage = "https://go/sapi";
    license = licenses.unfree;
    platforms = [ "aarch64-darwin" ];
  };
}