summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2023-01-08 12:12:09 +0000
committerGitHub <noreply@github.com>2023-01-08 12:12:09 +0000
commitc109fe7e80390ebe9b55913646ecb6f621c1ddd2 (patch)
tree24164ecd479e322e76aa270083bf953d9587b780
parentef9a582661fc0e0e0b026bcca32cf7ecdc136308 (diff)
parentbdbd56577317afcd873eff0dec26f5562864b5a5 (diff)
Merge pull request #208999 from wegank/libhdhomerun-darwin
libhdhomerun: unbreak on aarch64-darwin
-rw-r--r--pkgs/development/libraries/libhdhomerun/default.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/development/libraries/libhdhomerun/default.nix b/pkgs/development/libraries/libhdhomerun/default.nix
index d643b69fb467..96b8e3c02937 100644
--- a/pkgs/development/libraries/libhdhomerun/default.nix
+++ b/pkgs/development/libraries/libhdhomerun/default.nix
@@ -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;
};
}