Unverified Commit 8ad69ecd authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

docuum: update build to use `finalAttrs:` idiom (#462948)

parents 6f17142e fb881e53
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -2,16 +2,18 @@
  lib,
  rustPlatform,
  fetchFromGitHub,
  nix-update-script,
  versionCheckHook,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "docuum";
  version = "0.25.1";

  src = fetchFromGitHub {
    owner = "stepchowfun";
    repo = "docuum";
    rev = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-fc+qEDYQGRxOSfFng3/K3xYWb8mKTuuKWanQS+/UIMo=";
  };

@@ -22,12 +24,18 @@ rustPlatform.buildRustPackage rec {
    "--skip=format::tests::code_str_display"
  ];

  meta = with lib; {
  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "--version";

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Least recently used (LRU) eviction of Docker images";
    homepage = "https://github.com/stepchowfun/docuum";
    changelog = "https://github.com/stepchowfun/docuum/blob/${src.rev}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ mkg20001 ];
    changelog = "https://github.com/stepchowfun/docuum/blob/v${finalAttrs.version}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ mkg20001 ];
    mainProgram = "docuum";
  };
}
})