git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #17685 from matthewbauer/darwin-misc2

Darwin misc. fixes

commit3f337a2b23eab043fbea3b15796e7002dfa96751 authorDaniel Peebles <copumpkin@users.noreply.github.com> dateWed 24 Aug 2016, 11:52 (10 years ago) parent76223aaa6faa04
44 files changed+162−49
pkgs/applications/audio/bs1770gain/default.nix+2 pkgs/applications/audio/cd-discid/default.nix+5−1 pkgs/applications/editors/geany/default.nix+2 pkgs/applications/editors/mg/default.nix+3 pkgs/applications/graphics/gpicview/default.nix+8−1 pkgs/applications/misc/gkrellm/default.nix+4−2 pkgs/applications/networking/nload/default.nix+1−1 pkgs/applications/window-managers/i3/blocks-gaps.nix+1−1 pkgs/development/interpreters/erlang/R16.nix+4−2 pkgs/development/interpreters/rakudo/default.nix+4−2 pkgs/development/libraries/boringssl/default.nix+1−1 pkgs/development/libraries/dclxvi/default.nix+8 pkgs/development/libraries/fox/default.nix+4−2 pkgs/development/libraries/gegl/default.nix+4−2 pkgs/development/libraries/glew/1.10.nix+3−1 pkgs/development/libraries/libfreefare/default.nix+3−2 pkgs/development/libraries/libomxil-bellagio/default.nix+1−1 pkgs/development/libraries/libsecret/default.nix+2 pkgs/development/libraries/libstatgrab/default.nix+4−1 pkgs/development/libraries/nspr/default.nix+4−1 pkgs/development/libraries/stfl/default.nix+1 pkgs/development/tools/analysis/cccc/default.nix+1 pkgs/development/tools/misc/stm32flash/default.nix+2 pkgs/development/tools/misc/tie/default.nix+1−1 pkgs/misc/sailsd/default.nix+5 pkgs/servers/mqtt/mosquitto/default.nix+3−2 pkgs/tools/X11/runningx/default.nix+1−1 pkgs/tools/X11/setroot/default.nix+1−1 pkgs/tools/filesystems/genromfs/default.nix+3−1 pkgs/tools/misc/dumptorrent/default.nix+5 pkgs/tools/misc/fontforge/default.nix+3−1 pkgs/tools/misc/sl/default.nix+2 pkgs/tools/misc/unclutter/default.nix+2 pkgs/tools/networking/tlsdate/default.nix+1−1 pkgs/tools/security/pcsclite/default.nix+4−2 pkgs/tools/security/stricat/default.nix+2 pkgs/tools/system/dog/default.nix+5 pkgs/tools/system/hardlink/default.nix+1−1 pkgs/tools/system/smartmontools/default.nix+4−1 pkgs/tools/system/tm/default.nix+3−1 pkgs/tools/system/yeshup/default.nix+1−1 pkgs/tools/text/odt2txt/default.nix+4−2 pkgs/tools/text/unrtf/default.nix+4−1 pkgs/top-level/all-packages.nix+35−11
pkgs/applications/audio/bs1770gain/default.nix+2
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
1111
1212 buildInputs = [ ffmpeg sox ];
1313
14+ NIX_CFLAGS_COMPILE = "-Wno-error";
15+
1416 meta = {
1517 description = "A audio/video loudness scanner implementing ITU-R BS.1770";
1618 license = stdenv.lib.licenses.gpl2Plus;
pkgs/applications/audio/cd-discid/default.nix+5−1
@@ -1,4 +1,5 @@
1−{ fetchurl, stdenv }:
1+{ fetchurl, stdenv
2+, IOKit ? null }:
23
34stdenv.mkDerivation rec {
45 name = "cd-discid-${version}";
@@ -11,6 +12,9 @@ stdenv.mkDerivation rec {
1112
1213 installFlags = "PREFIX=$(out) INSTALL=install";
1314
15+ buildInputs = []
16+ ++ stdenv.lib.optional stdenv.isDarwin [ IOKit ];
17+
1418 meta = with stdenv.lib; {
1519 homepage = http://linukz.org/cd-discid.shtml;
1620 license = licenses.gpl2Plus;
pkgs/applications/editors/geany/default.nix+2
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
1212 sha256 = "0nha21rbdhl10vdpaq8d5v5fszvggl1xar555pvrnvm2y443ffpp";
1313 };
1414
15+ NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
16+
1517 buildInputs = [ gtk2 which pkgconfig intltool file ];
1618
1719 doCheck = true;
pkgs/applications/editors/mg/default.nix+3
@@ -12,6 +12,9 @@ stdenv.mkDerivation rec {
1212 patches = [ ./configure.patch ];
1313 patchFlags = "-p0";
1414
15+ NIX_CFLAGS_COMPILE = "-Wno-error";
16+ buildFlags = [ "CC=cc" ];
17+
1518 installPhase = ''
1619 mkdir -p $out/bin
1720 cp mg $out/bin
pkgs/applications/graphics/gpicview/default.nix+8−1
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, intltool, pkgconfig, gtk2 }:
1+{ stdenv, fetchurl, intltool, pkgconfig, gtk2, fetchpatch }:
22
33stdenv.mkDerivation {
44 name = "gpicview-0.2.4";
@@ -8,6 +8,13 @@ stdenv.mkDerivation {
88 sha256 = "1svcy1c8bgk0pl12yhyv16h2fl52x5vzzcv57z6qdcv5czgvgglr";
99 };
1010
11+ patches = [
12+ (fetchpatch {
13+ url = "https://raw.githubusercontent.com/nonas/debian-clang/master/buildlogs/gpicview/gpicview-0.2.4/debian/patches/clang_FTBFS_Wreturn-type.patch";
14+ sha256 = "02dm966bplnv10knpdx7rlpjipk884156ggd9ij05zhza0jl8xcs";
15+ })
16+ ];
17+
1118 meta = with stdenv.lib; {
1219 description = "A simple and fast image viewer for X";
1320 homepage = http://lxde.sourceforge.net/gpicview/;
pkgs/applications/misc/gkrellm/default.nix+4−2
@@ -1,4 +1,5 @@
1−{ fetchurl, stdenv, gettext, pkgconfig, glib, gtk, libX11, libSM, libICE }:
1+{ fetchurl, stdenv, gettext, pkgconfig, glib, gtk, libX11, libSM, libICE
2+, IOKit ? null }:
23
34stdenv.mkDerivation rec {
45 name = "gkrellm-2.3.5";
@@ -7,7 +8,8 @@ stdenv.mkDerivation rec {
78 sha256 = "12rc6zaa7kb60b9744lbrlfkxxfniprm6x0mispv63h4kh75navh";
89 };
910
10− buildInputs = [gettext pkgconfig glib gtk libX11 libSM libICE];
11+ buildInputs = [gettext pkgconfig glib gtk libX11 libSM libICE]
12+ ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit ];
1113
1214 # Makefiles are patched to fix references to `/usr/X11R6' and to add
1315 # `-lX11' to make sure libX11's store path is in the RPATH.
pkgs/applications/networking/nload/default.nix+1−1
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
2121 '';
2222 homepage = http://www.roland-riegel.de/nload/index.html;
2323 license = stdenv.lib.licenses.gpl2;
24− platforms = stdenv.lib.platforms.unix;
24+ platforms = stdenv.lib.platforms.linux;
2525 maintainers = [ stdenv.lib.maintainers.devhell ];
2626 };
2727}
pkgs/applications/window-managers/i3/blocks-gaps.nix+1−1
@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
1919 homepage = https://github.com/Airblader/i3blocks-gaps;
2020 license = licenses.gpl3;
2121 maintainers = [ "carlsverre" ];
22− platforms = platforms.all;
22+ platforms = platforms.linux;
2323 };
2424}
pkgs/development/interpreters/erlang/R16.nix+4−2
@@ -2,7 +2,8 @@
22, gnused, gawk, makeWrapper
33, odbcSupport ? false, unixODBC ? null
44, wxSupport ? false, mesa ? null, wxGTK ? null, xorg ? null
5−, enableDebugInfo ? false }:
5+, enableDebugInfo ? false
6+, Carbon ? null, Cocoa ? null }:
67
78assert wxSupport -> mesa != null && wxGTK != null && xorg != null;
89assert odbcSupport -> unixODBC != null;
@@ -23,7 +24,8 @@ stdenv.mkDerivation rec {
2324 buildInputs =
2425 [ perl gnum4 ncurses openssl makeWrapper
2526 ] ++ optional wxSupport [ mesa wxGTK xorg.libX11 ]
26− ++ optional odbcSupport [ unixODBC ];
27+ ++ optional odbcSupport [ unixODBC ]
28+ ++ optional stdenv.isDarwin [ Carbon Cocoa ];
2729
2830 patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
2931
pkgs/development/interpreters/rakudo/default.nix+4−2
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl, perl, icu, zlib, gmp, readline }:
1+{ stdenv, fetchurl, perl, icu, zlib, gmp, readline
2+, CoreServices, ApplicationServices }:
23
34stdenv.mkDerivation rec {
45 name = "rakudo-star-${version}";
@@ -9,7 +10,8 @@ stdenv.mkDerivation rec {
910 sha256 = "0czx7w1chf108mpyps7k7nqq8cbsy1rbb87ajms9xj65l4ywg8ka";
1011 };
1112
12− buildInputs = [ icu zlib gmp readline perl ];
13+ buildInputs = [ icu zlib gmp readline perl ]
14+ ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ];
1315 configureScript = "perl ./Configure.pl";
1416 configureFlags =
1517 [ "--backends=moar"
pkgs/development/libraries/boringssl/default.nix+1−1
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
1212
1313 buildInputs = [ cmake perl go ];
1414 enableParallelBuilding = true;
15− NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
15+ NIX_CFLAGS_COMPILE = "-Wno-error";
1616
1717 installPhase = ''
1818 mkdir -p $out/bin $out/include $out/lib
pkgs/development/libraries/dclxvi/default.nix+8
@@ -12,6 +12,14 @@ stdenv.mkDerivation {
1212
1313 buildFlags = [ "libdclxvipairing.so" ];
1414
15+ patchPhase = ''
16+ substituteInPlace Makefile \
17+ --replace "gcc" "cc"
18+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
19+ substituteInPlace Makefile \
20+ --replace "-soname=libdclxvipairing.so" "-install_name,libdclxvipairing.so"
21+ '';
22+
1523 installPhase = ''
1624 mkdir -p $out/{include,lib}
1725 find . -name \*.h -exec cp {} $out/include \;
pkgs/development/libraries/fox/default.nix+4−2
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl, xlibsWrapper, libpng, libjpeg, libtiff, zlib, bzip2, libXcursor, libXrandr, libXft }:
1+{ stdenv, fetchurl, xlibsWrapper, libpng, libjpeg, libtiff, zlib, bzip2, libXcursor, libXrandr, libXft
2+, CoreServices ? null }:
23
34let
45 version = "1.7.9";
@@ -12,7 +13,8 @@ stdenv.mkDerivation rec {
1213 sha256 = "1jb9368xsin3ppdf6979n5s7in3s9klbxqbwcp0z8misjixl7nzg";
1314 };
1415
15− buildInputs = [ libpng xlibsWrapper libjpeg libtiff zlib bzip2 libXcursor libXrandr libXft ];
16+ buildInputs = [ libpng xlibsWrapper libjpeg libtiff zlib bzip2 libXcursor libXrandr libXft ]
17+ ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
1618
1719 doCheck = true;
1820
pkgs/development/libraries/gegl/default.nix+4−2
@@ -1,5 +1,6 @@
11{ stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg
2−, librsvg, pango, gtk, bzip2, intltool }:
2+, librsvg, pango, gtk, bzip2, intltool
3+, OpenGL ? null }:
34
45stdenv.mkDerivation rec {
56 name = "gegl-0.2.0";
@@ -21,7 +22,8 @@ stdenv.mkDerivation rec {
2122
2223 NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
2324
24− buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk bzip2 intltool ];
25+ buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk bzip2 intltool ]
26+ ++ stdenv.lib.optional stdenv.isDarwin OpenGL;
2527
2628 nativeBuildInputs = [ pkgconfig ];
2729
pkgs/development/libraries/glew/1.10.nix+3−1
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }:
1+{ stdenv, fetchurl, mesa_glu, x11, libXmu, libXi
2+, AGL ? null }:
23
34with stdenv.lib;
45
@@ -12,6 +13,7 @@ stdenv.mkDerivation rec {
1213
1314 nativeBuildInputs = [ x11 libXmu libXi ];
1415 propagatedNativeBuildInputs = [ mesa_glu ]; # GL/glew.h includes GL/glu.h
16+ buildInputs = [] ++ optionals stdenv.isDarwin [ AGL ];
1517
1618 patchPhase = ''
1719 sed -i 's|lib64|lib|' config/Makefile.linux
pkgs/development/libraries/libfreefare/default.nix+3−2
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl, pkgconfig, libnfc, openssl }:
1+{ stdenv, fetchurl, pkgconfig, libnfc, openssl
2+, libobjc ? null }:
23
34stdenv.mkDerivation rec {
45 name = "libfreefare-${version}";
@@ -9,7 +10,7 @@ stdenv.mkDerivation rec {
910 sha256 = "0r5wfvwgf35lb1v65wavnwz2wlfyfdims6a9xpslf4lsm4a1v8xz";
1011 };
1112
12− buildInputs = [ pkgconfig libnfc openssl ];
13+ buildInputs = [ pkgconfig libnfc openssl ] ++ stdenv.lib.optional stdenv.isDarwin libobjc;
1314
1415 meta = with stdenv.lib; {
1516 description = "The libfreefare project aims to provide a convenient API for MIFARE card manipulations";
pkgs/development/libraries/libomxil-bellagio/default.nix+1−1
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
1515 homepage = http://sourceforge.net/projects/omxil/;
1616 description = "An opensource implementation of the Khronos OpenMAX Integration Layer API to access multimedia components";
1717 license = licenses.lgpl21;
18− platforms = platforms.all;
18+ platforms = platforms.linux;
1919 maintainers = with maintainers; [ wkennington ];
2020 };
2121}
pkgs/development/libraries/libsecret/default.nix+2
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
1111 sha256 = "1cychxc3ff8fp857iikw0n2s13s2mhw2dn1mr632f7w3sn6vvrww";
1212 };
1313
14+ NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
15+
1416 propagatedBuildInputs = [ glib ];
1517 nativeBuildInputs = [ pkgconfig intltool libxslt docbook_xsl ];
1618 buildInputs = [ libgcrypt gobjectIntrospection vala_0_32 ];
pkgs/development/libraries/libstatgrab/default.nix+4−1
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl }:
1+{ stdenv, fetchurl
2+, IOKit ? null }:
23
34stdenv.mkDerivation rec {
45 name = "libstatgrab-0.91";
@@ -8,6 +9,8 @@ stdenv.mkDerivation rec {
89 sha256 = "1azinx2yzs442ycwq6p15skl3mscmqj7fd5hq7fckhjp92735s83";
910 };
1011
12+ buildInputs = [] ++ stdenv.lib.optional stdenv.isDarwin IOKit;
13+
1114 meta = with stdenv.lib; {
1215 homepage = http://www.i-scream.org/libstatgrab/;
1316 description = "A library that provides cross platforms access to statistics about the running system";
pkgs/development/libraries/nspr/default.nix+4−1
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl }:
1+{ stdenv, fetchurl
2+, CoreServices ? null }:
23
34let version = "4.12"; in
45
@@ -27,6 +28,8 @@ stdenv.mkDerivation {
2728 moveToOutput share "$dev" # just aclocal
2829 '';
2930
31+ buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
32+
3033 enableParallelBuilding = true;
3134
3235 meta = {
pkgs/development/libraries/stfl/default.nix+1
@@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
1111 buildInputs = [ ncurses libiconv ];
1212
1313 buildPhase = ''
14+ sed -i s/gcc/cc/g Makefile
1415 sed -i s%ncursesw/ncurses.h%ncurses.h% stfl_internals.h
1516 '' + ( stdenv.lib.optionalString stdenv.isDarwin ''
1617 sed -i 's/LDLIBS += -lncursesw/LDLIBS += -lncursesw -liconv/' Makefile
pkgs/development/tools/analysis/cccc/default.nix+1
@@ -16,6 +16,7 @@ stdenv.mkDerivation {
1616 substituteInPlace install/install.mak --replace /usr/local/bin $out/bin
1717 substituteInPlace install/install.mak --replace MKDIR=mkdir "MKDIR=mkdir -p"
1818 '';
19+ buildFlags = [ "CCC=c++" "LD=c++" ];
1920
2021 meta = {
2122 description = "C and C++ Code Counter";
pkgs/development/tools/misc/stm32flash/default.nix+2
@@ -8,6 +8,8 @@ stdenv.mkDerivation {
88 sha256 = "04k631g9lzvp9xr4sw51xpq1g542np61s1l8fpwx9rbsc8m5l0i6";
99 };
1010
11+ buildFlags = [ "CC=cc" ];
12+
1113 installPhase = ''
1214 # Manually copy, make install copies to /usr/local/bin
1315 mkdir -pv $out/bin/
pkgs/development/tools/misc/tie/default.nix+1−1
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
1010 };
1111
1212 buildPhase = ''
13− gcc tie.c -o tie
13+ cc tie.c -o tie
1414 '';
1515
1616 installPhase = ''
pkgs/misc/sailsd/default.nix+5
@@ -28,6 +28,11 @@ stdenv.mkDerivation rec {
2828 chmod 755 -R $sourceRoot/libsailing
2929 '';
3030
31+ patchPhase = ''
32+ substituteInPlace Makefile \
33+ --replace gcc cc
34+ '';
35+
3136 meta = with stdenv.lib; {
3237 description = "Simulator daemon for autonomous sailing boats";
3338 homepage = https://github.com/sails-simulator/sailsd;
pkgs/servers/mqtt/mosquitto/default.nix+3−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, openssl, libuuid }:
1+{ stdenv, fetchurl, openssl, libuuid, cmake }:
22
33stdenv.mkDerivation rec {
44 pname = "mosquitto";
@@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
1111 sha256 = "1imw5ps0cqda41b574k8hgz9gdr8yy58f76fg8gw14pdnvf3l7sr";
1212 };
1313
14− buildInputs = [ openssl libuuid ];
14+ buildInputs = [ openssl libuuid ]
15+ ++ stdenv.lib.optional stdenv.isDarwin cmake;
1516
1617 makeFlags = [
1718 "DESTDIR=$(out)"
pkgs/tools/X11/runningx/default.nix+1−1
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
1616 phases = [ "buildPhase" "installPhase" ];
1717
1818 buildPhase = ''
19− gcc -O2 -o RunningX $(pkg-config --cflags --libs x11) $src
19+ cc -O2 -o RunningX $(pkg-config --cflags --libs x11) $src
2020 '';
2121
2222 installPhase = ''
pkgs/tools/X11/setroot/default.nix+1−1
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
1818 buildInputs = [ libX11 imlib2 ]
1919 ++ stdenv.lib.optional enableXinerama libXinerama;
2020
21− buildFlags = if enableXinerama then "xinerama=1" else "xinerama=0";
21+ buildFlags = "CC=cc " + (if enableXinerama then "xinerama=1" else "xinerama=0");
2222
2323 installFlags = "DESTDIR=$(out) PREFIX=";
2424
pkgs/tools/filesystems/genromfs/default.nix+3−1
@@ -10,7 +10,9 @@ stdenv.mkDerivation rec {
1010 };
1111
1212 postPatch = ''
13− substituteInPlace Makefile --replace "prefix = /usr" "prefix = $out"
13+ substituteInPlace Makefile \
14+ --replace "prefix = /usr" "prefix = $out" \
15+ --replace "gcc" "cc"
1416 '';
1517
1618 meta = with stdenv.lib; {
pkgs/tools/misc/dumptorrent/default.nix+5
@@ -9,6 +9,11 @@ stdenv.mkDerivation rec {
99 sha256 = "073h03bmpfdy15qh37lvppayld2747i4acpyk0pm5nf2raiak0zm";
1010 };
1111
12+ patchPhase = ''
13+ substituteInPlace Makefile \
14+ --replace "gcc" "cc"
15+ '';
16+
1217 installPhase = ''
1318 mkdir -p $out/bin
1419 cp ./dumptorrent $out/bin
pkgs/tools/misc/fontforge/default.nix+3−1
@@ -3,6 +3,7 @@
33, python, freetype, zlib, glib, libungif, libpng, libjpeg, libtiff, libxml2, pango
44, withGTK ? false, gtk2
55, withPython ? true
6+, Carbon ? null, Cocoa ? null
67}:
78
89stdenv.mkDerivation rec {
@@ -30,7 +31,8 @@ stdenv.mkDerivation rec {
3031 python freetype zlib glib libungif libpng libjpeg libtiff libxml2
3132 pango
3233 ]
33− ++ lib.optionals withGTK [ gtk2 ];
34+ ++ lib.optionals withGTK [ gtk2 ]
35+ ++ lib.optionals (withGTK && stdenv.isDarwin) [ Carbon Cocoa ];
3436
3537 configureFlags =
3638 lib.optionals (!withPython) [ "--disable-python-scripting" "--disable-python-extension" ]
pkgs/tools/misc/sl/default.nix+2
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
1313
1414 buildInputs = [ ncurses ];
1515
16+ buildFlags = [ "CC=cc" ];
17+
1618 installPhase = ''
1719 mkdir -p $out/bin $out/share/man/man1
1820 cp sl $out/bin
pkgs/tools/misc/unclutter/default.nix+2
@@ -9,6 +9,8 @@ stdenv.mkDerivation {
99
1010 buildInputs = [xlibsWrapper];
1111
12+ buildFlags = [ "CC=cc" ];
13+
1214 installPhase = ''
1315 mkdir -pv "$out/bin"
1416 mkdir -pv "$out/share/man/man1"
pkgs/tools/networking/tlsdate/default.nix+1−1
@@ -46,6 +46,6 @@ stdenv.mkDerivation rec {
4646 description = "Secure parasitic rdate replacement";
4747 homepage = https://github.com/ioerror/tlsdate;
4848 maintainers = with maintainers; [ tv fpletz ];
49− platforms = platforms.allBut [ "darwin" ];
49+ platforms = platforms.allBut platforms.darwin;
5050 };
5151}
pkgs/tools/security/pcsclite/default.nix+4−2
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl, pkgconfig, udev, dbus_libs, perl, python2 }:
1+{ stdenv, fetchurl, pkgconfig, udev, dbus_libs, perl, python2
2+, IOKit ? null }:
23
34stdenv.mkDerivation rec {
45 name = "pcsclite-${version}";
@@ -26,7 +27,8 @@ stdenv.mkDerivation rec {
2627 '';
2728
2829 nativeBuildInputs = [ pkgconfig perl python2 ];
29− buildInputs = stdenv.lib.optionals stdenv.isLinux [ udev dbus_libs ];
30+ buildInputs = stdenv.lib.optionals stdenv.isLinux [ udev dbus_libs ]
31+ ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit ];
3032
3133 meta = with stdenv.lib; {
3234 description = "Middleware to access a smart card using SCard API (PC/SC)";
pkgs/tools/security/stricat/default.nix+2
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
99 sha256 = "1axg8r4g5n5kdqj5013pgck80nni3z172xkg506vz4zx1zcmrm4r";
1010 };
1111
12+ buildFlags = [ "CC=cc" ];
13+
1214 installPhase = ''
1315 mkdir -p $out/bin
1416 mv stricat $out/bin
pkgs/tools/system/dog/default.nix+5
@@ -8,6 +8,11 @@ stdenv.mkDerivation rec {
88 sha256 = "3ef25907ec5d1dfb0df94c9388c020b593fbe162d7aaa9bd08f35d2a125af056";
99 };
1010
11+ patchPhase = ''
12+ substituteInPlace Makefile \
13+ --replace "gcc" "cc"
14+ '';
15+
1116 installPhase = ''
1217 mkdir -p $out/bin
1318 mkdir -p $out/man/man1
pkgs/tools/system/hardlink/default.nix+1−1
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
1414
1515 installPhase = ''
1616 mkdir -p $out/bin $out/share/man/man1
17− gcc -O2 hardlink.c -o $out/bin/hardlink
17+ cc -O2 hardlink.c -o $out/bin/hardlink
1818 mv hardlink.1 $out/share/man/man1/hardlink.1
1919 '';
2020
pkgs/tools/system/smartmontools/default.nix+4−1
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl }:
1+{ stdenv, fetchurl
2+, IOKit ? null }:
23
34let
45 version = "6.4";
@@ -18,6 +19,8 @@ stdenv.mkDerivation rec {
1819 sha256 = "11bsxcghh7adzdklcslamlynydxb708vfz892d5w7agdq405ddza";
1920 };
2021
22+ buildInputs = [] ++ stdenv.lib.optional stdenv.isDarwin IOKit;
23+
2124 patchPhase = ''
2225 cp ${driverdb} drivedb.h
2326 sed -i -e 's@which which >/dev/null || exit 1@alias which="type -p"@' update-smart-drivedb.in
pkgs/tools/system/tm/default.nix+3−1
@@ -6,7 +6,9 @@ stdenv.mkDerivation {
66
77 installPhase=''make install "PREFIX=$out"'';
88
9− patchPhase = ''sed -i 's@/usr/bin/install@install@g' Makefile'';
9+ patchPhase = ''
10+ sed -i 's@/usr/bin/install@install@g ; s/gcc/cc/g' Makefile
11+ '';
1012
1113 crossAttrs = {
1214 makeFlags = "CC=${stdenv.cross.config}-gcc";
pkgs/tools/system/yeshup/default.nix+1−1
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
1818
1919 meta = with stdenv.lib; {
2020 homepage = https://github.com/RhysU/yeshup;
21− platforms = platforms.all;
21+ platforms = platforms.linux;
2222 license = licenses.cc-by-sa-30; # From Stackoverflow answer
2323 maintainers = with maintainers; [ obadz ];
2424 };
pkgs/tools/text/odt2txt/default.nix+4−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, zlib }:
1+{ stdenv, fetchurl, zlib, libiconv }:
22
33stdenv.mkDerivation rec {
44 name = "odt2txt-0.4";
@@ -10,7 +10,9 @@ stdenv.mkDerivation rec {
1010
1111 configurePhase="export makeFlags=\"DESTDIR=$out\"";
1212
13− buildInputs = [ zlib ];
13+ buildInputs = [ zlib libiconv ];
14+
15+ NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-liconv";
1416
1517 meta = {
1618 description = "Simple .odt to .txt converter";
pkgs/tools/text/unrtf/default.nix+4−1
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, autoconf, automake }:
1+{ stdenv, fetchurl, autoconf, automake, libiconv }:
22
33stdenv.mkDerivation rec {
44 name = "unrtf-${version}";
@@ -11,6 +11,9 @@ stdenv.mkDerivation rec {
1111
1212 nativeBuildInputs = [ autoconf automake ];
1313
14+ buildInputs = [ ] ++ stdenv.lib.optional stdenv.isDarwin libiconv;
15+ NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-liconv";
16+
1417 preConfigure = "./bootstrap";
1518
1619 outputs = [ "out" "man" ];
pkgs/top-level/all-packages.nix+35−11
@@ -1607,6 +1607,7 @@ in
16071607 fontforge = lowPrio (callPackage ../tools/misc/fontforge { });
16081608 fontforge-gtk = callPackage ../tools/misc/fontforge {
16091609 withGTK = true;
1610+ inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
16101611 };
16111612
16121613 fontmatrix = callPackage ../applications/graphics/fontmatrix {};
@@ -1619,6 +1620,7 @@ in
16191620
16201621 fox = callPackage ../development/libraries/fox/default.nix {
16211622 libpng = libpng12;
1623+ inherit (darwin.apple_sdk.frameworks) CoreServices;
16221624 };
16231625
16241626 fox_1_6 = callPackage ../development/libraries/fox/fox-1.6.nix { };
@@ -3022,7 +3024,9 @@ in
30223024
30233025 pciutils = callPackage ../tools/system/pciutils { };
30243026
3025− pcsclite = callPackage ../tools/security/pcsclite { };
3027+ pcsclite = callPackage ../tools/security/pcsclite {
3028+ inherit (darwin.apple_sdk.frameworks) IOKit;
3029+ };
30263030
30273031 pcsctools = callPackage ../tools/security/pcsctools {
30283032 inherit (perlPackages) pcscperl Glib Gtk2 Pango;
@@ -3497,7 +3501,9 @@ in
34973501
34983502 slsnif = callPackage ../tools/misc/slsnif { };
34993503
3500− smartmontools = callPackage ../tools/system/smartmontools { };
3504+ smartmontools = callPackage ../tools/system/smartmontools {
3505+ inherit (darwin.apple_sdk.frameworks) IOKit;
3506+ };
35013507
35023508 smbldaptools = callPackage ../tools/networking/smbldaptools {
35033509 inherit (perlPackages) NetLDAP CryptSmbHash DigestSHA1;
@@ -5676,7 +5682,9 @@ in
56765682
56775683 clooj = callPackage ../development/interpreters/clojure/clooj.nix { };
56785684
5679− erlangR16 = callPackage ../development/interpreters/erlang/R16.nix { };
5685+ erlangR16 = callPackage ../development/interpreters/erlang/R16.nix {
5686+ inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
5687+ };
56805688 erlangR16_odbc = callPackage ../development/interpreters/erlang/R16.nix { odbcSupport = true; };
56815689 erlangR17 = callPackage ../development/interpreters/erlang/R17.nix {
56825690 inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
@@ -5962,7 +5970,9 @@ in
59625970
59635971 racket = callPackage ../development/interpreters/racket { };
59645972
5965− rakudo = callPackage ../development/interpreters/rakudo { };
5973+ rakudo = callPackage ../development/interpreters/rakudo {
5974+ inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices;
5975+ };
59665976
59675977 rascal = callPackage ../development/interpreters/rascal { };
59685978
@@ -7317,7 +7327,9 @@ in
73177327
73187328 gephi = callPackage ../applications/science/misc/gephi { };
73197329
7320− gegl = callPackage ../development/libraries/gegl { };
7330+ gegl = callPackage ../development/libraries/gegl {
7331+ inherit (darwin.apple_sdk.frameworks) OpenGL;
7332+ };
73217333
73227334 gegl_0_3 = callPackage ../development/libraries/gegl/3.0.nix { };
73237335
@@ -7370,7 +7382,9 @@ in
73707382 gle = callPackage ../development/libraries/gle { };
73717383
73727384 glew = callPackage ../development/libraries/glew { };
7373− glew110 = callPackage ../development/libraries/glew/1.10.nix { };
7385+ glew110 = callPackage ../development/libraries/glew/1.10.nix {
7386+ inherit (darwin.apple_sdk.frameworks) AGL;
7387+ };
73747388
73757389 glfw = self.glfw3;
73767390 glfw2 = callPackage ../development/libraries/glfw/2.x.nix { };
@@ -8117,7 +8131,9 @@ in
81178131
81188132 libffi = callPackage ../development/libraries/libffi { };
81198133
8120− libfreefare = callPackage ../development/libraries/libfreefare { };
8134+ libfreefare = callPackage ../development/libraries/libfreefare {
8135+ inherit (darwin) libobjc;
8136+ };
81218137
81228138 libftdi = callPackage ../development/libraries/libftdi { };
81238139
@@ -8501,7 +8517,9 @@ in
85018517
85028518 libspatialite = callPackage ../development/libraries/libspatialite { };
85038519
8504− libstatgrab = callPackage ../development/libraries/libstatgrab { };
8520+ libstatgrab = callPackage ../development/libraries/libstatgrab {
8521+ inherit (darwin.apple_sdk.frameworks) IOKit;
8522+ };
85058523
85068524 libsvm = callPackage ../development/libraries/libsvm { };
85078525
@@ -8877,7 +8895,9 @@ in
88778895
88788896 non = callPackage ../applications/audio/non { };
88798897
8880− nspr = callPackage ../development/libraries/nspr { };
8898+ nspr = callPackage ../development/libraries/nspr {
8899+ inherit (darwin.apple_sdk.frameworks) CoreServices;
8900+ };
88818901
88828902 nss = lowPrio (callPackage ../development/libraries/nss { });
88838903 nssTools = nss.tools;
@@ -12496,7 +12516,9 @@ in
1249612516
1249712517 cbc = callPackage ../applications/science/math/cbc { };
1249812518
12499− cddiscid = callPackage ../applications/audio/cd-discid { };
12519+ cddiscid = callPackage ../applications/audio/cd-discid {
12520+ inherit (darwin) IOKit;
12521+ };
1250012522
1250112523 cdparanoia = self.cdparanoiaIII;
1250212524
@@ -13329,7 +13351,9 @@ in
1332913351
1333013352 svox = callPackage ../applications/audio/svox { };
1333113353
13332− gkrellm = callPackage ../applications/misc/gkrellm { };
13354+ gkrellm = callPackage ../applications/misc/gkrellm {
13355+ inherit (darwin) IOKit;
13356+ };
1333313357
1333413358 gmu = callPackage ../applications/audio/gmu { };
1333513359