2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, which
|
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "rhash";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhash";
|
|
|
|
repo = "RHash";
|
|
|
|
rev = "v${version}";
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "sha256-kmi1FtJYPBUdMfJlzEsQkTwcYB99isP3yzH1EYlk54g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ which ];
|
|
|
|
|
|
|
|
# configure script is not autotools-based, doesn't support these options
|
2021-06-28 23:13:55 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
configurePlatforms = [ ];
|
2021-06-28 23:13:55 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--ar=${stdenv.cc.targetPrefix}ar"
|
|
|
|
(lib.enableFeature enableStatic "static")
|
|
|
|
(lib.enableFeature enableStatic "lib-static")
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkTarget = "test-full";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
installTargets = [ "install" "install-lib-headers" ]
|
|
|
|
++ lib.optional (!enableStatic) "install-lib-so-link";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://rhash.sourceforge.net/";
|
|
|
|
description = "Console utility and library for computing and verifying hash sums of files";
|
|
|
|
license = licenses.bsd0;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.andrewrk ];
|
|
|
|
};
|
|
|
|
}
|