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 }: { buildGoModule, fetchurl, lib, zstd }:
buildGoPackage rec {
buildGoModule rec {
pname = "goredo"; pname = "goredo";
version = "1.0.0"; version = "1.4.1";
rev = version;
goPackagePath = "goredo"; src = fetchurl {
url = "http://www.goredo.cypherpunks.ru/download/${pname}-${version}.tar.zst";
src = fetchgit { sha256 = "Wc+QIrkrsGA35KeI2UmYOUiyU78ItPQGCKpZO/vndxM=";
url = "git://git.cypherpunks.ru/goredo.git";
rev = "v${version}";
sha256 = "sha256-irWdhx5pfY3DUmwWS+L03Y2/M9KEpdtcrrbTzxQ9YJ4=";
}; };
goDeps = ./deps.nix; nativeBuildInputs = [ zstd ];
nativeBuildInputs = [ texinfo ]; vendorSha256 = null;
subPackages = [ "." ];
postBuild = ''
(
cd go/src/goredo/doc
echo '${version}' >../VERSION
sh ./goredo.info.do goredo.info goredo.info goredo.info
)
'';
postPatch = "cd src";
postInstall = '' postInstall = ''
mkdir -p "$out/share/info" mkdir -p "$out/share/info"
cp go/src/goredo/doc/goredo.info "$out/share/info" cp ../goredo.info "$out/share/info"
( ( cd $out/bin; ./goredo -symlinks )
cd $out/bin
for f in redo redo-{always,cleanup,dot,ifchange,ifcreate,log,stamp,whichdo}; do
ln -s goredo $f
done
)
''; '';
outputs = [ "out" "info" ]; outputs = [ "out" "info" ];
meta = with lib; { 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"; homepage = "https://www.goredo.cypherpunks.ru";
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.linux ++ platforms.darwin; platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.spacefrogg ];
}; };
} }