github.com/status-im/status-go@v1.1.0/nix/pkgs/codecov-cli/default.nix (about)

     1  { lib, stdenv, fetchurl }:
     2  
     3  let
     4    platform = lib.getAttr builtins.currentSystem {
     5      aarch64-linux = "linux-arm64";
     6      x86_64-linux = "linux";
     7      aarch64-darwin = "macos"; # There's no arm64 build for macOS, amd64 works on both
     8      x86_64-darwin = "macos";
     9    };
    10  
    11  in stdenv.mkDerivation rec {
    12    pname = "codecov";
    13    version = "0.7.4";
    14  
    15    src = fetchurl {
    16      url = "https://cli.codecov.io/v${version}/${platform}/codecov";
    17      hash = lib.getAttr builtins.currentSystem {
    18        aarch64-darwin = "sha256-CB1D8/zYF23Jes9sd6rJiadDg7nwwee9xWSYqSByAlU=";
    19        x86_64-linux = "sha256-65AgCcuAD977zikcE1eVP4Dik4L0PHqYzOO1fStNjOw=";
    20        aarch64-linux = "sha256-hALtVSXY40uTIaAtwWr7EXh7zclhK63r7a341Tn+q/g=";
    21      };
    22     };
    23  
    24    dontUnpack = true;
    25    stripDebug = false;
    26    dontStrip = true; # This is to prevent `Could not load PyInstaller's embedded PKG archive from the executable` error
    27  
    28    installPhase = ''
    29      runHook preInstall
    30      install -D $src $out/bin/codecov
    31      chmod +x $out/bin/codecov
    32      runHook postInstall
    33    '';
    34  
    35    meta = with lib; {
    36      description = "Codecov CLI tool to upload coverage reports";
    37      homepage = "https://docs.codecov.com/docs/the-codecov-cli";
    38      license = licenses.asl20;
    39      mainProgram = "codecov";
    40      platforms = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
    41    };
    42  }