1 { lib, stdenvNoCC, fetchurl, makeWrapper, perlPackages }:
3 stdenvNoCC.mkDerivation rec {
8 url = "https://repos.fusiondirectory.org/sources/schema2ldif/schema2ldif-${version}.tar.gz";
9 hash = "sha256-KmXdqVuINUnJ6EF5oKgk6BsT3h5ebVqss7aCl3pPjQE=";
13 # Removes the root check and changes the temporary location
14 # from the nix store to $PWD
16 -e '/You have to run this script as root/d' \
17 -e 's|/\^(\.\*)\\\.schema\$/|/.*\\/(.*)\\.schema$/|g' \
18 bin/ldap-schema-manager
21 buildInputs = [ perlPackages.perl ];
22 nativeBuildInputs = [ makeWrapper ];
25 mkdir -p $out/bin $out/share/man/man1
27 cp bin/{schema2ldif,ldap-schema-manager} $out/bin
28 gzip -c man/schema2ldif.1 > $out/share/man/man1/schema2ldif.1.gz
29 gzip -c man/ldap-schema-manager.1 > $out/share/man/man1/ldap-schema-manager.1.gz
31 wrapProgram $out/bin/schema2ldif \
32 --prefix PERL5PATH : "${perlPackages.makePerlPath [ perlPackages.GetoptLong ]}"
36 description = "Utilities to manage schema in .schema and .ldif format";
37 homepage = "https://www.fusiondirectory.org/schema2ldif-project-and-components/";
38 license = licenses.bsd3;
39 platforms = platforms.unix;
40 maintainers = with maintainers; [ das_j ];