1{ lib, stdenv, fetchFromGitHub, pkg-config, fuse3, pcre }:
2
3stdenv.mkDerivation {
4 pname = "rewritefs";
5 version = "unstable-2021-10-03";
6
7 src = fetchFromGitHub {
8 owner = "sloonz";
9 repo = "rewritefs";
10 rev = "3a56de8b5a2d44968b8bc3885c7d661d46367306";
11 sha256 = "1w2rik0lhqm3wr68x51zs45gqfx79l7fi4p0sqznlfq7sz5s8xxn";
12 };
13
14 nativeBuildInputs = [ pkg-config ];
15 buildInputs = [ fuse3 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 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}