2022-03-30 09:31:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fuse }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "littlefs-fuse";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "2.7.5";
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "littlefs-project";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-sSnk1iQV5aHcOPqVKbigWqojrZKlJK5CcrVlwilT2mE=";
|
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
|
|
|
};
|
|
|
|
}
|