diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/tools/filesystems/mp3fs | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems/mp3fs')
-rw-r--r-- | nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix | 32 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch | 39 |
2 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix b/nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix new file mode 100644 index 000000000000..cc8ca8411248 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/mp3fs/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, flac, fuse, lame, libid3tag, pkgconfig }: + +stdenv.mkDerivation rec { + name = "mp3fs-${version}"; + version = "0.91"; + + src = fetchurl { + url = "https://github.com/khenriks/mp3fs/releases/download/v${version}/${name}.tar.gz"; + sha256 = "14ngiqg24p3a0s6hp33zjl4i46d8qn4v9id36psycq3n3csmwyx4"; + }; + + patches = [ ./fix-statfs-operation.patch ]; + + buildInputs = [ flac fuse lame libid3tag ]; + nativeBuildInputs = [ pkgconfig ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "FUSE file system that transparently transcodes to MP3"; + longDescription = '' + A read-only FUSE filesystem which transcodes between audio formats + (currently only FLAC to MP3) on the fly when files are opened and read. + It can let you use a FLAC collection with software and/or hardware + which only understands the MP3 format, or transcode files through + simple drag-and-drop in a file browser. + ''; + homepage = https://khenriks.github.io/mp3fs/; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch b/nixpkgs/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch new file mode 100644 index 000000000000..9b3094e60053 --- /dev/null +++ b/nixpkgs/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch @@ -0,0 +1,39 @@ +From fea072084ff9d7c4d2c688059a2462bb0e59a2ec Mon Sep 17 00:00:00 2001 +From: K Henriksson <kthenriksson@gmail.com> +Date: Wed, 27 Aug 2014 21:55:18 -0700 +Subject: [PATCH] Fix statfs operation + +The statfs implementation does not properly translate names back to the +original, since the major encoding rewrite. This corrects that, and +should fix issue #27. +--- + src/fuseops.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/fuseops.c b/src/fuseops.c +index e7b4e7e..c333cbd 100644 +--- a/src/fuseops.c ++++ b/src/fuseops.c +@@ -337,9 +337,20 @@ static int mp3fs_statfs(const char *path, struct statvfs *stbuf) { + if (!origpath) { + goto translate_fail; + } +- ++ ++ /* pass-through for regular files */ ++ if (statvfs(origpath, stbuf) == 0) { ++ goto passthrough; ++ } else { ++ /* Not really an error. */ ++ errno = 0; ++ } ++ ++ find_original(origpath); ++ + statvfs(origpath, stbuf); +- ++ ++passthrough: + free(origpath); + translate_fail: + return -errno; |