summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/filesystems/boxfs
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-06-08 16:48:42 +0200
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-06-08 16:56:55 +0200
commitb2d300e59bdbcd013d8f65e06fee162f8ae6ec28 (patch)
treee18a1de6cd2073ed5a13f11f5f9f9e9dd43ba560 /pkgs/tools/filesystems/boxfs
parentdd6ceb61fa72df71152ae9329b4a1918844b7c54 (diff)
boxfs: work around box.com breaking their API
See <https://github.com/drotiro/boxfs2/issues/11>. This should soon be fixed upstream. Until then, any bugs are mine.
Diffstat (limited to 'pkgs/tools/filesystems/boxfs')
-rw-r--r--pkgs/tools/filesystems/boxfs/default.nix2
-rw-r--r--pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch15
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/boxfs/default.nix b/pkgs/tools/filesystems/boxfs/default.nix
index f47107c85fb2..69c2d046f1c1 100644
--- a/pkgs/tools/filesystems/boxfs/default.nix
+++ b/pkgs/tools/filesystems/boxfs/default.nix
@@ -32,6 +32,8 @@ in stdenv.mkDerivation {
cp -a --no-preserve=mode ${libjson} libjson
'';
+ patches = [ ./work-around-API-borkage.patch ];
+
buildInputs = [ curl fuse libxml2 pkgconfig ];
buildFlags = "static";
diff --git a/pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch b/pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch
new file mode 100644
index 000000000000..b74e7f324665
--- /dev/null
+++ b/pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch
@@ -0,0 +1,15 @@
+diff --git a/boxapi.c b/boxapi.c
+index 4964273..1a32e0d 100644
+--- a/boxapi.c
++++ b/boxapi.c
+@@ -38,8 +38,8 @@
+ // AUTH
+ #define API_KEY_VAL "f9ss11y2w0hg5r04jsidxlhk4pil28cf"
+ #define API_SECRET "r3ZHAIhsOL2FoHjgERI9xf74W5skIM0w"
+-#define API_OAUTH_URL "https://app.box.com/api/oauth2/" //"https://www.box.com/api/oauth2/"
+-#define API_OAUTH_AUTHORIZE API_OAUTH_URL "authorize?response_type=code&client_id=" API_KEY_VAL /*"&redirect_uri=http%3A//localhost"*/
++#define API_OAUTH_URL "https://api.box.com/oauth2/" //"https://www.box.com/api/oauth2/"
++#define API_OAUTH_AUTHORIZE "https://app.box.com/api/oauth2/authorize?response_type=code&client_id=" API_KEY_VAL /*"&redirect_uri=http%3A//localhost"*/
+ #define API_OAUTH_TOKEN API_OAUTH_URL "token"
+ // CALLS
+ #define API_ENDPOINT "https://api.box.com/2.0/"