Skip to content

Commit

Permalink
cctz: fix static build
Browse files Browse the repository at this point in the history
The install targets were "install_hdrs"
and "install_shared_lib". The later is obviously not
correct for a static build and was changed to
"install_lib" (corresponds to libcctz.a) for that case.
  • Loading branch information
maj0e committed Sep 21, 2022
1 parent 934a622 commit fee7c83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions pkgs/development/libraries/cctz/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, darwin }:
{ lib, stdenv, fetchFromGitHub, Foundation }:

stdenv.mkDerivation rec {
pname = "cctz";
Expand All @@ -13,9 +13,11 @@ stdenv.mkDerivation rec {

makeFlags = [ "PREFIX=$(out)" ];

buildInputs = lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Foundation;
buildInputs = lib.optional stdenv.isDarwin Foundation;

installTargets = [ "install_hdrs" "install_shared_lib" ];
installTargets = [ "install_hdrs" ]
++ lib.optional (!stdenv.targetPlatform.isStatic) "install_shared_lib"
++ lib.optional stdenv.targetPlatform.isStatic "install_lib";

postInstall = lib.optionalString stdenv.isDarwin ''
install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17107,7 +17107,9 @@ with pkgs;

ccrtp = callPackage ../development/libraries/ccrtp { };

cctz = callPackage ../development/libraries/cctz { };
cctz = callPackage ../development/libraries/cctz {
inherit (darwin.apple_sdk.frameworks) Foundation;
};

celt = callPackage ../development/libraries/celt {};
celt_0_7 = callPackage ../development/libraries/celt/0.7.nix {};
Expand Down

0 comments on commit fee7c83

Please sign in to comment.