nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 flac,
6 fuse,
7 lame,
8 libid3tag,
9 libvorbis,
10 autoreconfHook,
11 pkg-config,
12 pandoc,
13 zlib,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 pname = "mp3fs";
18 version = "1.1.1";
19
20 src = fetchFromGitHub {
21 owner = "khenriks";
22 repo = "mp3fs";
23 rev = "v${finalAttrs.version}";
24 sha256 = "sha256-dF+DfkNKvYOucS6KjYR1MMGxayM+1HVS8mbmaavmgKM=";
25 };
26
27 postPatch = ''
28 substituteInPlace src/mp3fs.cc \
29 --replace-fail "#include <fuse_darwin.h>" "" \
30 --replace-fail "osxfuse_version()" "fuse_version()"
31 '';
32
33 nativeBuildInputs = [
34 autoreconfHook
35 pkg-config
36 pandoc
37 ];
38
39 buildInputs = [
40 flac
41 fuse
42 lame
43 libid3tag
44 libvorbis
45 zlib
46 ];
47
48 enableParallelBuilding = true;
49
50 meta = {
51 description = "FUSE file system that transparently transcodes to MP3";
52 longDescription = ''
53 A read-only FUSE filesystem which transcodes between audio formats
54 (currently FLAC and Ogg Vorbis to MP3) on the fly when opened and read.
55 This can let you use a FLAC or Ogg Vorbis collection with software
56 and/or hardware which only understands the MP3 format, or transcode
57 files through simple drag-and-drop in a file browser.
58 '';
59 homepage = "https://khenriks.github.io/mp3fs/";
60 license = lib.licenses.gpl3Plus;
61 platforms = lib.platforms.unix;
62 maintainers = with lib.maintainers; [ Luflosi ];
63 mainProgram = "mp3fs";
64 };
65})