Unverified Commit eabe8d3e authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #273182 from afh/update-got

got: 0.94 -> 0.95, cleanup
parents 9c4e1299 d7bcf97d
Loading
Loading
Loading
Loading
+21 −10
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl
, pkg-config, openssl, libbsd, libevent, libuuid, libossp_uuid, libmd, zlib, ncurses, bison
{ lib
, stdenv
, fetchurl
, pkg-config
, openssl
, libbsd
, libevent
, libuuid
, libossp_uuid
, libmd
, zlib
, ncurses
, bison
, autoPatchelfHook
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "got";
  version = "0.94";
  version = "0.95";

  src = fetchurl {
    url = "https://gameoftrees.org/releases/portable/got-portable-${version}.tar.gz";
    hash = "sha256-hG0/a+sk6uZCxR908YfZCW44qx/SIwwGO9mUaxxHZ3k=";
    url = "https://gameoftrees.org/releases/portable/got-portable-${finalAttrs.version}.tar.gz";
    hash = "sha256-5on9ff76OAFmoaKTwVM0hUCGLiAZGJzt6+jCx2Nygg4=";
  };

  nativeBuildInputs = [ pkg-config bison ]
@@ -21,7 +32,7 @@ stdenv.mkDerivation rec {
  configureFlags = [ "--enable-gotd" ];

  preConfigure = lib.optionalString stdenv.isDarwin ''
    # The configure script assumes dependencies on Darwin are install via
    # The configure script assumes dependencies on Darwin are installed via
    # Homebrew or MacPorts and hardcodes assumptions about the paths of
    # dependencies which fails the nixpkgs configurePhase.
    substituteInPlace configure --replace 'xdarwin' 'xhomebrew'
@@ -38,7 +49,7 @@ stdenv.mkDerivation rec {

  installCheckPhase = ''
    runHook preInstallCheck
    test "$($out/bin/got --version)" = '${pname} ${version}'
    test "$($out/bin/got --version)" = "${finalAttrs.pname} ${finalAttrs.version}"
    runHook postInstallCheck
  '';

@@ -59,4 +70,4 @@ stdenv.mkDerivation rec {
    platforms = platforms.linux ++ platforms.darwin;
    maintainers = with maintainers; [ abbe afh ];
  };
}
})