{ buildGoModule, fetchurl, lib, zstd , sharness, python3, perl }: buildGoModule rec { pname = "goredo"; version = "1.4.1"; src = fetchurl { url = "http://www.goredo.cypherpunks.ru/download/${pname}-${version}.tar.zst"; sha256 = "Wc+QIrkrsGA35KeI2UmYOUiyU78ItPQGCKpZO/vndxM="; }; 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 ]; }; }