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