nixpkgs/pkgs/tools/security/rhash/default.nix

60 lines
1.4 KiB
Nix
Raw Normal View History

2021-08-31 10:02:36 +00:00
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
2021-08-31 10:02:36 +00:00
, which
2021-06-11 19:20:57 +00:00
, enableStatic ? stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
2021-08-31 10:02:36 +00:00
version = "1.4.2";
pname = "rhash";
src = fetchFromGitHub {
owner = "rhash";
repo = "RHash";
rev = "v${version}";
2021-08-31 10:02:36 +00:00
sha256 = "sha256-HkDgWwHoRWCNtWyfP4sj3veEd+KT5J7yL4J4Z/hJcrE=";
};
patches = [
# Fix clang configuration; remove with next release
(fetchpatch {
url = "https://github.com/rhash/RHash/commit/4dc506066cf1727b021e6352535a8bb315c3f8dc.patch";
sha256 = "0i5jz2s37h278c8d36pzphhp8rjy660zmhpg2cqlp960f6ny8wwj";
})
];
nativeBuildInputs = [ which ];
# 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
configurePlatforms = [ ];
2021-08-31 10:02:36 +00:00
2021-06-11 19:20:57 +00:00
configureFlags = [
"--ar=${stdenv.cc.targetPrefix}ar"
(lib.enableFeature enableStatic "static")
(lib.enableFeature enableStatic "lib-static")
];
doCheck = true;
checkTarget = "test-full";
2021-08-31 10:02:36 +00:00
installTargets = [
"install"
"install-lib-headers"
] ++ lib.optional (!enableStatic) [
"install-lib-so-link"
];
2015-06-17 07:55:16 +00:00
meta = with lib; {
homepage = "http://rhash.sourceforge.net/";
2015-06-17 07:55:16 +00:00
description = "Console utility and library for computing and verifying hash sums of files";
license = licenses.bsd0;
platforms = platforms.all;
2021-08-31 10:02:36 +00:00
maintainers = with maintainers; [ andrewrk ];
};
}