Unverified Commit c109fe7e authored by Thiago Kenji Okada's avatar Thiago Kenji Okada Committed by GitHub
Browse files

Merge pull request #208999 from wegank/libhdhomerun-darwin

libhdhomerun: unbreak on aarch64-darwin
parents ef9a5826 bdbd5657
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -13,11 +13,15 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-HlT/78LUiTkRUB2jHmYrnQY+bBiv4stcZlMyUnelSpc=";
  };

  patchPhase = lib.optionalString stdenv.isDarwin ''
    substituteInPlace Makefile --replace "gcc" "cc"
    substituteInPlace Makefile --replace "-arch i386" ""
  postPatch = lib.optionalString stdenv.isDarwin ''
    substituteInPlace Makefile \
      --replace "-arch x86_64" "-arch ${stdenv.hostPlatform.darwinArch}"
  '';

  makeFlags = [
    "CC=${stdenv.cc.targetPrefix}cc"
  ];

  installPhase = ''
    mkdir -p $out/{bin,lib,include/hdhomerun}
    install -Dm444 libhdhomerun${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib
@@ -31,7 +35,5 @@ stdenv.mkDerivation rec {
    license = licenses.lgpl21Only;
    platforms = platforms.unix;
    maintainers = [ maintainers.titanous ];
    # never built on aarch64-darwin since first introduction in nixpkgs
    broken = stdenv.isDarwin && stdenv.isAarch64;
  };
}