2022-03-30 09:31:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fuse }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "littlefs-fuse";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.7.7";
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "littlefs-project";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-MCmi0CBs3RLuYn+1BsS6pIeR/tHS1lGNyV3ZwlsnQCA=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
buildInputs = [ fuse ];
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -D lfs $out/bin/${pname}
|
|
|
|
ln -s $out/bin/${pname} $out/bin/mount.littlefs
|
|
|
|
ln -s $out/bin $out/sbin
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
meta = src.meta // {
|
|
|
|
description = "A FUSE wrapper that puts the littlefs in user-space";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ ehmry ];
|
2024-01-13 08:15:51 +00:00
|
|
|
mainProgram = "littlefs-fuse";
|
2022-03-30 09:31:56 +00:00
|
|
|
inherit (fuse.meta) platforms;
|
2024-01-13 08:15:51 +00:00
|
|
|
# fatal error: 'linux/fs.h' file not found
|
|
|
|
broken = stdenv.isDarwin;
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|