diff options
author | aszlig <aszlig@redmoonstudios.org> | 2012-07-20 01:49:47 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2012-07-20 01:49:47 +0200 |
commit | 8bd81bc3d6191b8176f95dd68e9013bc8e02704a (patch) | |
tree | 1cef49ad8a716b86f4be858a577769e2e434af70 /pkgs/tools/networking/netrw/default.nix | |
parent | 8ded076ac0ff9a76d870d75befb53dbb9d9cf5ce (diff) | |
download | nixlib-8bd81bc3d6191b8176f95dd68e9013bc8e02704a.tar nixlib-8bd81bc3d6191b8176f95dd68e9013bc8e02704a.tar.gz nixlib-8bd81bc3d6191b8176f95dd68e9013bc8e02704a.tar.bz2 nixlib-8bd81bc3d6191b8176f95dd68e9013bc8e02704a.tar.lz nixlib-8bd81bc3d6191b8176f95dd68e9013bc8e02704a.tar.xz nixlib-8bd81bc3d6191b8176f95dd68e9013bc8e02704a.tar.zst nixlib-8bd81bc3d6191b8176f95dd68e9013bc8e02704a.zip |
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.
Diffstat (limited to 'pkgs/tools/networking/netrw/default.nix')
-rw-r--r-- | pkgs/tools/networking/netrw/default.nix | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/tools/networking/netrw/default.nix b/pkgs/tools/networking/netrw/default.nix index c90546393598..eb03377fc52f 100644 --- a/pkgs/tools/networking/netrw/default.nix +++ b/pkgs/tools/networking/netrw/default.nix @@ -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" |