direwolf: fix build

+6 -16
+6 -5
pkgs/applications/radio/direwolf/default.nix
··· 22 espeak gpsd hamlib perl python3 23 ] ++ (optionals stdenv.isLinux [alsa-lib udev]); 24 25 - patches = [ 26 - ./udev-fix.patch 27 - ]; 28 - 29 postPatch = '' 30 substituteInPlace src/symbols.c \ 31 --replace /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \ 32 --replace /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt 33 substituteInPlace src/decode_aprs.c \ 34 --replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \ 35 --replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt 36 substituteInPlace scripts/dwespeak.sh \ 37 --replace espeak ${espeak}/bin/espeak 38 substituteInPlace cmake/cpack/direwolf.desktop.in \ 39 --replace 'Terminal=false' 'Terminal=true' \ 40 - --replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf' \ 41 ''; 42 43 meta = {
··· 22 espeak gpsd hamlib perl python3 23 ] ++ (optionals stdenv.isLinux [alsa-lib udev]); 24 25 postPatch = '' 26 + substituteInPlace conf/CMakeLists.txt \ 27 + --replace /etc/udev/rules.d/ $out/lib/udev/rules.d/ 28 substituteInPlace src/symbols.c \ 29 --replace /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \ 30 --replace /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt 31 substituteInPlace src/decode_aprs.c \ 32 --replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \ 33 --replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt 34 + patchShebangs scripts/dwespeak.sh 35 substituteInPlace scripts/dwespeak.sh \ 36 --replace espeak ${espeak}/bin/espeak 37 substituteInPlace cmake/cpack/direwolf.desktop.in \ 38 --replace 'Terminal=false' 'Terminal=true' \ 39 + --replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf' 40 + substituteInPlace src/dwgpsd.c \ 41 + --replace 'GPSD_API_MAJOR_VERSION > 11' 'GPSD_API_MAJOR_VERSION > 12' 42 ''; 43 44 meta = {
-11
pkgs/applications/radio/direwolf/udev-fix.patch
··· 1 - --- direwolf/conf/CMakeLists.txt.orig 2020-12-04 11:12:59.739390894 -0600 2 - +++ direwolf/conf/CMakeLists.txt 2020-12-04 11:23:09.146594795 -0600 3 - @@ -26,7 +26,7 @@ 4 - 5 - # install udev rules for CM108 6 - if(LINUX) 7 - - install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/) 8 - + install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d/") 9 - endif() 10 - 11 - install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})
···