diff options
author | Janne Heß <janne@hess.ooo> | 2022-10-04 13:31:23 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2022-10-04 13:31:23 +0200 |
commit | 7527505f0be45af148e864a51b0430446cda1a24 (patch) | |
tree | f520e1dccc2da85dc6f821c7e67b871473679cbb /pkgs/tools/text | |
parent | d0637e1a25b7aa04a123d98cff471420d84aa1fe (diff) |
schema2ldif: Fix ldap-schema-manager not working
Also minor package fixes to clean it up.
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r-- | pkgs/tools/text/schema2ldif/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/tools/text/schema2ldif/default.nix b/pkgs/tools/text/schema2ldif/default.nix index 84196ae111979..fc4a2153d662d 100644 --- a/pkgs/tools/text/schema2ldif/default.nix +++ b/pkgs/tools/text/schema2ldif/default.nix @@ -1,14 +1,23 @@ -{ lib, stdenv, fetchurl, makeWrapper, perlPackages }: +{ lib, stdenvNoCC, fetchurl, makeWrapper, perlPackages }: -stdenv.mkDerivation rec { +stdenvNoCC.mkDerivation rec { pname = "schema2ldif"; version = "1.3"; src = fetchurl { url = "https://repos.fusiondirectory.org/sources/schema2ldif/schema2ldif-${version}.tar.gz"; - sha256 = "00cd9xx9g0mnnfn5lvay3vg166z84jla0ya1x34ljdc8bflxsr9a"; + hash = "sha256-KmXdqVuINUnJ6EF5oKgk6BsT3h5ebVqss7aCl3pPjQE="; }; + postPatch = '' + # Removes the root check and changes the temporary location + # from the nix store to $PWD + sed -i \ + -e '/You have to run this script as root/d' \ + -e 's|/\^(\.\*)\\\.schema\$/|/.*\\/(.*)\\.schema$/|g' \ + bin/ldap-schema-manager + ''; + buildInputs = [ perlPackages.perl ]; nativeBuildInputs = [ makeWrapper ]; |