{ buildGoModule, fetchurl, lib, zstd , sharness, python3, perl }: buildGoModule rec { pname = "goredo"; version = "1.13.0"; src = fetchurl { url = "http://www.goredo.cypherpunks.ru/download/${pname}-${version}.tar.zst"; sha256 = "ky46yG6rvyr6tpzQqmsTc2PgcynYWqq3BvZp+9mbxRc="; }; patches = [ ./fix-tests.diff ]; nativeBuildInputs = [ zstd ] ++ lib.optionals doCheck [ python3 perl ]; SHARNESS_TEST_SRCDIR = sharness + "/share/sharness"; vendorSha256 = null; subPackages = [ "." ]; preBuild = "cd src"; postBuild = '' ( cd $GOPATH/bin; ./goredo -symlinks ) cd .. ''; doCheck = true; checkPhase = '' export PATH=$GOPATH/bin:$PATH prove -f ''; postInstall = '' mkdir -p "$out/share/info" cp goredo.info "$out/share/info" ''; outputs = [ "out" "info" ]; meta = with lib; { description = "djb's redo, a system for building files from source files. Written in Go"; homepage = "https://www.goredo.cypherpunks.ru"; license = licenses.gpl3; platforms = platforms.linux ++ platforms.darwin; maintainers = [ maintainers.spacefrogg ]; }; }