Skip to content

Commit

Permalink
various: fix cross / strictDeps build (#370256)
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst authored Jan 11, 2025
2 parents 591eeee + 943657d commit e35846f
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 16 deletions.
10 changes: 8 additions & 2 deletions pkgs/by-name/fa/fastjet-contrib/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,23 @@ stdenv.mkDerivation rec {
buildInputs = [ fastjet ];

postPatch = ''
for f in Makefile.in */Makefile; do
for f in Makefile.in */Makefile scripts/internal/Template/Makefile; do
substituteInPlace "$f" --replace "CXX=g++" ""
substituteInPlace "$f" --replace-quiet "ar " "${stdenv.cc.targetPrefix}ar "
substituteInPlace "$f" --replace-quiet "ranlib " "${stdenv.cc.targetPrefix}ranlib "
done
patchShebangs ./utils/check.sh ./utils/install-sh
patchShebangs --build ./utils/check.sh ./utils/install-sh
'';

# Written in shell manually, does not support autoconf-style
# --build=/--host= options:
# Error: --build=x86_64-unknown-linux-gnu: unrecognised argument
configurePlatforms = [ ];

configureFlags = [
"--fastjet-config=${lib.getExe' (lib.getDev fastjet) "fastjet-config"}"
];

enableParallelBuilding = true;

doCheck = true;
Expand Down
4 changes: 4 additions & 0 deletions pkgs/by-name/fa/fastjet/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
hash = "sha256-zBdUcb+rhla4xhg6jl6a0F1fdQbkbzISqagjCQW49qM=";
};

postPatch = ''
patchShebangs --build fastjet-config.in
'';

buildInputs = lib.optional withPython python;

configureFlags = [
Expand Down
9 changes: 6 additions & 3 deletions pkgs/by-name/fc/fcitx5-mcbopomofo/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,19 @@ stdenv.mkDerivation rec {
cmake
extra-cmake-modules
gettext
json_c
icu
fmt
gtest
];

buildInputs = [
fcitx5
fmt
gtest
icu
json_c
];

strictDeps = true;

cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];
Expand Down
7 changes: 7 additions & 0 deletions pkgs/by-name/fi/fish-fillets-ng/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ stdenv.mkDerivation rec {
SDL_ttf
];

# pass in correct sdl-config for cross builds
env.SDL_CONFIG = lib.getExe' SDL.dev "sdl-config";

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

desktopItems = [
(makeDesktopItem {
name = "fish-fillets-ng";
Expand Down
1 change: 1 addition & 0 deletions pkgs/by-name/fl/fllog/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
];

nativeBuildInputs = [
fltk13 # fltk-config
pkg-config
];

Expand Down
6 changes: 6 additions & 0 deletions pkgs/by-name/fl/flpsed/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ stdenv.mkDerivation rec {
-i src/GsWidget.cxx
'';

configureFlags = [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
"FLTKCONFIG=${lib.getExe' (lib.getDev fltk13) "fltk-config"}"
];

meta = with lib; {
description = "WYSIWYG PostScript annotator";
homepage = "https://flpsed.org/flpsed.html";
Expand Down
8 changes: 6 additions & 2 deletions pkgs/by-name/fl/flwrap/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ stdenv.mkDerivation rec {
sha256 = "sha256-g1V7bOcgVHpD+Ndn02Nj4I3rGItuQ2qLGlrZZshfGP8=";
};

nativeBuildInputs = [
pkg-config
];

buildInputs = [
fltk13
libjpeg
];

nativeBuildInputs = [
pkg-config
configureFlags = [
"FLTK_CONFIG=${lib.getExe' (lib.getDev fltk13) "fltk-config"}"
];

meta = {
Expand Down
2 changes: 2 additions & 0 deletions pkgs/by-name/fr/freedroidrpg/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ stdenv.mkDerivation {
zlib
] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv;

env.SDL_CONFIG = lib.getExe' SDL.dev "sdl-config";

enableParallelBuilding = true;

meta = with lib; {
Expand Down
6 changes: 5 additions & 1 deletion pkgs/by-name/lv/lvtk/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ stdenv.mkDerivation (finalAttrs: {
pugl
];

postInstall = ''
mv $out/include/lvtk-3.0/lvtk $out/include/
rmdir $out/include/lvtk-3.0/
'';

enableParallelBuilding = true;

meta = {
description = "Set C++ wrappers around the LV2 C API";
mainProgram = "ttl2c";
homepage = "https://lvtk.org/";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ bot-wxt1221 ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/sd/SDL_gfx/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-37FaxfjOeklS3BLSrtl0dRjF5rM1wOMWNtI/k8Yw9Bk=";
};

nativeBuildInputs = [ SDL ];

buildInputs = [ SDL ];

# SDL_gfx.pc refers to sdl.pc and some SDL_gfx headers import SDL.h
propagatedBuildInputs = [ SDL ];

env.SDL_CONFIG = lib.getExe' SDL.dev "sdl-config";

configureFlags = [
(lib.enableFeature false "mmx")
(lib.enableFeature enableSdltest "sdltest")
Expand Down
6 changes: 4 additions & 2 deletions pkgs/by-name/sd/SDL_mixer/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ stdenv.mkDerivation (finalAttrs: {
'';

nativeBuildInputs = [
SDL
pkg-config
smpeg
];

buildInputs = [
Expand All @@ -84,6 +82,10 @@ stdenv.mkDerivation (finalAttrs: {
smpeg
];

# pass in correct *-config for cross builds
env.SDL_CONFIG = lib.getExe' SDL.dev "sdl-config";
env.SMPEG_CONFIG = lib.getExe' smpeg.dev "smpeg-config";

configureFlags = [
(lib.enableFeature false "music-ogg-shared")
(lib.enableFeature false "music-mod-shared")
Expand Down
7 changes: 3 additions & 4 deletions pkgs/by-name/sd/SDL_ttf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ stdenv.mkDerivation (finalAttrs: {
freetype
];

nativeBuildInputs = [
SDL
freetype
];
# pass in correct *-config for cross builds
env.SDL_CONFIG = lib.getExe' SDL.dev "sdl-config";
env.FREETYPE_CONFIG = lib.getExe' freetype.dev "freetype-config";

configureFlags = [
(lib.enableFeature enableSdltest "sdltest")
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/libraries/gtk/2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ stdenv.mkDerivation (finalAttrs: {
];

nativeBuildInputs = finalAttrs.setupHooks ++ [
gdk-pixbuf
gettext
gobject-introspection
perl
Expand Down

0 comments on commit e35846f

Please sign in to comment.