forked from mirrors/nixpkgs
netrw: Allow to specify checksum hash library.
Within netrw the only checksum algorithm that is available is MD5. We thus make it possible for users to override this, so algorithms from other libraries such as OpenSSL and MHash can used.
This commit is contained in:
parent
8ded076ac0
commit
8bd81bc3d6
|
@ -1,9 +1,23 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl
|
||||
, checksumType ? "built-in"
|
||||
, libmhash ? null
|
||||
, openssl ? null
|
||||
}:
|
||||
|
||||
assert checksumType == "mhash" -> libmhash != null;
|
||||
assert checksumType == "openssl" -> openssl != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "netrw-${version}";
|
||||
version = "1.3.2";
|
||||
|
||||
configureFlags = [
|
||||
"--with-checksum=${checksumType}"
|
||||
];
|
||||
|
||||
buildInputs = stdenv.lib.optional (checksumType == "mhash") libmhash
|
||||
++ stdenv.lib.optional (checksumType == "openssl") openssl;
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://mamuti.net/files/netrw/netrw-${version}.tar.bz2"
|
||||
|
|
Loading…
Reference in a new issue