Compare commits

...

5 Commits

Author SHA1 Message Date
a28c46933e spdk: Fix RPATH in build 2024-11-30 16:56:27 +00:00
4af984b1fd fprintd: Disable tests 2024-11-30 16:56:27 +00:00
0a72bce07f SDL: add libcaca video driver
SDL 1.2 has support for the libcaca library, which allows for rendering
to ASCII art. Games with software rendering (e.g. Chocolate Doom) can
then render to a terminal.
2024-11-30 16:56:27 +00:00
437193c757 mstpd: 0.0.8 -> 0.1.0
Removed strncpy patch since it is present in the upstream release now.
Also added a make flag to change the config file location to /etc.
2024-11-30 16:56:27 +00:00
798b11de8e nixos/systemd/networkd: Add missing network section options 2024-11-30 16:56:27 +00:00
6 changed files with 58 additions and 17 deletions

View File

@ -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"]))

View File

@ -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 = {

View File

@ -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"

View File

@ -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

View File

@ -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/";

View 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=\