goredo: Use pre-packaged tarball and buildGoModule; update to 1.4.1

master
Michael Raitza 2021-05-10 12:52:25 +02:00
parent f9f817e189
commit d8c58b12e5
1 changed files with 15 additions and 28 deletions

View File

@ -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 ];
};
}