1{ stdenv, fetchurl
2, checksumType ? "built-in"
3, libmhash ? null
4, openssl ? null
5}:
6
7assert checksumType == "mhash" -> libmhash != null;
8assert checksumType == "openssl" -> openssl != null;
9
10stdenv.mkDerivation rec {
11 name = "netrw-${version}";
12 version = "1.3.2";
13
14 configureFlags = [
15 "--with-checksum=${checksumType}"
16 ];
17
18 buildInputs = stdenv.lib.optional (checksumType == "mhash") libmhash
19 ++ stdenv.lib.optional (checksumType == "openssl") openssl;
20
21 src = fetchurl {
22 urls = [
23 "http://mamuti.net/files/netrw/netrw-${version}.tar.bz2"
24 "http://www.sourcefiles.org/Networking/FTP/Other/netrw-${version}.tar.bz2"
25 ];
26 sha256 = "1gnl80i5zkyj2lpnb4g0q0r5npba1x6cnafl2jb3i3pzlfz1bndr";
27 };
28
29 meta = {
30 description = "Simple tool for transporting data over the network";
31 license = stdenv.lib.licenses.gpl2;
32 homepage = "http://mamuti.net/netrw/index.en.html";
33 };
34}