From 8ded076ac0ff9a76d870d75befb53dbb9d9cf5ce Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 20 Jul 2012 01:45:49 +0200 Subject: [PATCH 1/3] Add new package netrw, version 1.3.2. The upstream URL unfortunately wasn't available at this time, so I provided an alternate mirror. I checksummed the file against the hashes from various distributions in order to make sure it's the right one. --- pkgs/tools/networking/netrw/default.nix | 19 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/tools/networking/netrw/default.nix diff --git a/pkgs/tools/networking/netrw/default.nix b/pkgs/tools/networking/netrw/default.nix new file mode 100644 index 000000000000..c90546393598 --- /dev/null +++ b/pkgs/tools/networking/netrw/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "netrw-${version}"; + version = "1.3.2"; + + src = fetchurl { + urls = [ + "http://mamuti.net/files/netrw/netrw-${version}.tar.bz2" + "http://www.sourcefiles.org/Networking/FTP/Other/netrw-${version}.tar.bz2" + ]; + sha256 = "1gnl80i5zkyj2lpnb4g0q0r5npba1x6cnafl2jb3i3pzlfz1bndr"; + }; + + meta = { + description = "A simple tool for transporting data over the network."; + homepage = "http://mamuti.net/netrw/index.en.html"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 64d2b986cc1c..46ee8c6bbbc9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1120,6 +1120,8 @@ let netpbm = callPackage ../tools/graphics/netpbm { }; + netrw = callPackage ../tools/networking/netrw { }; + netselect = callPackage ../tools/networking/netselect { }; networkmanager = callPackage ../tools/networking/network-manager { }; From 8bd81bc3d6191b8176f95dd68e9013bc8e02704a Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 20 Jul 2012 01:49:47 +0200 Subject: [PATCH 2/3] 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. --- pkgs/tools/networking/netrw/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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" From 172f29cc3cd39f4a3ef5bad0d7cb072b08573c02 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 21 Jul 2012 13:39:55 +0200 Subject: [PATCH 3/3] netrw: Add missing license to meta attributes. --- pkgs/tools/networking/netrw/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/networking/netrw/default.nix b/pkgs/tools/networking/netrw/default.nix index eb03377fc52f..23ff6ddba55a 100644 --- a/pkgs/tools/networking/netrw/default.nix +++ b/pkgs/tools/networking/netrw/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { meta = { description = "A simple tool for transporting data over the network."; + license = stdenv.lib.licenses.gpl2; homepage = "http://mamuti.net/netrw/index.en.html"; }; }