direwolf: fix build

main
Luke Sandell 3 years ago
parent c3bf08d1b0
commit d5a9d96982
  1. 11
      pkgs/applications/radio/direwolf/default.nix
  2. 11
      pkgs/applications/radio/direwolf/udev-fix.patch

@ -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 = {

@ -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})
Loading…
Cancel
Save