1 { lib, stdenv, fetchurl
2 , pkg-config, openssl, libbsd, libevent, libuuid, libossp_uuid, libmd, zlib, ncurses, bison
6 stdenv.mkDerivation rec {
11 url = "https://gameoftrees.org/releases/portable/got-portable-${version}.tar.gz";
12 hash = "sha256-wlcnJr7f3Bd9SEgrKiPlr7pTSjaRj47qwktI2jepINE=";
15 nativeBuildInputs = [ pkg-config bison ]
16 ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
18 buildInputs = [ openssl libbsd libevent libuuid libmd zlib ncurses ]
19 ++ lib.optionals stdenv.isDarwin [ libossp_uuid ];
21 configureFlags = [ "--enable-gotd" ];
23 preConfigure = lib.optionalString stdenv.isDarwin ''
24 # The configure script assumes dependencies on Darwin are install via
25 # Homebrew or MacPorts and hardcodes assumptions about the paths of
26 # dependencies which fails the nixpkgs configurePhase.
27 substituteInPlace configure --replace 'xdarwin' 'xhomebrew'
30 env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
31 # error: conflicting types for 'strmode'
33 # Undefined symbols for architecture arm64: "_bsd_getopt"
37 doInstallCheck = true;
39 installCheckPhase = ''
40 runHook preInstallCheck
41 test "$($out/bin/got --version)" = '${pname} ${version}'
42 runHook postInstallCheck
46 description = "A version control system which prioritizes ease of use and simplicity over flexibility";
48 Game of Trees (Got) is a version control system which prioritizes
49 ease of use and simplicity over flexibility.
51 Got uses Git repositories to store versioned data. Git can be used
52 for any functionality which has not yet been implemented in
53 Got. It will always remain possible to work with both Got and Git
54 on the same repository.
56 homepage = "https://gameoftrees.org";
57 changelog = "https://gameoftrees.org/releases/CHANGES";
58 license = licenses.isc;
59 platforms = platforms.linux ++ platforms.darwin;
60 maintainers = with maintainers; [ abbe afh ];