nixpkgs/pkgs/by-name/go/goredo/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.2 KiB
Nix
Raw Normal View History

2021-10-15 13:37:21 +00:00
{ buildGoModule
, fetchurl
, lib
, zstd
, sharness
, python3
, perl
}:
buildGoModule rec {
pname = "goredo";
2023-12-20 05:49:26 +00:00
version = "2.6.0";
2021-10-15 13:37:21 +00:00
src = fetchurl {
url = "http://www.goredo.cypherpunks.ru/download/${pname}-${version}.tar.zst";
2023-12-20 05:49:26 +00:00
hash = "sha256-XTL/otfCKC55TsUBBVors2kgFpOFh+6oekOOafOhcUs=";
2021-10-15 13:37:21 +00:00
};
2023-11-27 12:53:25 +00:00
patches = [
# Adapt tests to Linux/nix-build requirements:
./fix-tests.diff
];
2021-10-15 13:37:21 +00:00
nativeBuildInputs = [ zstd ];
nativeCheckInputs = lib.optionals doCheck [ python3 perl ];
2021-10-15 13:37:21 +00:00
2023-03-11 16:13:46 +00:00
inherit (sharness) SHARNESS_TEST_SRCDIR;
2021-10-15 13:37:21 +00:00
vendorHash = null;
2021-10-15 13:37:21 +00:00
2023-03-11 16:13:46 +00:00
modRoot = "./src";
subPackages = [ "." ];
2021-10-15 13:37:21 +00:00
postBuild = ''
( cd $GOPATH/bin; ./goredo -symlinks )
cd ..
'';
doCheck = true;
checkPhase = ''
runHook preCheck
export PATH=$GOPATH/bin:$PATH
2023-03-11 16:13:46 +00:00
(cd t; prove -f .)
2021-10-15 13:37:21 +00:00
runHook postCheck
'';
postInstall = ''
mkdir -p "$out/share/info"
cp goredo.info "$out/share/info"
'';
outputs = [ "out" "info" ];
meta = with lib; {
2023-03-11 16:13:46 +00:00
outputsToInstall = [ "out" ];
2021-10-15 13:37:21 +00:00
description = "djb's redo, a system for building files from source files. Written in Go";
homepage = "https://www.goredo.cypherpunks.ru";
license = licenses.gpl3;
maintainers = [ maintainers.spacefrogg ];
};
}