Advertisement
evanjs

polychromatic - no device images

Sep 2nd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. with import <nixpkgs> {};
  2. #{ fetchFromGitHub
  3. #, stdenv
  4. #, python
  5. #, python27
  6. #, bash
  7. #, cairo
  8. #, glib
  9. #, gnome3
  10. #, gobject-introspection
  11. #, gstreamer
  12. #, gtk3
  13. #, lessc
  14. #, libcanberra-gtk3
  15. #, pkgconfig
  16. #, wrapGAppsHook
  17. #}:
  18. let
  19. python = python3;
  20. in
  21. python3Packages.buildPythonPackage rec {
  22. name = "polychromatic-${version}";
  23. version = "unstable-2018-04-19";
  24.  
  25. format = "other";
  26.  
  27. src = fetchFromGitHub {
  28. owner = "polychromatic";
  29. repo = "polychromatic";
  30. rev = "730bdb19fdae3d0e3c6b8d179de9d702362e19d0";
  31. sha256 = "1ac28c2xq9yl81mbbxwi47r7sssrp6grmrbdpwavwz4l8zw9r30f";
  32. };
  33.  
  34. makeFlags = [
  35. "PREFIX="
  36. "DESTDIR=$(out)"
  37. "PYTHONDIR=/lib/python3.7/site-packages"
  38. ];
  39.  
  40.  
  41. pathsToLink = [ "/bin" "/etc" "/lib" "/share" ];
  42.  
  43. buildInputs = [
  44. cairo
  45. gobject-introspection
  46. gtk3
  47. nodePackages.less
  48. ];
  49.  
  50. propagatedBuildInputs = [
  51. python3Packages.setproctitle
  52. python3Packages.openrazer
  53. python3Packages.openrazer-daemon
  54. python3Packages.requests
  55. hicolor-icon-theme
  56. libappindicator
  57. ];
  58.  
  59. nativePropagatedBuildInputs = [
  60. gobject-introspection
  61. gtk3
  62. gdk-pixbuf
  63. imagemagick
  64. ];
  65.  
  66. doCheck = true;
  67.  
  68. nativeBuildInputs = [
  69. desktop-file-utils
  70. gobject-introspection
  71. wrapGAppsHook
  72. webkit
  73. gnome3.librsvg
  74. openssl
  75. lessc
  76. ];
  77.  
  78. preInstall = ''
  79. pushd pylib
  80. patchShebangsAuto .
  81. for file in $(ls); do
  82. substituteInPlace $file \
  83. --replace /usr/bin $out/bin \
  84. --replace /usr $out
  85. done
  86. popd
  87. for file in polychromatic-controller polychromatic-tray-applet; do
  88. substituteInPlace $file \
  89. --replace /usr/bin $out/bin \
  90. --replace /usr/sh:are $out/share \
  91. --replace /usr/lib $out/lib \
  92. --replace /usr/local/share $out/share \
  93. --replace /usr $out \
  94. --replace '../install/hicolor' '../icons/hicolor' \
  95. --replace '../img/' "$out/share/polychromatic/img/"
  96. done
  97. '';
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement