Unverified Commit fcb22099 authored by Niklas Korz's avatar Niklas Korz Committed by GitHub
Browse files

legendsbrowser2: init at 2.0.10 (#450632)

parents ea87e591 0c594d35
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1644,6 +1644,14 @@
    githubId = 106511;
    name = "Andrew Kelley";
  };
  andrewzah = {
    name = "Andrew Zah";
    github = "andrewzah";
    githubId = 9789467;
    email = "nix@andrewzah.com";
    matrix = "@andrewzah:matrix.abare.party";
    keys = [ { fingerprint = "D87B D9DC F11B ACD6 CDB4 0CB2 1373 2FB1 3E61 E0BE"; } ];
  };
  Andy3153 = {
    name = "Andrei Dobrete";
    email = "andy3153@protonmail.com";
+45 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  buildGoModule,
  nix-update-script,
}:
buildGoModule (finalAttrs: {
  pname = "legendsbrowser2";
  version = "2.0.10";

  sourceRoot = "source/backend";
  src = fetchFromGitHub {
    owner = "robertjanetzko";
    repo = "LegendsBrowser2";
    tag = finalAttrs.version;
    hash = "sha256-wttBw3AKHkPCgoxnaxI8IZSPuw2xLoCK/9joAYFWPM8=";
  };
  vendorHash = "sha256-W7hc+U+rJZgXzcYoUHTG29j2xvJ/xTbBgDaiO7CVGnk=";

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    install -m 0755 $GOPATH/bin/backend $out/bin/legendsbrowser2

    runHook postInstall
  '';

  ldflags = [
    "-s"
    "-w"
    "-X main.Version=${finalAttrs.version}"
  ];

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

  meta = {
    description = "Multi-platform, open source, legends viewer for dwarf fortress 0.47 written in go";
    homepage = "https://github.com/robertjanetzko/LegendsBrowser2";
    changelog = "https://github.com/robertjanetzko/LegendsBrowser2/releases/tag/${finalAttrs.version}";
    mainProgram = "legendsbrowser2";
    maintainers = [ lib.maintainers.andrewzah ];
    license = lib.licenses.mit;
  };
})