Merge pull request #98869 from tobim/pkgs/mpd-0.22
This commit is contained in:
commit
0a7157119d
@ -14,24 +14,32 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
# Upstream's configure script is not autoconf generated, but a hand written one.
|
||||||
outputs = [ "out" "lib" "dev" "man" ];
|
setOutputFlags = false;
|
||||||
|
preConfigure =
|
||||||
configurePhase = ''
|
# We cannot use configureFlags or configureFlagsArray directly, since we
|
||||||
./configure \
|
# don't have structuredAttrs yet and using placeholder causes permissions
|
||||||
--prefix=$out \
|
# denied errors. Using $dev / $man in configureFlags causes bash evaluation
|
||||||
--includedir=$dev/include \
|
# errors
|
||||||
--libdir=$lib/lib \
|
''
|
||||||
--mandir=$man/share/man \
|
configureFlagsArray+=(
|
||||||
|
"--includedir=$dev/include"
|
||||||
|
"--mandir=$man/share/man"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Copy the examples into $out.
|
outputs = [ "out" "bin" "dev" "man" ];
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out/bin
|
postInstall =
|
||||||
cp ./examples/io_uring-cp examples/io_uring-test $out/bin
|
# Copy the examples into $bin. Most reverse dependency of this package should
|
||||||
cp ./examples/link-cp $out/bin/io_uring-link-cp
|
# reference only the $out output
|
||||||
cp ./examples/ucontext-cp $out/bin/io_uring-ucontext-cp
|
''
|
||||||
'';
|
mkdir -p $bin/bin
|
||||||
|
cp ./examples/io_uring-cp examples/io_uring-test $bin/bin
|
||||||
|
cp ./examples/link-cp $bin/bin/io_uring-link-cp
|
||||||
|
cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp
|
||||||
|
''
|
||||||
|
;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Userspace library for the Linux io_uring API";
|
description = "Userspace library for the Linux io_uring API";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, meson, ninja, pkg-config, glib, systemd, boost, darwin
|
{ stdenv, fetchFromGitHub, meson, ninja, pkg-config, glib, systemd, boost, darwin
|
||||||
# Inputs
|
# Inputs
|
||||||
, curl, libmms, libnfs, samba
|
, curl, libmms, libnfs, liburing, samba
|
||||||
# Archive support
|
# Archive support
|
||||||
, bzip2, zziplib
|
, bzip2, zziplib
|
||||||
# Codecs
|
# Codecs
|
||||||
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
lib = stdenv.lib;
|
lib = stdenv.lib;
|
||||||
|
concatAttrVals = nameList: set: lib.concatMap (x: set.${x} or []) nameList;
|
||||||
|
|
||||||
featureDependencies = {
|
featureDependencies = {
|
||||||
# Storage plugins
|
# Storage plugins
|
||||||
@ -37,6 +38,7 @@ let
|
|||||||
webdav = [ curl expat ];
|
webdav = [ curl expat ];
|
||||||
# Input plugins
|
# Input plugins
|
||||||
curl = [ curl ];
|
curl = [ curl ];
|
||||||
|
io_uring = [ liburing ];
|
||||||
mms = [ libmms ];
|
mms = [ libmms ];
|
||||||
nfs = [ libnfs ];
|
nfs = [ libnfs ];
|
||||||
smbclient = [ samba ];
|
smbclient = [ samba ];
|
||||||
@ -85,15 +87,19 @@ let
|
|||||||
zeroconf = [ avahi dbus ];
|
zeroconf = [ avahi dbus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeFeatureDependencies = {
|
||||||
|
documentation = [ doxygen python3Packages.sphinx ];
|
||||||
|
};
|
||||||
|
|
||||||
run = { features ? null }:
|
run = { features ? null }:
|
||||||
let
|
let
|
||||||
# Disable platform specific features if needed
|
# Disable platform specific features if needed
|
||||||
# using libmad to decode mp3 files on darwin is causing a segfault -- there
|
# using libmad to decode mp3 files on darwin is causing a segfault -- there
|
||||||
# is probably a solution, but I'm disabling it for now
|
# is probably a solution, but I'm disabling it for now
|
||||||
platformMask = lib.optionals stdenv.isDarwin [ "mad" "pulse" "jack" "nfs" "smbclient" ]
|
platformMask = lib.optionals stdenv.isDarwin [ "mad" "pulse" "jack" "nfs" "smbclient" ]
|
||||||
++ lib.optionals (!stdenv.isLinux) [ "alsa" "systemd" "syslog" ];
|
++ lib.optionals (!stdenv.isLinux) [ "alsa" "io_uring" "systemd" "syslog" ];
|
||||||
|
|
||||||
knownFeatures = builtins.attrNames featureDependencies;
|
knownFeatures = builtins.attrNames featureDependencies ++ builtins.attrNames nativeFeatureDependencies;
|
||||||
platformFeatures = lib.subtractLists platformMask knownFeatures;
|
platformFeatures = lib.subtractLists platformMask knownFeatures;
|
||||||
|
|
||||||
features_ = if (features == null )
|
features_ = if (features == null )
|
||||||
@ -110,13 +116,13 @@ let
|
|||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "mpd";
|
pname = "mpd";
|
||||||
version = "0.21.25";
|
version = "0.22";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "MusicPlayerDaemon";
|
owner = "MusicPlayerDaemon";
|
||||||
repo = "MPD";
|
repo = "MPD";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1yjp8pwr2zn0mp39ls1w0pl37zrjn5m9ycgjmcsw2wpa4709r356";
|
sha256 = "1lsi4fgrarabkahfhf5zbmppg7jba7m362gxyqhv54hmqprl1qff";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -128,16 +134,15 @@ let
|
|||||||
# Run-time dependency GTest found: YES 1.10.0
|
# Run-time dependency GTest found: YES 1.10.0
|
||||||
gtest
|
gtest
|
||||||
]
|
]
|
||||||
++ (lib.concatLists (lib.attrVals features_ featureDependencies))
|
++ concatAttrVals features_ featureDependencies
|
||||||
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AudioToolbox darwin.apple_sdk.frameworks.AudioUnit ];
|
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AudioToolbox darwin.apple_sdk.frameworks.AudioUnit ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
python3Packages.sphinx
|
]
|
||||||
doxygen
|
++ concatAttrVals features_ nativeFeatureDependencies;
|
||||||
];
|
|
||||||
|
|
||||||
# Otherwise, the meson log says:
|
# Otherwise, the meson log says:
|
||||||
#
|
#
|
||||||
@ -153,10 +158,9 @@ let
|
|||||||
outputs = [ "out" "doc" "man" ];
|
outputs = [ "out" "doc" "man" ];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
# Documentation is enabled unconditionally but it's not installed
|
|
||||||
# unconditionally thanks to the outputs being split
|
|
||||||
"-Ddocumentation=true"
|
|
||||||
"-Dtest=true"
|
"-Dtest=true"
|
||||||
|
"-Dmanpages=true"
|
||||||
|
"-Dhtml_manual=true"
|
||||||
]
|
]
|
||||||
++ map (x: "-D${x}=enabled") features_
|
++ map (x: "-D${x}=enabled") features_
|
||||||
++ map (x: "-D${x}=disabled") (lib.subtractLists features_ knownFeatures)
|
++ map (x: "-D${x}=disabled") (lib.subtractLists features_ knownFeatures)
|
||||||
@ -193,7 +197,7 @@ in
|
|||||||
"yajl" "sqlite"
|
"yajl" "sqlite"
|
||||||
"soundcloud" "qobuz" "tidal"
|
"soundcloud" "qobuz" "tidal"
|
||||||
] ++ lib.optionals stdenv.isLinux [
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
"alsa" "systemd" "syslog"
|
"alsa" "systemd" "syslog" "io_uring"
|
||||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
"mad" "jack" "nfs"
|
"mad" "jack" "nfs"
|
||||||
]; };
|
]; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user