<commit_before>{ stdenv, fetchFromGitHub, python, deepin-gtk-theme,
  deepin-icon-theme, deepin-sound-theme, deepin-wallpapers, gnome3,
  deepin }:

stdenv.mkDerivation rec {
  name = "${pname}-${version}";
  pname = "deepin-desktop-schemas";
  version = "3.4.0";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = pname;
    rev = version;
    sha256 = "10x0rh9z925yzyp8h0vgmg4313smvran06lvr12c3931qkmkzwgq";
  };

  nativeBuildInputs = [
    python
  ];

  buildInputs = [
    gnome3.dconf
    deepin-gtk-theme
    deepin-icon-theme
    deepin-sound-theme
    deepin-wallpapers
  ];

  postPatch = ''
    # fix default background url
    sed -i '/picture-uri/s|/usr/share/backgrounds/default_background.jpg|$out/share/backgrounds/deepin/default.png|' \
      overrides/common/com.deepin.wrap.gnome.desktop.override
  '';

  makeFlags = [ "PREFIX=$(out)" ];

  passthru.updateScript = deepin.updateScript { inherit name; };<commit_msg>deepin.deepin-desktop-schemas: 3.4.0 -> 3.13.0<commit_after>{ stdenv, fetchFromGitHub, python3, gnome3, glib, deepin-gtk-theme,
  deepin-icon-theme, deepin-sound-theme, deepin-wallpapers, deepin }:

stdenv.mkDerivation rec {
  name = "${pname}-${version}";
  pname = "deepin-desktop-schemas";
  version = "3.13.0";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = pname;
    rev = version;
    sha256 = "0bamjcpmsl8xhw3ksgl11wv5xwcdhrkl1namikfzc4an03sk1rdq";
  };

  nativeBuildInputs = [
    python3
    glib.dev
    deepin.setupHook
  ];

  buildInputs = [
    gnome3.dconf
    deepin-gtk-theme
    deepin-icon-theme
    deepin-sound-theme
    deepin-wallpapers
  ];

  postPatch = ''
    searchHardCodedPaths

    # fix default background url
    sed -i -e 's,/usr/share/backgrounds/default_background.jpg,/usr/share/backgrounds/deepin/desktop.jpg,' \
      overrides/common/com.deepin.wrap.gnome.desktop.override
      
    fixPath ${deepin-wallpapers} /usr/share/backgrounds \
      overrides/common/com.deepin.wrap.gnome.desktop.override

    fixPath ${deepin-wallpapers} /usr/share/wallpapers/deepin \
      schemas/com.deepin.dde.appearance.gschema.xml

    # still hardcoded paths:
    #   /etc/gnome-settings-daemon/xrandr/monitors.xml                                ? gnome3.gnome-settings-daemon
    #   /usr/share/backgrounds/gnome/adwaita-lock.jpg                                 ? gnome3.gnome-backgrounds
    #   /usr/share/backgrounds/gnome/adwaita-timed.xml                                gnome3.gnome-backgrounds
    #   /usr/share/desktop-directories
  '';

  makeFlags = [ "PREFIX=${placeholder ''out''}" ];

  doCheck = true;
  checkTarget = "test";

  postInstall = ''
    glib-compile-schemas --strict $out/share/glib-2.0/schemas
    searchHardCodedPaths $out
  '';

  passthru.updateScript = deepin.updateScript { inherit name; };
{'fraction_non_alphanumeric': 0.130450194966324, 'fraction_numerical': 0.022332506203473945, 'mean_word_length': 2.8342391304347827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3135612', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1002, 'n_words': 138}