Compare commits
5 Commits
master
...
devplayer0
Author | SHA1 | Date | |
---|---|---|---|
a28c46933e | |||
4af984b1fd | |||
0a72bce07f | |||
437193c757 | |||
798b11de8e |
@ -230,6 +230,7 @@ let
|
||||
sectionVLAN = checkUnitConfig "VLAN" [
|
||||
(assertOnlyFields [
|
||||
"Id"
|
||||
"Protocol"
|
||||
"GVRP"
|
||||
"MVRP"
|
||||
"LooseBinding"
|
||||
@ -237,6 +238,7 @@ let
|
||||
])
|
||||
(assertInt "Id")
|
||||
(assertRange "Id" 0 4094)
|
||||
(assertValueOneOf "Protocol" ["802.1q" "802.1ad"])
|
||||
(assertValueOneOf "GVRP" boolValues)
|
||||
(assertValueOneOf "MVRP" boolValues)
|
||||
(assertValueOneOf "LooseBinding" boolValues)
|
||||
@ -700,6 +702,9 @@ let
|
||||
"Xfrm"
|
||||
"KeepConfiguration"
|
||||
"BatmanAdvanced"
|
||||
"IPoIB"
|
||||
"L2TP"
|
||||
"MACVTAP"
|
||||
])
|
||||
# Note: For DHCP the values both, none, v4, v6 are deprecated
|
||||
(assertValueOneOf "DHCP" (boolValues ++ ["ipv4" "ipv6"]))
|
||||
@ -968,9 +973,13 @@ let
|
||||
|
||||
sectionIPv6AcceptRA = checkUnitConfig "IPv6AcceptRA" [
|
||||
(assertOnlyFields [
|
||||
"Token"
|
||||
"UseDNS"
|
||||
"UseDomains"
|
||||
"RouteTable"
|
||||
"UseMTU"
|
||||
"UseGateway"
|
||||
"UseRoutePrefix"
|
||||
"UseAutonomousPrefix"
|
||||
"UseOnLinkPrefix"
|
||||
"RouterDenyList"
|
||||
@ -990,6 +999,9 @@ let
|
||||
(assertValueOneOf "UseDNS" boolValues)
|
||||
(assertValueOneOf "UseDomains" (boolValues ++ ["route"]))
|
||||
(assertRange "RouteTable" 0 4294967295)
|
||||
(assertValueOneOf "UseMTU" boolValues)
|
||||
(assertValueOneOf "UseGateway" boolValues)
|
||||
(assertValueOneOf "UseRoutePrefix" boolValues)
|
||||
(assertValueOneOf "UseAutonomousPrefix" boolValues)
|
||||
(assertValueOneOf "UseOnLinkPrefix" boolValues)
|
||||
(assertValueOneOf "DHCPv6Client" (boolValues ++ ["always"]))
|
||||
|
@ -110,6 +110,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
--replace "env['G_DEBUG'] = 'fatal-criticals'" ""
|
||||
substituteInPlace tests/meson.build \
|
||||
--replace "'G_DEBUG=fatal-criticals'," ""
|
||||
|
||||
# HACK: Disable tests. `doCheck=false` seems to break.
|
||||
substituteInPlace meson.build \
|
||||
--replace "subdir('tests')" ""
|
||||
substituteInPlace meson.build \
|
||||
--replace "address_sanitizer.to_string()" "'NULL'"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
@ -1,26 +1,21 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
|
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mstpd";
|
||||
version = "0.0.8";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1xkfydxljdnj49p5r3mirk4k146428b6imfc9bkfps9yjn64mkgb";
|
||||
sha256 = "m4gbVXAPIYGQvTFaSziFuOO6say5kgUsk7NSdqXgKmA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "fix-strncpy-gcc9.patch";
|
||||
url = "https://github.com/mstpd/mstpd/commit/d27d7e93485d881d8ff3a7f85309b545edbe1fc6.patch";
|
||||
sha256 = "19456daih8l3y6m9kphjr7pj7slrqzbj6yacnlgznpxyd8y4d86y";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
makeFlags = [
|
||||
"bridgestpconffile=/etc/bridge-stp.conf"
|
||||
];
|
||||
configureFlags = [
|
||||
"--prefix=$(out)"
|
||||
"--sysconfdir=$(out)/etc"
|
||||
|
@ -10,6 +10,7 @@
|
||||
, libICE
|
||||
, libXext
|
||||
, libXrandr
|
||||
, libcaca
|
||||
, libcap
|
||||
, libiconv
|
||||
, libpulseaudio
|
||||
@ -21,6 +22,7 @@
|
||||
, openglSupport ? libGLSupported
|
||||
, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid && lib.meta.availableOn stdenv.hostPlatform libpulseaudio
|
||||
, x11Support ? !stdenv.hostPlatform.isCygwin && !stdenv.hostPlatform.isAndroid
|
||||
, cacaSupport ? false # x11Support || stdenv.isDarwin
|
||||
}:
|
||||
|
||||
# NOTE: When editing this expression see if the same change applies to
|
||||
@ -58,7 +60,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildInputs =
|
||||
[ ]
|
||||
++ lib.optionals (!stdenv.hostPlatform.isMinGW && alsaSupport) [ audiofile ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]
|
||||
++ lib.optional cacaSupport libcaca;
|
||||
|
||||
configureFlags = [
|
||||
"--disable-oss"
|
||||
@ -73,7 +76,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
] ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-x11-shared"
|
||||
++ lib.optional (!x11Support) "--without-x"
|
||||
++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "CFLAGS=-DICONV_INBUF_NONCONST";
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "CFLAGS=-DICONV_INBUF_NONCONST"
|
||||
++ lib.optional cacaSupport "--enable-video-caca";
|
||||
|
||||
patches = [
|
||||
./find-headers.patch
|
||||
|
@ -33,6 +33,10 @@ stdenv.mkDerivation rec {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./revert-patchelf.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3
|
||||
python3.pkgs.pip
|
||||
@ -83,10 +87,6 @@ stdenv.mkDerivation rec {
|
||||
wrapPythonPrograms
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
|
||||
# otherwise does not find strncpy when compiling
|
||||
env.NIX_LDFLAGS = "-lbsd";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Set of libraries for fast user-mode storage";
|
||||
homepage = "https://spdk.io/";
|
||||
|
24
pkgs/by-name/sp/spdk/revert-patchelf.patch
Normal file
24
pkgs/by-name/sp/spdk/revert-patchelf.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk
|
||||
index 19f0192c2..90a40c86f 100644
|
||||
--- a/mk/spdk.common.mk
|
||||
+++ b/mk/spdk.common.mk
|
||||
@@ -501,8 +501,7 @@ UNINSTALL_SHARED_LIB=\
|
||||
INSTALL_APP=\
|
||||
$(Q)echo " INSTALL $(DESTDIR)$(bindir)/$(notdir $<)"; \
|
||||
install -d -m 755 "$(DESTDIR)$(bindir)"; \
|
||||
- install -m 755 "$<" "$(DESTDIR)$(bindir)/"; \
|
||||
- patchelf --remove-rpath "$(DESTDIR)$(bindir)/$(notdir $<)" || true
|
||||
+ install -m 755 "$<" "$(DESTDIR)$(bindir)/";
|
||||
|
||||
# Uninstall an app binary
|
||||
UNINSTALL_APP=\
|
||||
@@ -513,8 +512,7 @@ UNINSTALL_APP=\
|
||||
INSTALL_EXAMPLE=\
|
||||
$(Q)echo " INSTALL $(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"; \
|
||||
install -d -m 755 "$(DESTDIR)$(bindir)"; \
|
||||
- install -m 755 "$<" "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"; \
|
||||
- patchelf --remove-rpath "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))/$(notdir $<)" || true
|
||||
+ install -m 755 "$<" "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))";
|
||||
|
||||
# Uninstall an example binary
|
||||
UNINSTALL_EXAMPLE=\
|
Loading…
Reference in New Issue
Block a user