spacefrogg-overlay/goredo/default.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

2021-05-10 15:41:21 +02:00
{ buildGoModule, fetchurl, lib, zstd
, sharness, python3, perl }:
buildGoModule rec {
pname = "goredo";
2021-10-22 16:52:56 +02:00
version = "1.17.0";
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-05-10 15:41:21 +02:00
patches = [ ./fix-tests.diff ];
nativeBuildInputs = [ zstd ] ++ lib.optionals doCheck [ python3 perl ];
SHARNESS_TEST_SRCDIR = sharness + "/share/sharness";
vendorSha256 = null;
subPackages = [ "." ];
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
'';
postInstall = ''
mkdir -p "$out/share/info"
2021-05-10 15:41:21 +02:00
cp goredo.info "$out/share/info"
'';
outputs = [ "out" "info" ];
meta = with lib; {
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 ];
};
}