Commit 554d906c authored by Defelo's avatar Defelo Committed by Masum Reza
Browse files

termshot: use finalAttrs pattern

parent 629494c1
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -5,14 +5,15 @@
  versionCheckHook,
  nix-update-script,
}:
buildGoModule rec {

buildGoModule (finalAttrs: {
  pname = "termshot";
  version = "0.4.1";

  src = fetchFromGitHub {
    owner = "homeport";
    repo = "termshot";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-vkxOUo1RyzZBN2+wRn8yWV930HrKRJnPwpHnxza5GNE=";
  };

@@ -21,7 +22,7 @@ buildGoModule rec {
  ldflags = [
    "-s"
    "-w"
    "-X github.com/homeport/termshot/internal/cmd.version=${version}"
    "-X github.com/homeport/termshot/internal/cmd.version=${finalAttrs.version}"
  ];

  checkFlags = [ "-skip=^TestPtexec$" ];
@@ -35,9 +36,9 @@ buildGoModule rec {
  meta = {
    description = "Creates screenshots based on terminal command output";
    homepage = "https://github.com/homeport/termshot";
    changelog = "https://github.com/homeport/termshot/releases/tag/v${version}";
    changelog = "https://github.com/homeport/termshot/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ defelo ];
    mainProgram = "termshot";
  };
}
})