spacefrogg-overlay/goredo/default.nix

47 lines
1.0 KiB
Nix

{ lib, fetchgit, buildGoPackage, texinfo }:
buildGoPackage rec {
pname = "goredo";
version = "1.0.0";
rev = version;
goPackagePath = "goredo";
src = fetchgit {
url = "git://git.cypherpunks.ru/goredo.git";
rev = "v${version}";
sha256 = "sha256-irWdhx5pfY3DUmwWS+L03Y2/M9KEpdtcrrbTzxQ9YJ4=";
};
goDeps = ./deps.nix;
nativeBuildInputs = [ texinfo ];
postBuild = ''
(
cd go/src/goredo/doc
echo '${version}' >../VERSION
sh ./goredo.info.do goredo.info goredo.info goredo.info
)
'';
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
)
'';
outputs = [ "out" "info" ];
meta = with lib; {
description = "DJB redo written in Go";
homepage = "https://www.goredo.cypherpunks.ru";
license = licenses.gpl3;
platforms = platforms.linux ++ platforms.darwin;
};
}