From 90b80ea4592afea19aae6b2adc14ec6194e5ffbc Mon Sep 17 00:00:00 2001 From: ChUrl Date: Mon, 15 Aug 2022 14:46:33 +0200 Subject: [PATCH] add find-gsettings-schemas script --- .../dconf-editor-wrapped/find-gsettings-schemas.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 derivations/dconf-editor-wrapped/find-gsettings-schemas.nix diff --git a/derivations/dconf-editor-wrapped/find-gsettings-schemas.nix b/derivations/dconf-editor-wrapped/find-gsettings-schemas.nix new file mode 100644 index 00000000..a6511cdf --- /dev/null +++ b/derivations/dconf-editor-wrapped/find-gsettings-schemas.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +pkgs.writeShellScriptBin "find-gsettings-schemas" '' + schemas="" + for d in $(ls -1 --ignore "*.drv" /nix/store); do + schemas_dir=$(echo /nix/store/"$d"/share/gsettings-schemas/*) + if [[ -d "$schemas_dir" ]]; then + schemas="$schemas''${schemas:+:}$schemas_dir" + fi + done + + echo "$schemas" +'' \ No newline at end of file