2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, which
|
2021-06-28 23:13:55 +00:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "1.4.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "rhash";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhash";
|
|
|
|
repo = "RHash";
|
|
|
|
rev = "v${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
sha256 = "sha256-3CW41ULdXoID4cOgrcG2j85tgIJ/sz5hU7A83qpuxf4=";
|
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;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configurePlatforms = [ ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--ar=${stdenv.cc.targetPrefix}ar"
|
2022-05-18 14:49:53 +00:00
|
|
|
"--target=${stdenv.hostPlatform.config}"
|
2021-06-28 23:13:55 +00:00
|
|
|
(lib.enableFeature enableStatic "static")
|
|
|
|
(lib.enableFeature enableStatic "lib-static")
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkTarget = "test-full";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
installTargets = [
|
|
|
|
"install"
|
|
|
|
"install-lib-headers"
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals (!enableStatic) [
|
2021-12-06 16:07:01 +00:00
|
|
|
"install-lib-so-link"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://rhash.sourceforge.net/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Console utility and library for computing and verifying hash sums of files";
|
|
|
|
license = licenses.bsd0;
|
|
|
|
platforms = platforms.all;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ andrewrk ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|