1{ stdenv, fetchFromGitHub, pkgconfig, fuse, pcre }:
2
3stdenv.mkDerivation rec {
4 name = "rewritefs-${version}";
5 version = "2017-08-14";
6
7 src = fetchFromGitHub {
8 owner = "sloonz";
9 repo = "rewritefs";
10 rev = "33fb844d8e8ff441a3fc80d2715e8c64f8563d81";
11 sha256 = "15bcxprkxf0xqxljsqhb0jpi7p1vwqcb00sjs7nzrj7vh2p7mqla";
12 };
13
14 nativeBuildInputs = [ pkgconfig ];
15 buildInputs = [ fuse pcre ];
16
17 prePatch = ''
18 # do not set sticky bit in nix store
19 substituteInPlace Makefile --replace 6755 0755
20 '';
21
22 preConfigure = "substituteInPlace Makefile --replace /usr/local $out";
23
24 meta = with stdenv.lib; {
25 description = ''A FUSE filesystem intended to be used
26 like Apache mod_rewrite'';
27 homepage = https://github.com/sloonz/rewritefs;
28 license = licenses.gpl2;
29 maintainers = with maintainers; [ rnhmjoj ];
30 platforms = platforms.linux;
31 };
32}