summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/utils/ldif2json
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/utils/ldif2json')
-rw-r--r--accounts/gkleen@sif/utils/ldif2json/conf.patch12
-rw-r--r--accounts/gkleen@sif/utils/ldif2json/default.nix20
2 files changed, 32 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/utils/ldif2json/conf.patch b/accounts/gkleen@sif/utils/ldif2json/conf.patch
new file mode 100644
index 00000000..e253e5f7
--- /dev/null
+++ b/accounts/gkleen@sif/utils/ldif2json/conf.patch
@@ -0,0 +1,12 @@
1diff --git i/src/conf.cr w/src/conf.cr
2index b29ca84..eb7e0b4 100644
3--- i/src/conf.cr
4+++ w/src/conf.cr
5@@ -89,7 +89,6 @@ module Ldif2json
6
7 end.parse
8
9- puts "@coercions #{@coercions.inspect} @can_be_coerced #{@can_be_coerced.inspect} @can_be_coerced[\"foobar\"] #{@can_be_coerced["foobar"].inspect} @can_be_flattened #{@can_be_flattened.inspect} @can_be_flattened[\"foobar\"] #{@can_be_flattened["foobar"].inspect}"
10 raise NormalError.new("cannot set types in join mode") if @mode == Mode::Join && @coercions.size > 0
11
12 end
diff --git a/accounts/gkleen@sif/utils/ldif2json/default.nix b/accounts/gkleen@sif/utils/ldif2json/default.nix
new file mode 100644
index 00000000..35aef717
--- /dev/null
+++ b/accounts/gkleen@sif/utils/ldif2json/default.nix
@@ -0,0 +1,20 @@
1{ crystal, sources }:
2crystal.buildCrystalPackage {
3 inherit (sources.ldif2json) pname version src;
4
5 patches = [
6 ./conf.patch
7 ];
8
9 buildPhase = ''
10 make bin/ldif2json
11 '';
12
13 installPhase = ''
14 mkdir -p $out/bin $out/share/man/man1
15 install -m 0555 -t $out/bin bin/ldif2json
16 install -m 0444 -t $out/share/man/man1 doc/ldif2json.1.gz
17 '';
18
19 doCheck = false;
20}