diff --git a/pkgs/tools/networking/smbldaptools/default.nix b/pkgs/tools/networking/smbldaptools/default.nix new file mode 100644 index 000000000000..962799117a05 --- /dev/null +++ b/pkgs/tools/networking/smbldaptools/default.nix @@ -0,0 +1,31 @@ +{stdenv, fetchurl, perl, NetLDAP, makeWrapper, CryptSmbHash, DigestSHA1}: + +let + version = "0.9.7"; +in +stdenv.mkDerivation { + name = "smbldap-tools-${version}"; + src = fetchurl { + url = "http://download.gna.org/smbldap-tools/sources/${version}/smbldap-tools-${version}.tar.gz"; + sha256 = "0y1k2j5qjxy66yvl36adbp9m1brapiz9ycaisdyy6093xvw1nh7j"; + }; + + buildInputs = [ perl NetLDAP makeWrapper CryptSmbHash DigestSHA1 ]; + + preConfigure = '' + export configureFlags="$configureFlags --with-perl-libdir=$out/lib/perl5/site_perl" + ''; + + postInstall = '' + for i in $out/sbin/*; do + wrapProgram $i \ + --prefix PERL5LIB : $PERL5LIB:$out/lib/perl5/site_perl + done + ''; + + meta = { + homepage = http://gna.org/projects/smbldap-tools/; + description = "SAMBA LDAP tools"; + license = "GPLv2+"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 428dd0415889..44d44f080e06 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1345,6 +1345,10 @@ let smartmontools = callPackage ../tools/system/smartmontools { }; + smbldaptools = callPackage ../tools/networking/smbldaptools { + inherit (perlPackages) NetLDAP CryptSmbHash DigestSHA1; + }; + smbnetfs = callPackage ../tools/filesystems/smbnetfs {}; fusesmb = callPackage ../tools/filesystems/fusesmb { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index a73e8193817b..8b5912318204 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -836,6 +836,14 @@ rec { }; }; + ConvertASN1 = buildPerlPackage rec { + name = "Convert-ASN1-0.22"; + src = fetchurl { + url = "mirror://cpan/authors/id/G/GB/GBARR/Convert-ASN1-0.22.tar.gz"; + sha256 = "1vpny8smwl23rai1kxngi5i31jhp6s6cdls19gjhcwsxf76daqxy"; + }; + }; + constant = buildPerlPackage { name = "constant-1.15"; src = fetchurl { @@ -922,6 +930,14 @@ rec { }; }; + CryptSmbHash = buildPerlPackage rec { + name = "Crypt-SmbHash-0.12"; + src = fetchurl { + url = "mirror://cpan/authors/id/B/BJ/BJKUIT/Crypt-SmbHash-0.12.tar.gz"; + sha256 = "0dxivcqmabkhpz5xzph6rzl8fvq9xjy26b2ci77pv5gsmdzari38"; + }; + }; + CryptSSLeay = buildPerlPackage rec { name = "Crypt-SSLeay-0.57"; src = fetchurl { @@ -2537,6 +2553,15 @@ rec { }; }; + NetLDAP = buildPerlPackage { + name = "Net-LDAP-0.43"; + propagatedBuildInputs = [ ConvertASN1 ]; + src = fetchurl { + url = mirror://cpan/authors/id/G/GB/GBARR/perl-ldap-0.43.tar.gz; + sha256 = "0ak7393zs8ps6r6in5ilr9l1mzxxh529jr768sjzx4273p7li3m0"; + }; + }; + NetServer = buildPerlPackage rec { name = "Net-Server-0.99"; src = fetchurl {