diff options
Diffstat (limited to 'accounts')
| -rw-r--r-- | accounts/gkleen@sif/default.nix | 2 | ||||
| -rw-r--r-- | accounts/gkleen@sif/utils/ldif2json/conf.patch | 12 | ||||
| -rw-r--r-- | accounts/gkleen@sif/utils/ldif2json/default.nix | 20 |
3 files changed, 33 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 36b722e4..5a4521a8 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
| @@ -511,7 +511,7 @@ in { | |||
| 511 | nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts | 511 | nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts |
| 512 | swtpm (hunspell.withDicts (dicts: with dicts; [en_GB-large de_DE])) | 512 | swtpm (hunspell.withDicts (dicts: with dicts; [en_GB-large de_DE])) |
| 513 | libation libqalculate | 513 | libation libqalculate |
| 514 | ] ++ mapAttrsToList (_name: pkg: pkgs.callPackage pkg {}) (customUtils.nixImport { dir = ./utils; }); | 514 | ] ++ mapAttrsToList (_name: pkg: pkgs.callPackage pkg { inherit sources; }) (customUtils.nixImport { dir = ./utils; }); |
| 515 | 515 | ||
| 516 | file = { | 516 | file = { |
| 517 | ".backup-munin".source = ./backup-patterns; | 517 | ".backup-munin".source = ./backup-patterns; |
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 @@ | |||
| 1 | diff --git i/src/conf.cr w/src/conf.cr | ||
| 2 | index 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 }: | ||
| 2 | crystal.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 | } | ||
