2021-01-17 09:17:16 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, curl, fuse, libxml2, pkg-config }:
|
2015-01-09 09:24:18 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
srcs = {
|
2015-02-05 23:24:55 +00:00
|
|
|
boxfs2 = fetchFromGitHub {
|
|
|
|
sha256 = "10af1l3sjnh25shmq5gdnpyqk4vrq7i1zklv4csf1n2nrahln8j8";
|
2015-01-09 09:24:18 +00:00
|
|
|
rev = "d7018b0546d2dae956ae3da3fb95d2f63fa6d3ff";
|
2015-02-05 23:24:55 +00:00
|
|
|
repo = "boxfs2";
|
|
|
|
owner = "drotiro";
|
2015-01-09 09:24:18 +00:00
|
|
|
};
|
2015-02-05 23:24:55 +00:00
|
|
|
libapp = fetchFromGitHub {
|
|
|
|
sha256 = "1p2sbxiranan2n2xsfjkp3c6r2vcs57ds6qvjv4crs1yhxr7cp00";
|
2015-01-09 09:24:18 +00:00
|
|
|
rev = "febebe2bc0fb88d57bdf4eb4a2a54c9eeda3f3d8";
|
2015-02-05 23:24:55 +00:00
|
|
|
repo = "libapp";
|
|
|
|
owner = "drotiro";
|
2015-01-09 09:24:18 +00:00
|
|
|
};
|
2015-02-05 23:24:55 +00:00
|
|
|
libjson = fetchFromGitHub {
|
|
|
|
sha256 = "1vhss3gq44nl61fbnh1l3qzwvz623gwhfgykf1lf1p31rjr7273w";
|
2015-01-09 09:24:18 +00:00
|
|
|
rev = "75a7f50fca2c667bc5f32cdd6dd98f2b673f6657";
|
2015-02-05 23:24:55 +00:00
|
|
|
repo = "libjson";
|
|
|
|
owner = "vincenthz";
|
2015-01-09 09:24:18 +00:00
|
|
|
};
|
|
|
|
};
|
2019-08-13 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "boxfs";
|
2016-01-25 19:08:34 +00:00
|
|
|
version = "2-20150109";
|
2015-01-09 09:24:18 +00:00
|
|
|
|
|
|
|
src = srcs.boxfs2;
|
2015-11-26 17:44:44 +00:00
|
|
|
|
2015-01-09 09:24:18 +00:00
|
|
|
prePatch = with srcs; ''
|
|
|
|
substituteInPlace Makefile --replace "git pull" "true"
|
|
|
|
cp -a --no-preserve=mode ${libapp} libapp
|
|
|
|
cp -a --no-preserve=mode ${libjson} libjson
|
|
|
|
'';
|
2015-06-08 15:48:42 +01:00
|
|
|
patches = [ ./work-around-API-borkage.patch ];
|
|
|
|
|
2015-06-17 18:36:06 +01:00
|
|
|
buildInputs = [ curl fuse libxml2 ];
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2015-01-09 09:24:18 +00:00
|
|
|
|
2015-11-26 17:44:44 +00:00
|
|
|
buildFlags = [ "static" ];
|
2015-01-09 09:24:18 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install boxfs boxfs-init $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-01-09 09:24:18 +00:00
|
|
|
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`.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/drotiro/boxfs2";
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.gpl3;
|
2015-11-17 20:29:29 +00:00
|
|
|
platforms = platforms.linux;
|
2015-01-09 09:24:18 +00:00
|
|
|
};
|
|
|
|
}
|