diff --git a/goredo/default.nix b/goredo/default.nix index e09d29d..3d66406 100644 --- a/goredo/default.nix +++ b/goredo/default.nix @@ -1,46 +1,33 @@ -{ lib, fetchgit, buildGoPackage, texinfo }: -buildGoPackage rec { +{ buildGoModule, fetchurl, lib, zstd }: + +buildGoModule rec { pname = "goredo"; - version = "1.0.0"; - rev = version; + version = "1.4.1"; - goPackagePath = "goredo"; - - src = fetchgit { - url = "git://git.cypherpunks.ru/goredo.git"; - rev = "v${version}"; - sha256 = "sha256-irWdhx5pfY3DUmwWS+L03Y2/M9KEpdtcrrbTzxQ9YJ4="; + src = fetchurl { + url = "http://www.goredo.cypherpunks.ru/download/${pname}-${version}.tar.zst"; + sha256 = "Wc+QIrkrsGA35KeI2UmYOUiyU78ItPQGCKpZO/vndxM="; }; - goDeps = ./deps.nix; + nativeBuildInputs = [ zstd ]; - nativeBuildInputs = [ texinfo ]; - - postBuild = '' - ( - cd go/src/goredo/doc - echo '${version}' >../VERSION - sh ./goredo.info.do goredo.info goredo.info goredo.info - ) - ''; + vendorSha256 = null; + subPackages = [ "." ]; + postPatch = "cd src"; postInstall = '' mkdir -p "$out/share/info" - cp go/src/goredo/doc/goredo.info "$out/share/info" - ( - cd $out/bin - for f in redo redo-{always,cleanup,dot,ifchange,ifcreate,log,stamp,whichdo}; do - ln -s goredo $f - done - ) + cp ../goredo.info "$out/share/info" + ( cd $out/bin; ./goredo -symlinks ) ''; outputs = [ "out" "info" ]; meta = with lib; { - description = "DJB redo written in Go"; + 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 ]; }; }