<commit_before>{ stdenv, lib, fontconfig, zlib, libGL, glib, pango
, gdk-pixbuf, freetype, atk, cairo, libsForQt5, xorg
, sqlite, taglib, nss, nspr, cups, dbus, alsaLib
, libpulseaudio, deepin, qt5, harfbuzz, p11-kit
, libgpgerror, libudev0-shim, makeWrapper, dpkg, fetchurl }:
let
  rpath = lib.makeLibraryPath [
    fontconfig.lib
    zlib
    stdenv.cc.cc.lib
    libGL
    glib
    pango
    gdk-pixbuf
    freetype
    atk
    cairo
    libsForQt5.vlc
    sqlite
    taglib
    nss
    nspr
    cups.lib
    dbus.lib
    alsaLib
    libpulseaudio
    xorg.libX11
    xorg.libXext
    xorg.libXtst
    xorg.libXdamage
    xorg.libXScrnSaver
    xorg.libxcb
    xorg.libXi
    deepin.qcef
    qt5.qtwebchannel
    qt5.qtbase
    qt5.qtx11extras
    qt5.qtdeclarative
    harfbuzz
    p11-kit
    libgpgerror
  ];   

  runtimeLibs = lib.makeLibraryPath [ libudev0-shim ];

in stdenv.mkDerivation rec {
  pname = "netease-cloud-music";
  version = "1.2.0";
  src = fetchurl {
    url    = "http://d1.music.126.net/dmusic/netease-cloud-music_1.2.0_amd64_deepin_stable_20190424.deb";
    sha256 = "0hg8jqim77vd0fmk8gfbz2fmlj99byxcm9jn70xf7vk1sy7wp6h1";
    curlOpts = "-A 'Mozilla/5.0'";
  };
  unpackCmd = "${dpkg}/bin/dpkg -x $src .";
  sourceRoot = ".";

  nativeBuildInputs = [ qt5.wrapQtAppsHook makeWrapper ];

  installPhase = ''
    mkdir -p $out
    cp -r usr/* $out
  '';

  preFixup = ''
    local exefile="$out/bin/netease-cloud-music"
    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$exefile"
    patchelf --set-rpath "$out/libs:$(patchelf --print-rpath "$exefile"):${rpath}" "$exefile"

    wrapProgram $out/bin/netease-cloud-music \
      --prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
      --set QT_AUTO_SCREEN_SCALE_FACTOR 1 \
      --set QCEF_INSTALL_PATH "${deepin.qcef}/lib/qcef"
  '';

  meta = {
    description = "Client for Netease Cloud Music service";
    homepage = https://music.163.com;
    platforms = [ "i686-linux" "x86_64-linux" ];
    maintainers = [ stdenv.lib.maintainers.mlatus ];
    license = stdenv.lib.licenses.unfreeRedistributable;
  };
}<commit_msg>do not set QT_SCREEN_AUTO_SCALE_FACTOR<commit_after>{ stdenv, lib, fontconfig, zlib, libGL, glib, pango
, gdk-pixbuf, freetype, atk, cairo, libsForQt5, xorg
, sqlite, taglib, nss, nspr, cups, dbus, alsaLib
, libpulseaudio, deepin, qt5, harfbuzz, p11-kit
, libgpgerror, libudev0-shim, makeWrapper, dpkg, fetchurl }:
let
  rpath = lib.makeLibraryPath [
    fontconfig.lib
    zlib
    stdenv.cc.cc.lib
    libGL
    glib
    pango
    gdk-pixbuf
    freetype
    atk
    cairo
    libsForQt5.vlc
    sqlite
    taglib
    nss
    nspr
    cups.lib
    dbus.lib
    alsaLib
    libpulseaudio
    xorg.libX11
    xorg.libXext
    xorg.libXtst
    xorg.libXdamage
    xorg.libXScrnSaver
    xorg.libxcb
    xorg.libXi
    deepin.qcef
    qt5.qtwebchannel
    qt5.qtbase
    qt5.qtx11extras
    qt5.qtdeclarative
    harfbuzz
    p11-kit
    libgpgerror
  ];   

  runtimeLibs = lib.makeLibraryPath [ libudev0-shim ];

in stdenv.mkDerivation rec {
  pname = "netease-cloud-music";
  version = "1.2.0";
  src = fetchurl {
    url    = "http://d1.music.126.net/dmusic/netease-cloud-music_1.2.0_amd64_deepin_stable_20190424.deb";
    sha256 = "0hg8jqim77vd0fmk8gfbz2fmlj99byxcm9jn70xf7vk1sy7wp6h1";
    curlOpts = "-A 'Mozilla/5.0'";
  };
  unpackCmd = "${dpkg}/bin/dpkg -x $src .";
  sourceRoot = ".";

  nativeBuildInputs = [ qt5.wrapQtAppsHook makeWrapper ];

  installPhase = ''
    mkdir -p $out
    cp -r usr/* $out
  '';

  preFixup = ''
    local exefile="$out/bin/netease-cloud-music"
    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$exefile"
    patchelf --set-rpath "$out/libs:$(patchelf --print-rpath "$exefile"):${rpath}" "$exefile"

    wrapProgram $out/bin/netease-cloud-music \
      --prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
      --set QCEF_INSTALL_PATH "${deepin.qcef}/lib/qcef"
  '';

  meta = {
    description = "Client for Netease Cloud Music service";
    homepage = https://music.163.com;
    platforms = [ "i686-linux" "x86_64-linux" ];
    maintainers = [ stdenv.lib.maintainers.mlatus ];
    license = stdenv.lib.licenses.unfreeRedistributable;
  };
}
{'fraction_non_alphanumeric': 0.1281079801089273, 'fraction_numerical': 0.0333885863130476, 'mean_word_length': 2.8645928636779505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4551515', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1761, 'n_words': 290}