9 , withEspeak ? false, espeak ? null
12 stdenv.mkDerivation rec {
13 pname = "rockbox-utility";
17 url = "https://download.rockbox.org/rbutil/source/RockboxUtility-v${version}-src.tar.bz2";
18 hash = "sha256-PhlJ+fNY4/Qjoc72zV9WO+kNqF5bZQuwOh4EpAJwqX4=";
34 ++ lib.optional withEspeak espeak;
37 sed -i rbutil/rbutilqt/rbutilqt.pro \
38 -e '/^lrelease.commands =/ s|$$\[QT_INSTALL_BINS\]/lrelease -silent|${lib.getDev qt5.qttools}/bin/lrelease|'
46 # Workaround build failure on -fno-common toolchains like upstream
47 # gcc-10. Otherwise build fails as:
48 # ld: libmkimxboot.a(elf.c.o):utils/imxtools/sbtools/misc.h:43: multiple definition of `g_nr_keys';
49 # libmkimxboot.a(mkimxboot.c.o):utils/imxtools/sbtools/misc.h:43: first defined here
50 # TODO: try to remove with 1.5.1 update.
51 NIX_CFLAGS_COMPILE = "-fcommon";
56 install -Dm755 RockboxUtility $out/bin/rockboxutility
57 ln -s $out/bin/rockboxutility $out/bin/RockboxUtility
58 wrapProgram $out/bin/rockboxutility \
59 ${lib.optionalString withEspeak ''
60 --prefix PATH : ${espeak}/bin
66 # `make build/rcc/qrc_rbutilqt-lang.cpp` fails with
67 # RCC: Error in 'rbutilqt-lang.qrc': Cannot find file 'lang/rbutil_cs.qm'
68 # Do not add `lrelease rbutilqt.pro` into preConfigure, otherwise `make lrelease`
69 # may clobber the files read by the parallel `make build/rcc/qrc_rbutilqt-lang.cpp`.
70 enableParallelBuilding = false;
73 homepage = "https://www.rockbox.org";
74 description = "Open source firmware for digital music players";
75 license = licenses.gpl2Plus;
76 maintainers = with maintainers; [ AndersonTorres goibhniu ];
77 platforms = platforms.linux;