Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hdhomerun-config-gui: init at 20200521 #94254

Closed
wants to merge 1 commit into from

Conversation

LouisDK1
Copy link
Contributor

@LouisDK1 LouisDK1 commented Jul 30, 2020

Package does not build yet. I'll need to patch it to link to libhdhomerun.so from the libhdhomerun package and make sure it won't conflict.

Motivation for this change

hdhomerun_config_gui is currently not present in nixpkgs.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@LouisDK1 LouisDK1 changed the title Hdhomerun config gui Hdhomerun config gui: init at 20200521 Jul 30, 2020
@LouisDK1 LouisDK1 changed the title Hdhomerun config gui: init at 20200521 hdhomerun_config_gui: init at 20200521 Jul 30, 2020
@LouisDK1
Copy link
Contributor Author

@rycee

The build will fail because I have some patching to do.

From the Arch user repo:

  sed -i "s|SUBDIRS = ../libhdhomerun src|SUBDIRS = src|g" Makefile.am
  sed -i "s|-I../../libhdhomerun|-I/usr/include/libhdhomerun|g" src/Makefile.am
  sed -i "s|-L../../libhdhomerun -lhdhomerun|-lhdhomerun|g" src/Makefile.am

I know it needs the library libhdhomerun and that its filename is libhdhomerun.so. I just don't know what path to put in the file src/Makefile.am (line 2 above).

@rycee
Copy link
Member

rycee commented Jul 30, 2020

Try

--- a/pkgs/applications/video/hdhomerun_config_gui/default.nix
+++ b/pkgs/applications/video/hdhomerun_config_gui/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libhdhomerun, pkg-config, gnumake, gtk2 }:
+{ stdenv, fetchurl, libhdhomerun, pkg-config, gtk2 }:
 
 stdenv.mkDerivation rec {
   pname = "hdhomerun_config_gui";
@@ -9,18 +9,14 @@ stdenv.mkDerivation rec {
     sha256 = "1r1rwfgi714nwblyg8nqjzkpm4n2lg7kqqqas47hvbn5waimz1ja";
   };
 
-  buildInputs = [
-    pkg-config gnumake gtk2
-  ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtk2 libhdhomerun ];
 
-  buildPhase = ''
-    ./configure
-    make
-  '';
+  configureFlags = [ "CPPFLAGS=-I${libhdhomerun}/include/hdhomerun" ];
+  makeFlags = [ "SUBDIRS=src" ];
 
   installPhase = ''
-    mkdir -p $out/usr/bin/
-    install -Dm 755 hdhomerun_config_gui $out/usr/bin/hdhomerun_config_gui
+    install -vDm755 src/hdhomerun_config_gui $out/usr/bin/hdhomerun_config_gui
   '';
 
   meta = with stdenv.lib; {

@LouisDK1 LouisDK1 force-pushed the hdhomerun_config_gui branch 2 times, most recently from af62fa4 to 5fca00e Compare July 31, 2020 06:43
@LouisDK1 LouisDK1 changed the title hdhomerun_config_gui: init at 20200521 hdhomerun-config-gui: init at 20200521 Jul 31, 2020
@LouisDK1
Copy link
Contributor Author

LouisDK1 commented Jul 31, 2020

@rycee
It builds now BUT there's an issue with detecting hdhomerun tuners on the local network. Apparently this also applies to libhdhomerun.

When having "libhdhomerun" installed on Arch and running "hdhomerun_config discover" whereas with NixOS nothing happens.
Do I need to allow something for "libhdhomerun" to be able to detect devices on the local network?

@rycee
Copy link
Member

rycee commented Jul 31, 2020

@LouisDK1 Sorry, I can't help with that. In general packages should be able to access the network without you having to do anything special. I suspect you will have to try to use strace and/or wireshark to figure out what's going on.

@LouisDK1
Copy link
Contributor Author

LouisDK1 commented Aug 3, 2020

@rycee

@LouisDK1 Sorry, I can't help with that. In general packages should be able to access the network without you having to do anything special. I suspect you will have to try to use strace and/or wireshark to figure out what's going on.

Turns out it has a firewall related issue. I have suggested adding a comment in another pull req for libhdhomerun.

I've made some changes. "vlc" has to be installed for the application to playback streams hence added.
I've also included both gcc and gnumake at the top. If that unnecessary just let me know - they're needed at build time.

@LouisDK1 LouisDK1 marked this pull request as ready for review August 3, 2020 20:06
@rycee
Copy link
Member

rycee commented Aug 7, 2020

Nice, rebased to master in 2204f74 🙂

@rycee rycee closed this Aug 7, 2020
@LouisDK1 LouisDK1 deleted the hdhomerun_config_gui branch August 7, 2020 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants