Merge branch 'darwin-fixes2'

+139 -9
+1 -1
pkgs/applications/misc/rofi/default.nix
··· 37 homepage = https://davedavenport.github.io/rofi; 38 license = licenses.mit; 39 maintainers = with maintainers; [ mbakke garbas ma27 ]; 40 - platforms = with platforms; unix; 41 }; 42 }
··· 37 homepage = https://davedavenport.github.io/rofi; 38 license = licenses.mit; 39 maintainers = with maintainers; [ mbakke garbas ma27 ]; 40 + platforms = with platforms; linux; 41 }; 42 }
+1
pkgs/applications/networking/flent/http-getter.nix
··· 19 description = "Simple getter for HTTP URLs using cURL"; 20 platforms = platforms.unix; 21 license = licenses.gpl3; 22 }; 23 }
··· 19 description = "Simple getter for HTTP URLs using cURL"; 20 platforms = platforms.unix; 21 license = licenses.gpl3; 22 + broken = stdenv.hostPlatform.cc.isClang; 23 }; 24 }
+2
pkgs/applications/window-managers/i3/lock-color.nix
··· 58 # Needs the SSE2 instruction set. See upstream issue 59 # https://github.com/chrjguill/i3lock-color/issues/44 60 platforms = platforms.x86; 61 }; 62 }
··· 58 # Needs the SSE2 instruction set. See upstream issue 59 # https://github.com/chrjguill/i3lock-color/issues/44 60 platforms = platforms.x86; 61 + 62 + broken = stdenv.hostPlatform.cc.isClang; 63 }; 64 }
+1
pkgs/development/interpreters/hugs/default.nix
··· 45 maintainers = with maintainers; [ joachifm ]; 46 license = licenses.bsd3; 47 platforms = platforms.all; 48 }; 49 }
··· 45 maintainers = with maintainers; [ joachifm ]; 46 license = licenses.bsd3; 47 platforms = platforms.all; 48 + broken = stdenv.hostPlatform.cc.isClang; 49 }; 50 }
+1
pkgs/development/libraries/tsocks/default.nix
··· 31 license = stdenv.lib.licenses.gpl2; 32 maintainers = with maintainers; [ edwtjo phreedom ]; 33 platforms = platforms.unix; 34 }; 35 }
··· 31 license = stdenv.lib.licenses.gpl2; 32 maintainers = with maintainers; [ edwtjo phreedom ]; 33 platforms = platforms.unix; 34 + broken = stdenv.hostPlatform.isDarwin; 35 }; 36 }
+1 -1
pkgs/games/tinyfugue/default.nix
··· 31 with any type of text MUD. 32 ''; 33 license = licenses.gpl2; 34 - platforms = ncurses.meta.platforms; 35 maintainers = [ maintainers.KibaFox ]; 36 }; 37 }
··· 31 with any type of text MUD. 32 ''; 33 license = licenses.gpl2; 34 + platforms = platforms.linux; 35 maintainers = [ maintainers.KibaFox ]; 36 }; 37 }
+123
pkgs/os-specific/linux/kmod/darwin.patch
···
··· 1 + diff --git a/Makefile.am b/Makefile.am 2 + index 194e111..0a095b5 100644 3 + --- a/Makefile.am 4 + +++ b/Makefile.am 5 + @@ -80,8 +80,7 @@ EXTRA_DIST += libkmod/README \ 6 + libkmod/COPYING testsuite/COPYING tools/COPYING COPYING 7 + 8 + libkmod_libkmod_la_LDFLAGS = $(AM_LDFLAGS) \ 9 + - -version-info $(LIBKMOD_CURRENT):$(LIBKMOD_REVISION):$(LIBKMOD_AGE) \ 10 + - -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym 11 + + -version-info $(LIBKMOD_CURRENT):$(LIBKMOD_REVISION):$(LIBKMOD_AGE) 12 + libkmod_libkmod_la_DEPENDENCIES = \ 13 + shared/libshared.la \ 14 + ${top_srcdir}/libkmod/libkmod.sym 15 + @@ -91,8 +90,7 @@ libkmod_libkmod_la_LIBADD = \ 16 + 17 + noinst_LTLIBRARIES += libkmod/libkmod-internal.la 18 + libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES) 19 + -libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \ 20 + - -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym 21 + +libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) 22 + libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES) 23 + libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD) 24 + 25 + diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c 26 + index 889f264..6f0a285 100644 27 + --- a/libkmod/libkmod-module.c 28 + +++ b/libkmod/libkmod-module.c 29 + @@ -787,7 +787,11 @@ KMOD_EXPORT int kmod_module_remove_module(struct kmod_module *mod, 30 + flags &= KMOD_REMOVE_FORCE; 31 + flags |= KMOD_REMOVE_NOWAIT; 32 + 33 + +#if defined(__linux__) 34 + err = delete_module(mod->name, flags); 35 + +#else 36 + + err = -1; 37 + +#endif 38 + if (err != 0) { 39 + err = -errno; 40 + ERR(mod->ctx, "could not remove '%s': %m\n", mod->name); 41 + @@ -879,7 +883,11 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod, 42 + } 43 + size = kmod_file_get_size(mod->file); 44 + 45 + +#if defined(__linux__) 46 + err = init_module(mem, size, args); 47 + +#else 48 + + err = -1; 49 + +#endif 50 + init_finished: 51 + if (err < 0) { 52 + err = -errno; 53 + diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c 54 + index 429ffbd..17a3b9c 100644 55 + --- a/libkmod/libkmod-signature.c 56 + +++ b/libkmod/libkmod-signature.c 57 + @@ -17,7 +17,10 @@ 58 + * License along with this library; if not, see <http://www.gnu.org/licenses/>. 59 + */ 60 + 61 + +#if defined(__linux__) 62 + #include <endian.h> 63 + +#endif 64 + + 65 + #include <inttypes.h> 66 + #include <stdio.h> 67 + #include <stdlib.h> 68 + diff --git a/shared/macro.h b/shared/macro.h 69 + index 4fc5405..b5a2702 100644 70 + --- a/shared/macro.h 71 + +++ b/shared/macro.h 72 + @@ -71,3 +71,7 @@ 73 + #endif 74 + 75 + #define UNIQ __COUNTER__ 76 + + 77 + + #if !defined(__linux__) 78 + +#define program_invocation_short_name getprogname() 79 + +#endif 80 + diff --git a/shared/missing.h b/shared/missing.h 81 + index 4c0d136..ad8ec0f 100644 82 + --- a/shared/missing.h 83 + +++ b/shared/missing.h 84 + @@ -45,6 +45,9 @@ static inline int finit_module(int fd, const char *uargs, int flags) 85 + #endif 86 + 87 + #if !HAVE_DECL_BE32TOH 88 + + 89 + +#if defined(__linux__) 90 + + 91 + #include <endian.h> 92 + #include <byteswap.h> 93 + #if __BYTE_ORDER == __LITTLE_ENDIAN 94 + @@ -52,4 +55,16 @@ static inline int finit_module(int fd, const char *uargs, int flags) 95 + #else 96 + #define be32toh(x) (x) 97 + #endif 98 + + 99 + +#elif defined(__APPLE__) 100 + + 101 + +#include <libkern/OSByteOrder.h> 102 + +#define be32toh(x) OSSwapBigToHostInt32(x) 103 + + 104 + +#else 105 + + 106 + +#error No be32toh known for platform 107 + + 108 + +#endif 109 + + 110 + #endif 111 + diff --git a/shared/util.c b/shared/util.c 112 + index fd2028d..ecb0141 100644 113 + --- a/shared/util.c 114 + +++ b/shared/util.c 115 + @@ -367,7 +367,7 @@ char *path_make_absolute_cwd(const char *p) 116 + if (path_is_absolute(p)) 117 + return strdup(p); 118 + 119 + - cwd = get_current_dir_name(); 120 + + cwd = getcwd(NULL, 0); 121 + if (!cwd) 122 + return NULL; 123 +
+6 -4
pkgs/os-specific/linux/kmod/default.nix
··· 1 - { stdenv, buildPackages, lib, fetchurl, autoreconfHook, pkgconfig, libxslt, xz }: 2 3 let 4 systems = [ "/run/current-system/kernel-modules" "/run/booted-system/kernel-modules" "" ]; ··· 14 }; 15 16 nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ]; 17 - buildInputs = [ xz ]; 18 19 configureFlags = [ 20 "--sysconfdir=/etc" ··· 22 "--with-modulesdirs=${modulesDirs}" 23 ]; 24 25 - patches = [ ./module-dir.patch ]; 26 27 postInstall = '' 28 for prog in rmmod insmod lsmod modinfo modprobe depmod; do ··· 37 homepage = https://www.kernel.org/pub/linux/utils/kernel/kmod/; 38 description = "Tools for loading and managing Linux kernel modules"; 39 license = licenses.lgpl21; 40 - platforms = platforms.linux; 41 }; 42 }
··· 1 + { stdenv, buildPackages, lib, fetchurl, autoreconfHook, pkgconfig 2 + , libxslt, xz, elf-header }: 3 4 let 5 systems = [ "/run/current-system/kernel-modules" "/run/booted-system/kernel-modules" "" ]; ··· 15 }; 16 17 nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ]; 18 + buildInputs = [ xz elf-header ]; 19 20 configureFlags = [ 21 "--sysconfdir=/etc" ··· 23 "--with-modulesdirs=${modulesDirs}" 24 ]; 25 26 + patches = [ ./module-dir.patch ] 27 + ++ lib.optional stdenv.isDarwin ./darwin.patch; 28 29 postInstall = '' 30 for prog in rmmod insmod lsmod modinfo modprobe depmod; do ··· 39 homepage = https://www.kernel.org/pub/linux/utils/kernel/kmod/; 40 description = "Tools for loading and managing Linux kernel modules"; 41 license = licenses.lgpl21; 42 + platforms = platforms.unix; 43 }; 44 }
+3 -3
pkgs/tools/filesystems/btrfs-progs/default.nix
··· 1 { stdenv, fetchurl, fetchpatch, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo 2 - , asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt, zstd, python3, python3Packages 3 }: 4 5 stdenv.mkDerivation rec { ··· 12 }; 13 14 nativeBuildInputs = [ 15 - pkgconfig asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt python3 python3Packages.setuptools 16 ]; 17 18 - buildInputs = [ attr acl zlib libuuid e2fsprogs lzo zstd ]; 19 20 # gcc bug with -O1 on ARM with gcc 4.8 21 # This should be fine on all platforms so apply universally
··· 1 { stdenv, fetchurl, fetchpatch, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo 2 + , asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt, zstd, python, pythonPackages 3 }: 4 5 stdenv.mkDerivation rec { ··· 12 }; 13 14 nativeBuildInputs = [ 15 + pkgconfig asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt python pythonPackages.setuptools 16 ]; 17 18 + buildInputs = [ attr acl zlib libuuid e2fsprogs lzo zstd python ]; 19 20 # gcc bug with -O1 on ARM with gcc 4.8 21 # This should be fine on all platforms so apply universally