mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
Merge pull request #225860 from wegank/chicken-fixes
chickenPackages: various fixes
This commit is contained in:
commit
699d8d314d
@ -17,7 +17,11 @@ let
|
||||
(addPkgConfig old) // (addToPropagatedBuildInputs pkg old);
|
||||
broken = addMetaAttrs { broken = true; };
|
||||
brokenOnDarwin = addMetaAttrs { broken = stdenv.isDarwin; };
|
||||
in {
|
||||
addToCscOptions = opt: old: {
|
||||
CSC_OPTIONS = lib.concatStringsSep " " ([ old.CSC_OPTIONS or "" ] ++ lib.toList opt);
|
||||
};
|
||||
in
|
||||
{
|
||||
allegro = addToBuildInputsWithPkgConfig ([ pkgs.allegro5 pkgs.libglvnd ]
|
||||
++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenGL ]);
|
||||
breadline = addToBuildInputs pkgs.readline;
|
||||
@ -35,17 +39,15 @@ in {
|
||||
ezxdisp = addToBuildInputsWithPkgConfig pkgs.xorg.libX11;
|
||||
freetype = addToBuildInputsWithPkgConfig pkgs.freetype;
|
||||
fuse = addToBuildInputsWithPkgConfig pkgs.fuse;
|
||||
# git = addToBuildInputsWithPkgConfig pkgs.libgit2;
|
||||
gl-utils = addPkgConfig;
|
||||
glfw3 = addToBuildInputsWithPkgConfig pkgs.glfw3;
|
||||
glls = addPkgConfig;
|
||||
iconv = addToBuildInputs (lib.optional stdenv.isDarwin pkgs.libiconv);
|
||||
icu = addToBuildInputsWithPkgConfig pkgs.icu;
|
||||
imlib2 = addToBuildInputsWithPkgConfig pkgs.imlib2;
|
||||
lazy-ffi = old:
|
||||
# fatal error: 'ffi/ffi.h' file not found
|
||||
(brokenOnDarwin old)
|
||||
// (addToBuildInputs pkgs.libffi old);
|
||||
inotify = old:
|
||||
(addToBuildInputs (lib.optional stdenv.isDarwin pkgs.libinotify-kqueue) old)
|
||||
// lib.optionalAttrs stdenv.isDarwin (addToCscOptions "-L -linotify" old);
|
||||
leveldb = addToBuildInputs pkgs.leveldb;
|
||||
magic = addToBuildInputs pkgs.file;
|
||||
mdh = addToBuildInputs pkgs.pcre;
|
||||
@ -53,10 +55,6 @@ in {
|
||||
ncurses = addToBuildInputsWithPkgConfig [ pkgs.ncurses ];
|
||||
opencl = addToBuildInputs ([ pkgs.opencl-headers pkgs.ocl-icd ]
|
||||
++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenCL ]);
|
||||
opengl = old:
|
||||
# csc: invalid option `-framework OpenGL'
|
||||
(brokenOnDarwin old)
|
||||
// (addToBuildInputsWithPkgConfig [ pkgs.libGL pkgs.libGLU ] old);
|
||||
openssl = addToBuildInputs pkgs.openssl;
|
||||
plot = addToBuildInputs pkgs.plotutils;
|
||||
postgresql = addToBuildInputsWithPkgConfig pkgs.postgresql;
|
||||
@ -69,13 +67,11 @@ in {
|
||||
soil = addToPropagatedBuildInputsWithPkgConfig pkgs.libepoxy;
|
||||
sqlite3 = addToBuildInputs pkgs.sqlite;
|
||||
stemmer = old:
|
||||
# Undefined symbols for architecture arm64: "_sb_stemmer_delete"
|
||||
(brokenOnDarwin old)
|
||||
// (addToBuildInputs pkgs.libstemmer old);
|
||||
(addToBuildInputs pkgs.libstemmer old)
|
||||
// (addToCscOptions "-L -lstemmer" old);
|
||||
stfl = old:
|
||||
# Undefined symbols for architecture arm64: "_clearok"
|
||||
(brokenOnDarwin old)
|
||||
// (addToBuildInputs [ pkgs.ncurses pkgs.stfl ] old);
|
||||
(addToBuildInputs [ pkgs.ncurses pkgs.stfl ] old)
|
||||
// (addToCscOptions "-L -lncurses" old);
|
||||
taglib = addToBuildInputs [ pkgs.zlib pkgs.taglib ];
|
||||
uuid-lib = addToBuildInputs pkgs.libuuid;
|
||||
ws-client = addToBuildInputs pkgs.zlib;
|
||||
@ -85,6 +81,37 @@ in {
|
||||
zmq = addToBuildInputs pkgs.zeromq;
|
||||
zstd = addToBuildInputs pkgs.zstd;
|
||||
|
||||
# less trivial fixes, should be upstreamed
|
||||
git = old: (addToBuildInputsWithPkgConfig pkgs.libgit2 old) // {
|
||||
postPatch = ''
|
||||
substituteInPlace libgit2.scm \
|
||||
--replace "asize" "reserved"
|
||||
'';
|
||||
};
|
||||
lazy-ffi = old: (addToBuildInputs pkgs.libffi old) // {
|
||||
postPatch = ''
|
||||
substituteInPlace lazy-ffi.scm \
|
||||
--replace "ffi/ffi.h" "ffi.h"
|
||||
'';
|
||||
};
|
||||
opengl = old:
|
||||
(addToBuildInputsWithPkgConfig
|
||||
(lib.optionals (!stdenv.isDarwin) [ pkgs.libGL pkgs.libGLU ]
|
||||
++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Foundation pkgs.darwin.apple_sdk.frameworks.OpenGL ])
|
||||
old)
|
||||
// {
|
||||
postPatch = ''
|
||||
substituteInPlace opengl.egg \
|
||||
--replace 'framework ' 'framework" "'
|
||||
'';
|
||||
};
|
||||
posix-shm = old: {
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace build.scm \
|
||||
--replace "-lrt" ""
|
||||
'';
|
||||
};
|
||||
|
||||
# platform changes
|
||||
pledge = addMetaAttrs { platforms = lib.platforms.openbsd; };
|
||||
unveil = addMetaAttrs { platforms = lib.platforms.openbsd; };
|
||||
@ -99,7 +126,6 @@ in {
|
||||
comparse = broken;
|
||||
coops-utils = broken;
|
||||
crypt = broken;
|
||||
git = broken;
|
||||
hypergiant = broken;
|
||||
iup = broken;
|
||||
kiwi = broken;
|
||||
@ -118,12 +144,8 @@ in {
|
||||
|
||||
# mark broken darwin
|
||||
|
||||
# fatal error: 'sys/inotify.h' file not found
|
||||
inotify = brokenOnDarwin;
|
||||
# fatal error: 'mqueue.h' file not found
|
||||
posix-mq = brokenOnDarwin;
|
||||
# ld: library not found for -lrt
|
||||
posix-shm = brokenOnDarwin;
|
||||
# Undefined symbols for architecture arm64: "_pthread_setschedprio"
|
||||
pthreads = brokenOnDarwin;
|
||||
# error: use of undeclared identifier 'B4000000'
|
||||
|
Loading…
Reference in New Issue
Block a user