summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/filesystems/boxfs
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-01-09 10:24:18 +0100
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-01-09 10:24:18 +0100
commitbec3dd5dd5ab2c64722b255841aa0d0c87164cd3 (patch)
tree6f6d06b2e416c9eb9b866e7b9a64b2e285016581 /pkgs/tools/filesystems/boxfs
parent9438fa4d3f61617905210de51090400d6e4eed6e (diff)
Add boxfs: FUSE file system for box.com accounts
Diffstat (limited to 'pkgs/tools/filesystems/boxfs')
-rw-r--r--pkgs/tools/filesystems/boxfs/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/boxfs/default.nix b/pkgs/tools/filesystems/boxfs/default.nix
new file mode 100644
index 000000000000..60bb1069a172
--- /dev/null
+++ b/pkgs/tools/filesystems/boxfs/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchgit, curl, fuse, libxml2, pkgconfig }:
+
+let
+ version = "2-20150109";
+ srcs = {
+ boxfs2 = fetchgit {
+ url = git://github.com/drotiro/boxfs2.git;
+ rev = "d7018b0546d2dae956ae3da3fb95d2f63fa6d3ff";
+ sha256 = "c22402373589221371f32ec9c86813d5d41aeb1f3a8e2004019019af2f1d8785";
+ };
+ libapp = fetchgit {
+ url = git://github.com/drotiro/libapp.git;
+ rev = "febebe2bc0fb88d57bdf4eb4a2a54c9eeda3f3d8";
+ sha256 = "dbae0e80cd926a45dcf267d33ed03434b377c758a4d1d556f39f7f17255a650e";
+ };
+ libjson = fetchgit {
+ url = git://github.com/vincenthz/libjson.git;
+ rev = "75a7f50fca2c667bc5f32cdd6dd98f2b673f6657";
+ sha256 = "7c1c71b2cc61dce06870d33f07f91bc2fccd3f1e3440bb5c30d41282dfd01aee";
+ };
+ };
+in stdenv.mkDerivation {
+ name = "boxfs-${version}";
+
+ src = srcs.boxfs2;
+ prePatch = with srcs; ''
+ substituteInPlace Makefile --replace "git pull" "true"
+ cp -a --no-preserve=mode ${libapp} libapp
+ cp -a --no-preserve=mode ${libjson} libjson
+ '';
+
+ buildInputs = [ curl fuse libxml2 pkgconfig ];
+
+ buildFlags = "static";
+
+ installPhase = ''
+ mkdir -p $out/bin
+ install boxfs boxfs-init $out/bin
+ '';
+
+ meta = with stdenv.lib; {
+ description = "FUSE file system for box.com accounts";
+ longDescription = ''
+ Store files on box.com (an account is required). The first time you run
+ boxfs, you will need to complete the authentication (oauth2) process and
+ grant access to your box.com account. Just follow the instructions on
+ the terminal and in your browser. When you've done using your files,
+ unmount the file system with `fusermount -u mountpoint`.
+ '';
+ homepage = https://github.com/drotiro/boxfs2;
+ license = with licenses; gpl3;
+ platforms = with platforms; linux;
+ maintainers = with maintainers; [ nckx ];
+ };
+}