2021-08-31 10:02:36 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, which
|
2021-06-11 19:20:57 +00:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2014-08-20 22:42:50 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-07-17 18:04:11 +00:00
|
|
|
version = "1.4.4";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "rhash";
|
2014-08-20 22:42:50 +00:00
|
|
|
|
2018-02-05 14:43:27 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhash";
|
|
|
|
repo = "RHash";
|
2018-09-18 21:51:41 +00:00
|
|
|
rev = "v${version}";
|
2023-07-17 18:04:11 +00:00
|
|
|
sha256 = "sha256-3CW41ULdXoID4cOgrcG2j85tgIJ/sz5hU7A83qpuxf4=";
|
2014-08-20 22:42:50 +00:00
|
|
|
};
|
|
|
|
|
2018-02-05 14:43:27 +00:00
|
|
|
nativeBuildInputs = [ which ];
|
2017-06-13 19:37:24 +00:00
|
|
|
|
2018-02-05 14:43:27 +00:00
|
|
|
# configure script is not autotools-based, doesn't support these options
|
2021-06-11 19:20:57 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
2021-08-31 10:02:36 +00:00
|
|
|
|
2018-02-05 14:43:27 +00:00
|
|
|
configurePlatforms = [ ];
|
2021-08-31 10:02:36 +00:00
|
|
|
|
2021-06-11 19:20:57 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--ar=${stdenv.cc.targetPrefix}ar"
|
2022-05-09 07:09:13 +00:00
|
|
|
"--target=${stdenv.hostPlatform.config}"
|
2021-06-11 19:20:57 +00:00
|
|
|
(lib.enableFeature enableStatic "static")
|
|
|
|
(lib.enableFeature enableStatic "lib-static")
|
|
|
|
];
|
2014-08-20 22:42:50 +00:00
|
|
|
|
2019-02-04 07:43:00 +00:00
|
|
|
doCheck = true;
|
2018-04-25 03:20:18 +00:00
|
|
|
|
2019-02-04 07:47:53 +00:00
|
|
|
checkTarget = "test-full";
|
|
|
|
|
2021-08-31 10:02:36 +00:00
|
|
|
installTargets = [
|
|
|
|
"install"
|
|
|
|
"install-lib-headers"
|
2022-10-06 16:38:53 +00:00
|
|
|
] ++ lib.optionals (!enableStatic) [
|
2021-08-31 10:02:36 +00:00
|
|
|
"install-lib-so-link"
|
|
|
|
];
|
2015-06-17 07:55:16 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://rhash.sourceforge.net/";
|
2015-06-17 07:55:16 +00:00
|
|
|
description = "Console utility and library for computing and verifying hash sums of files";
|
2019-12-21 16:52:50 +00:00
|
|
|
license = licenses.bsd0;
|
2017-06-13 15:17:03 +00:00
|
|
|
platforms = platforms.all;
|
2021-08-31 10:02:36 +00:00
|
|
|
maintainers = with maintainers; [ andrewrk ];
|
2014-08-20 22:42:50 +00:00
|
|
|
};
|
|
|
|
}
|