2021-05-10 15:41:21 +02:00
|
|
|
{ buildGoModule, fetchurl, lib, zstd
|
|
|
|
, sharness, python3, perl }:
|
2021-01-17 19:33:00 +01:00
|
|
|
|
2021-05-10 12:52:25 +02:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "goredo";
|
2021-10-22 16:52:56 +02:00
|
|
|
version = "1.17.0";
|
2021-01-17 19:33:00 +01:00
|
|
|
|
2021-05-10 12:52:25 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.goredo.cypherpunks.ru/download/${pname}-${version}.tar.zst";
|
2021-10-22 16:52:56 +02:00
|
|
|
sha256 = "kQWtNRytzjetXJlNx6M0hiwSacN95erlpZt7Iji9/x0=";
|
2021-01-17 19:33:00 +01:00
|
|
|
};
|
|
|
|
|
2021-05-10 15:41:21 +02:00
|
|
|
patches = [ ./fix-tests.diff ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ zstd ] ++ lib.optionals doCheck [ python3 perl ];
|
|
|
|
SHARNESS_TEST_SRCDIR = sharness + "/share/sharness";
|
2021-01-17 19:33:00 +01:00
|
|
|
|
2021-05-10 12:52:25 +02:00
|
|
|
vendorSha256 = null;
|
|
|
|
subPackages = [ "." ];
|
2021-01-17 19:33:00 +01:00
|
|
|
|
2021-05-10 15:41:21 +02:00
|
|
|
preBuild = "cd src";
|
2021-07-02 18:46:47 +02:00
|
|
|
|
2021-05-10 15:41:21 +02:00
|
|
|
postBuild = ''
|
|
|
|
( cd $GOPATH/bin; ./goredo -symlinks )
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
export PATH=$GOPATH/bin:$PATH
|
|
|
|
prove -f
|
|
|
|
'';
|
|
|
|
|
2021-01-17 19:33:00 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/info"
|
2021-05-10 15:41:21 +02:00
|
|
|
cp goredo.info "$out/share/info"
|
2021-01-17 19:33:00 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "info" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-05-10 12:52:25 +02:00
|
|
|
description = "djb's redo, a system for building files from source files. Written in Go";
|
2021-01-17 19:33:00 +01:00
|
|
|
homepage = "https://www.goredo.cypherpunks.ru";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2021-05-10 12:52:25 +02:00
|
|
|
maintainers = [ maintainers.spacefrogg ];
|
2021-01-17 19:33:00 +01:00
|
|
|
};
|
|
|
|
}
|