blackbox: 1.20181219 -> 2.0.0 and enable tests
This commit is contained in:
parent
d50a16f414
commit
f46d15905d
@ -1,18 +1,56 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, expect
|
||||||
|
, which
|
||||||
|
, gnupg
|
||||||
|
, coreutils
|
||||||
|
, git
|
||||||
|
, pinentry
|
||||||
|
, gnutar
|
||||||
|
, procps
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.20181219";
|
|
||||||
pname = "blackbox";
|
pname = "blackbox";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "stackexchange";
|
owner = "stackexchange";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1lpwwwc3rf992vdf3iy1ds07n1xkmad065im2bqzc6kdsbkn7rjx";
|
sha256 = "1plwdmzds6dq2rlp84dgiashrfg0kg4yijhnxaapz2q4d1vvx8lq";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs = [ gnupg ];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
expect
|
||||||
|
which
|
||||||
|
coreutils
|
||||||
|
pinentry.tty
|
||||||
|
git
|
||||||
|
gnutar
|
||||||
|
procps
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs bin tools
|
||||||
|
substituteInPlace Makefile \
|
||||||
|
--replace "PREFIX?=/usr/local" "PREFIX=$out"
|
||||||
|
|
||||||
|
substituteInPlace tools/confidence_test.sh \
|
||||||
|
--replace 'PATH="''${blackbox_home}:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:/usr/pkg/bin:/usr/pkg/gnu/bin:''${blackbox_home}"' \
|
||||||
|
"PATH=/build/source/bin/:$PATH"
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin && cp -r bin/* $out/bin
|
runHook preInstall
|
||||||
|
mkdir -p $out/bin
|
||||||
|
make copy-install
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user