2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
2024-05-15 15:35:15 +00:00
|
|
|
, libressl
|
2024-01-13 08:15:51 +00:00
|
|
|
, libbsd
|
|
|
|
, libevent
|
|
|
|
, libuuid
|
|
|
|
, libossp_uuid
|
|
|
|
, libmd
|
|
|
|
, zlib
|
|
|
|
, ncurses
|
|
|
|
, bison
|
2023-03-24 00:07:29 +00:00
|
|
|
, autoPatchelfHook
|
2024-05-15 15:35:15 +00:00
|
|
|
, testers
|
2022-09-14 18:05:37 +00:00
|
|
|
}:
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-10-04 12:37:57 +00:00
|
|
|
pname = "got";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.100";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-01-13 08:15:51 +00:00
|
|
|
url = "https://gameoftrees.org/releases/portable/got-portable-${finalAttrs.version}.tar.gz";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-/DqKIGf/aZ09aL/rB7te+AauHmJ+mOTrVEbkqT9WUBI=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
nativeBuildInputs = [ pkg-config bison ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
buildInputs = [ libressl libbsd libevent libuuid libmd zlib ncurses ]
|
2024-01-13 08:15:51 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ libossp_uuid ];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
preConfigure = lib.optionalString stdenv.isDarwin ''
|
2024-01-13 08:15:51 +00:00
|
|
|
# The configure script assumes dependencies on Darwin are installed via
|
2022-09-14 18:05:37 +00:00
|
|
|
# Homebrew or MacPorts and hardcodes assumptions about the paths of
|
|
|
|
# dependencies which fails the nixpkgs configurePhase.
|
2024-04-21 15:54:59 +00:00
|
|
|
substituteInPlace configure --replace-fail 'xdarwin' 'xhomebrew'
|
2022-09-14 18:05:37 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
|
|
|
|
# error: conflicting types for 'strmode'
|
|
|
|
"-DHAVE_STRMODE=1"
|
|
|
|
# Undefined symbols for architecture arm64: "_bsd_getopt"
|
|
|
|
"-include getopt.h"
|
|
|
|
]);
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
};
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
meta = {
|
|
|
|
changelog = "https://gameoftrees.org/releases/CHANGES";
|
2024-05-15 15:35:15 +00:00
|
|
|
description = "Version control system which prioritizes ease of use and simplicity over flexibility";
|
2021-10-04 12:37:57 +00:00
|
|
|
longDescription = ''
|
|
|
|
Game of Trees (Got) is a version control system which prioritizes
|
|
|
|
ease of use and simplicity over flexibility.
|
|
|
|
|
|
|
|
Got uses Git repositories to store versioned data. Git can be used
|
|
|
|
for any functionality which has not yet been implemented in
|
|
|
|
Got. It will always remain possible to work with both Got and Git
|
|
|
|
on the same repository.
|
|
|
|
'';
|
|
|
|
homepage = "https://gameoftrees.org";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = lib.licenses.isc;
|
|
|
|
maintainers = with lib.maintainers; [ abbe afh ];
|
|
|
|
mainProgram = "got";
|
|
|
|
platforms = with lib.platforms; darwin ++ linux;
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
2024-01-13 08:15:51 +00:00
|
|
|
})
|