summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorlethalman <lucabru@src.gnome.org>2015-01-09 15:39:02 +0100
committerlethalman <lucabru@src.gnome.org>2015-01-09 15:39:02 +0100
commit5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052 (patch)
treefc901991eb8acb5e3c77126c8a8a3a495d453ee6 /pkgs
parent4cf52df32ebae9b05b6b4e8d9463f6ada3e62a8d (diff)
parentbec3dd5dd5ab2c64722b255841aa0d0c87164cd3 (diff)
downloadnixlib-5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052.tar
nixlib-5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052.tar.gz
nixlib-5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052.tar.bz2
nixlib-5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052.tar.lz
nixlib-5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052.tar.xz
nixlib-5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052.tar.zst
nixlib-5bc68e1a0ee8ff5f6670c62567679dfbf7ea4052.zip
Merge pull request #5656 from nckx/boxfs2
Add boxfs: FUSE file system for box.com accounts
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/filesystems/boxfs/default.nix55
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 57 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 ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ac17a5c876a6..4c066787418d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -653,6 +653,8 @@ let
 
   bootchart = callPackage ../tools/system/bootchart { };
 
+  boxfs = callPackage ../tools/filesystems/boxfs { };
+
   bro = callPackage ../applications/networking/ids/bro { };
 
   bsod = callPackage ../misc/emulators/bsod { };