Unverified Commit 7ad57dac authored by aviac's avatar aviac
Browse files

codeberg-cli: 0.3.5 -> 0.4.0

Also reformat and update to `finalAttrs` style
parent b172a41a
Loading
Loading
Loading
Loading
+47 −37
Original line number Diff line number Diff line
{ lib
, CoreServices
, Security
, fetchFromGitea
, installShellFiles
, openssl
, pkg-config
, rustPlatform
, stdenv
{
  lib,
  CoreServices,
  Security,
  fetchFromGitea,
  installShellFiles,
  openssl,
  pkg-config,
  rustPlatform,
  stdenv,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (
  finalAttrs: {
    pname = "codeberg-cli";
  version = "0.3.5";
    version = "0.4.0";

    src = fetchFromGitea {
      domain = "codeberg.org";
      owner = "RobWalt";
      repo = "codeberg-cli";
    rev = "v${version}";
    hash = "sha256-KjH78yqfZoN24TBYyFZuxf7z9poRov0uFYQ8+eq9p/o=";
      rev = "v${finalAttrs.version}";
      hash = "sha256-g5V3Noqh7Y9v/t/dt7n45/NblqNtpZCKELPc9DOkb8A=";
    };

  cargoHash = "sha256-RE4Zwa5vUWPc42w5GaaYkS6fLIbges1fAsOUuwqR2ag=";
  nativeBuildInputs = [ pkg-config installShellFiles ];
    cargoHash = "sha256-zTg/3PcFWzBmKZA7lRIpM3P03d1qpNVBczqWFbnxpic=";
    nativeBuildInputs = [
      pkg-config
      installShellFiles
    ];

  buildInputs = [ openssl ]
    ++ lib.optionals stdenv.isDarwin [ CoreServices Security ];
    buildInputs =
      [ openssl ]
      ++ lib.optionals stdenv.isDarwin [
        CoreServices
        Security
      ];

    postInstall = ''
      installShellCompletion --cmd berg \
@@ -41,3 +50,4 @@ rustPlatform.buildRustPackage rec {
      mainProgram = "berg";
    };
  }
)