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.

+17
+2
pkgs/tools/filesystems/boxfs/default.nix
··· 32 32 cp -a --no-preserve=mode ${libjson} libjson 33 33 ''; 34 34 35 + patches = [ ./work-around-API-borkage.patch ]; 36 + 35 37 buildInputs = [ curl fuse libxml2 pkgconfig ]; 36 38 37 39 buildFlags = "static";
+15
pkgs/tools/filesystems/boxfs/work-around-API-borkage.patch
··· 1 + diff --git a/boxapi.c b/boxapi.c 2 + index 4964273..1a32e0d 100644 3 + --- a/boxapi.c 4 + +++ b/boxapi.c 5 + @@ -38,8 +38,8 @@ 6 + // AUTH 7 + #define API_KEY_VAL "f9ss11y2w0hg5r04jsidxlhk4pil28cf" 8 + #define API_SECRET "r3ZHAIhsOL2FoHjgERI9xf74W5skIM0w" 9 + -#define API_OAUTH_URL "https://app.box.com/api/oauth2/" //"https://www.box.com/api/oauth2/" 10 + -#define API_OAUTH_AUTHORIZE API_OAUTH_URL "authorize?response_type=code&client_id=" API_KEY_VAL /*"&redirect_uri=http%3A//localhost"*/ 11 + +#define API_OAUTH_URL "https://api.box.com/oauth2/" //"https://www.box.com/api/oauth2/" 12 + +#define API_OAUTH_AUTHORIZE "https://app.box.com/api/oauth2/authorize?response_type=code&client_id=" API_KEY_VAL /*"&redirect_uri=http%3A//localhost"*/ 13 + #define API_OAUTH_TOKEN API_OAUTH_URL "token" 14 + // CALLS 15 + #define API_ENDPOINT "https://api.box.com/2.0/"