diff --git a/pkgs/applications/radio/direwolf/default.nix b/pkgs/applications/radio/direwolf/default.nix index 7b8f60819c4..ffd608edf7f 100644 --- a/pkgs/applications/radio/direwolf/default.nix +++ b/pkgs/applications/radio/direwolf/default.nix @@ -22,22 +22,23 @@ stdenv.mkDerivation rec { espeak gpsd hamlib perl python3 ] ++ (optionals stdenv.isLinux [alsa-lib udev]); - patches = [ - ./udev-fix.patch - ]; - postPatch = '' + substituteInPlace conf/CMakeLists.txt \ + --replace /etc/udev/rules.d/ $out/lib/udev/rules.d/ substituteInPlace src/symbols.c \ --replace /usr/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt \ --replace /opt/local/share/direwolf/symbols-new.txt $out/share/direwolf/symbols-new.txt substituteInPlace src/decode_aprs.c \ --replace /usr/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt \ --replace /opt/local/share/direwolf/tocalls.txt $out/share/direwolf/tocalls.txt + patchShebangs scripts/dwespeak.sh substituteInPlace scripts/dwespeak.sh \ --replace espeak ${espeak}/bin/espeak substituteInPlace cmake/cpack/direwolf.desktop.in \ --replace 'Terminal=false' 'Terminal=true' \ - --replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf' \ + --replace 'Exec=@APPLICATION_DESKTOP_EXEC@' 'Exec=direwolf' + substituteInPlace src/dwgpsd.c \ + --replace 'GPSD_API_MAJOR_VERSION > 11' 'GPSD_API_MAJOR_VERSION > 12' ''; meta = { diff --git a/pkgs/applications/radio/direwolf/udev-fix.patch b/pkgs/applications/radio/direwolf/udev-fix.patch deleted file mode 100644 index cff17fb8862..00000000000 --- a/pkgs/applications/radio/direwolf/udev-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- direwolf/conf/CMakeLists.txt.orig 2020-12-04 11:12:59.739390894 -0600 -+++ direwolf/conf/CMakeLists.txt 2020-12-04 11:23:09.146594795 -0600 -@@ -26,7 +26,7 @@ - - # install udev rules for CM108 - if(LINUX) -- install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/) -+ install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d/") - endif() - - install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})