about summary refs log tree commit diff
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-07-31 19:51:28 +0200
committerProfpatsch <mail@profpatsch.de>2016-07-31 19:51:28 +0200
commit5806b2422ba6fc8e49b8ae711f2f995c9fc0e829 (patch)
tree833fa1e8ca968cdcef413c1e6b044415f913e9b4
parentef678ee578d06ac2dda0fbd9630d42cad076c52c (diff)
pkgs/jmtpfs: patch for Jolla mtp
-rw-r--r--pkgs/default.nix5
-rw-r--r--pkgs/mtp-jolla.patch34
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 1a9f6cc9..fb3fd5bd 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -13,6 +13,11 @@ let
     git-detach = callPackage ./git-detach { };
     grandpa = callPackage ./grandpa { };
     greybird-xfce-theme = callPackage ./greybird-xfce-theme { };
+    jmtpfs = pkgs.jmtpfs.override {
+      libmtp = pkgs.libmtp.overrideDerivation (old: {
+        patches = old.patches or [] ++ [ ./mtp-jolla.patch ];
+      });
+    };
     nixops = callPackage ./nixops { };
     libCMT = callPackage ./libcmt { };
     librxtx_java = callPackage ./librxtx-java { };
diff --git a/pkgs/mtp-jolla.patch b/pkgs/mtp-jolla.patch
new file mode 100644
index 00000000..e893d3b7
--- /dev/null
+++ b/pkgs/mtp-jolla.patch
@@ -0,0 +1,34 @@
+diff --git a/src/music-players.h b/src/music-players.h
+index a44460a..d05f52f 100644
+--- a/src/music-players.h
++++ b/src/music-players.h
+@@ -3102,6 +3102,16 @@
+   { "Jolla", 0x2931, "Sailfish (ID1)", 0x0a01,
+       DEVICE_FLAGS_ANDROID_BUGS },
+ 
++  /* In update 4 the order of devices was changed for
++     better OS X / Windows suport and another device-id
++     got assigned for the MTP */
++  { "Jolla", 0x2931, "Sailfish (ID2)", 0x0a05,
++      DEVICE_FLAGS_ANDROID_BUGS },
++
++  /* In a later version, the ID changed again. */
++  { "Jolla", 0x2931, "Sailfish (ID3)", 0x0a07,
++      DEVICE_FLAGS_ANDROID_BUGS },
++
+   /*
+    * TCL? Alcatel?
+    */
+@@ -3129,12 +3139,6 @@
+   { "DigiLand", 0x1f3a, "DL701Q", 0x0c02,
+       DEVICE_FLAGS_ANDROID_BUGS },
+ 
+-  /* In update 4 the order of devices was changed for
+-     better OS X / Windows suport and another device-id
+-     got assigned for the MTP */
+-  { "Jolla", 0x2931, "Sailfish (ID2)", 0x0a05,
+-      DEVICE_FLAGS_ANDROID_BUGS },
+-
+   /*
+    * bq
+    * https://sourceforge.net/p/libmtp/feature-requests/128/