5 , enableStatic ? stdenv.hostPlatform.isStatic
9 stdenv.mkDerivation rec {
13 src = fetchFromGitHub {
17 sha256 = "sha256-3CW41ULdXoID4cOgrcG2j85tgIJ/sz5hU7A83qpuxf4=";
20 patches = [ ./dont-fail-ln.patch ./do-link-so.patch ];
22 nativeBuildInputs = [ which ];
23 buildInputs = lib.optionals stdenv.hostPlatform.isFreeBSD [ gettext ];
25 # configure script is not autotools-based, doesn't support these options
26 dontAddStaticConfigureFlags = true;
28 configurePlatforms = [ ];
31 "--ar=${stdenv.cc.targetPrefix}ar"
32 "--target=${stdenv.hostPlatform.config}"
33 (lib.enableFeature enableStatic "static")
34 (lib.enableFeature enableStatic "lib-static")
39 checkTarget = "test-full";
44 ] ++ lib.optionals (!enableStatic) [
49 homepage = "https://rhash.sourceforge.net/";
50 description = "Console utility and library for computing and verifying hash sums of files";
51 license = licenses.bsd0;
52 platforms = platforms.all;
53 maintainers = with maintainers; [ andrewrk ];