2021-08-31 12:02:36 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-11-19 02:44:45 +01:00
|
|
|
, fetchpatch
|
2021-08-31 12:02:36 +02:00
|
|
|
, which
|
2021-06-11 21:20:57 +02:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
}:
|
2014-08-21 00:42:50 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-31 12:02:36 +02:00
|
|
|
version = "1.4.2";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "rhash";
|
2014-08-21 00:42:50 +02:00
|
|
|
|
2018-02-05 15:43:27 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhash";
|
|
|
|
repo = "RHash";
|
2018-09-18 23:51:41 +02:00
|
|
|
rev = "v${version}";
|
2021-08-31 12:02:36 +02:00
|
|
|
sha256 = "sha256-HkDgWwHoRWCNtWyfP4sj3veEd+KT5J7yL4J4Z/hJcrE=";
|
2014-08-21 00:42:50 +02:00
|
|
|
};
|
|
|
|
|
2021-11-20 03:45:11 +01:00
|
|
|
patches = [
|
2021-11-19 02:44:45 +01:00
|
|
|
# Fix clang configuration; remove with next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rhash/RHash/commit/4dc506066cf1727b021e6352535a8bb315c3f8dc.patch";
|
|
|
|
sha256 = "0i5jz2s37h278c8d36pzphhp8rjy660zmhpg2cqlp960f6ny8wwj";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-02-05 15:43:27 +01:00
|
|
|
nativeBuildInputs = [ which ];
|
2017-06-13 21:37:24 +02:00
|
|
|
|
2018-02-05 15:43:27 +01:00
|
|
|
# configure script is not autotools-based, doesn't support these options
|
2021-06-11 21:20:57 +02:00
|
|
|
dontAddStaticConfigureFlags = true;
|
2021-08-31 12:02:36 +02:00
|
|
|
|
2018-02-05 15:43:27 +01:00
|
|
|
configurePlatforms = [ ];
|
2021-08-31 12:02:36 +02:00
|
|
|
|
2021-06-11 21:20:57 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--ar=${stdenv.cc.targetPrefix}ar"
|
|
|
|
(lib.enableFeature enableStatic "static")
|
|
|
|
(lib.enableFeature enableStatic "lib-static")
|
|
|
|
];
|
2014-08-21 00:42:50 +02:00
|
|
|
|
2019-02-04 08:43:00 +01:00
|
|
|
doCheck = true;
|
2018-04-25 05:20:18 +02:00
|
|
|
|
2019-02-04 08:47:53 +01:00
|
|
|
checkTarget = "test-full";
|
|
|
|
|
2021-08-31 12:02:36 +02:00
|
|
|
installTargets = [
|
|
|
|
"install"
|
|
|
|
"install-lib-headers"
|
|
|
|
] ++ lib.optional (!enableStatic) [
|
|
|
|
"install-lib-so-link"
|
|
|
|
];
|
2015-06-17 09:55:16 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-12-21 17:52:50 +01:00
|
|
|
homepage = "http://rhash.sourceforge.net/";
|
2015-06-17 09:55:16 +02:00
|
|
|
description = "Console utility and library for computing and verifying hash sums of files";
|
2019-12-21 17:52:50 +01:00
|
|
|
license = licenses.bsd0;
|
2017-06-13 17:17:03 +02:00
|
|
|
platforms = platforms.all;
|
2021-08-31 12:02:36 +02:00
|
|
|
maintainers = with maintainers; [ andrewrk ];
|
2014-08-21 00:42:50 +02:00
|
|
|
};
|
|
|
|
}
|