1 { lib, stdenv, fetchFromGitHub, curl, fuse, libxml2, pkg-config }:
5 boxfs2 = fetchFromGitHub {
6 sha256 = "10af1l3sjnh25shmq5gdnpyqk4vrq7i1zklv4csf1n2nrahln8j8";
7 rev = "d7018b0546d2dae956ae3da3fb95d2f63fa6d3ff";
11 libapp = fetchFromGitHub {
12 sha256 = "1p2sbxiranan2n2xsfjkp3c6r2vcs57ds6qvjv4crs1yhxr7cp00";
13 rev = "febebe2bc0fb88d57bdf4eb4a2a54c9eeda3f3d8";
17 libjson = fetchFromGitHub {
18 sha256 = "1vhss3gq44nl61fbnh1l3qzwvz623gwhfgykf1lf1p31rjr7273w";
19 rev = "75a7f50fca2c667bc5f32cdd6dd98f2b673f6657";
24 in stdenv.mkDerivation {
26 version = "2-20150109";
30 prePatch = with srcs; ''
31 substituteInPlace Makefile --replace "git pull" "true"
32 cp -a --no-preserve=mode ${libapp} libapp
33 cp -a --no-preserve=mode ${libjson} libjson
36 ./work-around-API-borkage.patch
37 ./libapp-include-ctype.diff
40 buildInputs = [ curl fuse libxml2 ];
41 nativeBuildInputs = [ pkg-config ];
45 "CC=${stdenv.cc.targetPrefix}cc"
46 ] ++ lib.optional stdenv.hostPlatform.isDarwin "CFLAGS=-D_BSD_SOURCE";
50 install boxfs boxfs-init $out/bin
54 description = "FUSE file system for box.com accounts";
56 Store files on box.com (an account is required). The first time you run
57 boxfs, you will need to complete the authentication (oauth2) process and
58 grant access to your box.com account. Just follow the instructions on
59 the terminal and in your browser. When you've done using your files,
60 unmount the file system with `fusermount -u mountpoint`.
62 homepage = "https://github.com/drotiro/boxfs2";
63 license = licenses.gpl3;
64 platforms = platforms.unix;