Skip to content

Commit

Permalink
Merge #226795: staging-next 2023-04-18
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Apr 26, 2023
2 parents 7b57f59 + 72fb667 commit d6b863f
Show file tree
Hide file tree
Showing 176 changed files with 1,890 additions and 986 deletions.
12 changes: 1 addition & 11 deletions nixos/tests/installed-tests/pipewire.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
{ pkgs, lib, makeInstalledTest, ... }:
{ pkgs, makeInstalledTest, ... }:

makeInstalledTest {
tested = pkgs.pipewire;
testConfig = {
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
pulse.enable = true;
jack.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
};
}
8 changes: 4 additions & 4 deletions pkgs/applications/audio/fluidsynth/default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{ stdenv, lib, fetchFromGitHub, buildPackages, pkg-config, cmake
, alsa-lib, glib, libjack2, libsndfile, libpulseaudio
, AudioUnit, CoreAudio, CoreMIDI, CoreServices
, AppKit, AudioUnit, CoreAudio, CoreMIDI, CoreServices
}:

stdenv.mkDerivation rec {
pname = "fluidsynth";
version = "2.3.1";
version = "2.3.2";

src = fetchFromGitHub {
owner = "FluidSynth";
repo = "fluidsynth";
rev = "v${version}";
sha256 = "05lr9f0q4x1kvgfa3xrfmagpwvijv9m1s316aa9figqlkcc5vv4k";
sha256 = "sha256-BSJu3jB7b5G2ThXBUHUNnBGl55EXe3nIzdBdgfOWDSM=";
};

nativeBuildInputs = [ buildPackages.stdenv.cc pkg-config cmake ];

buildInputs = [ glib libsndfile libjack2 ]
++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio ]
++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreMIDI CoreServices ];
++ lib.optionals stdenv.isDarwin [ AppKit AudioUnit CoreAudio CoreMIDI CoreServices ];

cmakeFlags = [
"-Denable-framework=off"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/mpg123/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ assert withConplay -> !libOnly;

stdenv.mkDerivation rec {
pname = "${lib.optionalString libOnly "lib"}mpg123";
version = "1.31.2";
version = "1.31.3";

src = fetchurl {
url = "mirror://sourceforge/mpg123/mpg123-${version}.tar.bz2";
sha256 = "sha256-sX8ikF4x9DtrQB399qce0Ru30Fb2jbRJ1wufmug5x94=";
hash = "sha256-HKd9Omml/4RbegU294P+5VThBBE5prl49q/hT1gUrRo=";
};

outputs = [ "out" ] ++ lib.optional withConplay "conplay";
Expand Down
11 changes: 10 additions & 1 deletion pkgs/applications/editors/vim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ in
stdenv.mkDerivation {
pname = "vim";

inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;
inherit (common) version src postPatch hardeningDisable enableParallelBuilding enableParallelInstalling meta;

nativeBuildInputs = [ gettext pkg-config ];
buildInputs = [ ncurses bash gawk ]
Expand Down Expand Up @@ -50,6 +50,15 @@ stdenv.mkDerivation {
ln -s $out/bin/vim $out/bin/vi
mkdir -p $out/share/vim
cp "${vimrc}" $out/share/vim/vimrc
# Prevent bugs in the upstream makefile from silently failing and missing outputs.
# Some of those are build-time requirements for other packages.
for tool in ex xxd vi view vimdiff; do
if [ ! -e "$out/bin/$tool" ]; then
echo "ERROR: install phase did not install '$tool'."
exit 1
fi
done
'';

__impureHostDeps = [ "/dev/ptmx" ];
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/misc/privacyidea/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ let
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.3.24";
src = oldAttrs.src.override {
src = super.fetchPypi {
inherit (oldAttrs) pname;
inherit version;
hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk=";
};
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/networking/mailreaders/notmuch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ stdenv.mkDerivation rec {
substituteInPlace lib/Makefile.local \
--replace '-install_name $(libdir)' "-install_name $out/lib"
# do not override CFLAGS of the Makefile created by mkmf
substituteInPlace bindings/Makefile.local \
--replace 'CFLAGS="$(CFLAGS) -pipe -fno-plt -fPIC"' ""
'' + lib.optionalString withEmacs ''
substituteInPlace emacs/notmuch-emacs-mua \
--replace 'EMACS:-emacs' 'EMACS:-${emacs}/bin/emacs' \
Expand Down
3 changes: 3 additions & 0 deletions pkgs/applications/office/libreoffice/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ in
sed -e "s/DECLARE_SW_ROUNDTRIP_TEST(\([_a-zA-Z0-9.]\+\)[, ].*, *\([_a-zA-Z0-9.]\+\))/class \\1: public \\2 { public: void verify() override; }; void \\1::verify() /" -i "sw/qa/extras/ooxmlexport/ooxmlencryption.cxx"
sed -e "s/DECLARE_SW_ROUNDTRIP_TEST(\([_a-zA-Z0-9.]\+\)[, ].*, *\([_a-zA-Z0-9.]\+\))/class \\1: public \\2 { public: void verify() override; }; void \\1::verify() /" -i "sw/qa/extras/odfexport/odfexport.cxx"
sed -e "s/DECLARE_SW_ROUNDTRIP_TEST(\([_a-zA-Z0-9.]\+\)[, ].*, *\([_a-zA-Z0-9.]\+\))/class \\1: public \\2 { public: void verify() override; }; void \\1::verify() /" -i "sw/qa/extras/unowriter/unowriter.cxx"
# testReqIfTable fails since libxml2: 2.10.3 -> 2.10.4
sed -e 's@.*"/html/body/div/table/tr/th".*@//&@' -i sw/qa/extras/htmlexport/htmlexport.cxx
''
# This to avoid using /lib:/usr/lib at linking
+ ''
Expand Down
13 changes: 7 additions & 6 deletions pkgs/applications/version-management/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;

let
version = "2.39.2";
version = "2.40.0";
svn = subversionClient.override { perlBindings = perlSupport; };
gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
in
Expand All @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {

src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "R1918Tc7LNTkOHBhhRdZZtXBH2jE2x5IwmJXxD3c8tY=";
hash = "sha256-sXpZj79Ycp7xO1d0ZeuTstSE3xIBUYtwi1BE/2I79G0=";
};

outputs = [ "out" ] ++ lib.optional withManual "doc";
Expand Down Expand Up @@ -185,12 +185,14 @@ stdenv.mkDerivation (finalAttrs: {
# Fix references to the perl, sed, awk and various coreutil binaries used by
# shell scripts that git calls (e.g. filter-branch)
# and completion scripts
SCRIPT="$(cat <<'EOS'
BEGIN{
@a=(
'${gnugrep}/bin/grep', '${gnused}/bin/sed', '${gawk}/bin/awk',
'${coreutils}/bin/cut', '${coreutils}/bin/basename', '${coreutils}/bin/dirname',
'${coreutils}/bin/wc', '${coreutils}/bin/tr'
'${coreutils}/bin/wc', '${coreutils}/bin/tr',
'${coreutils}/bin/ls'
${lib.optionalString perlSupport ", '${perlPackages.perl}/bin/perl'"}
);
}
Expand All @@ -201,7 +203,8 @@ stdenv.mkDerivation (finalAttrs: {
EOS
)"
perl -0777 -i -pe "$SCRIPT" \
$out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,submodule,subtree,web--browse}
$out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,submodule,subtree,web--browse} \
$out/share/bash-completion/completions/{git,gitk}
# Also put git-http-backend into $PATH, so that we can use smart
Expand All @@ -214,8 +217,6 @@ stdenv.mkDerivation (finalAttrs: {
--set PERL5LIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-cvsimport \
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-add--interactive \
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-archimport \
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-instaweb \
Expand Down
5 changes: 3 additions & 2 deletions pkgs/applications/version-management/gitlab/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitLab, bundlerEnv
, ruby, tzdata, git, nettools, nixosTests, nodejs, openssl
, ruby_2_7, tzdata, git, nettools, nixosTests, nodejs, openssl
, gitlabEnterprise ? false, callPackage, yarn
, fixup_yarn_lock, replace, file, cacert, fetchYarnDeps, makeWrapper, pkg-config
}:
Expand All @@ -17,7 +17,8 @@ let

rubyEnv = bundlerEnv rec {
name = "gitlab-env-${version}";
inherit ruby;
# GitLab doesn't support Ruby 3 https://gitlab.com/groups/gitlab-org/-/epics/5149
ruby = ruby_2_7;
gemdir = ./rubyEnv;
gemset =
let x = import (gemdir + "/gemset.nix") src;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/applications/version-management/subversion/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ let
(lib.withFeatureAs httpSupport "serf" serf)
"--with-zlib=${zlib.dev}"
"--with-sqlite=${sqlite.dev}"
"--with-apr=${apr.dev}"
"--with-apr-util=${aprutil.dev}"
] ++ lib.optionals javahlBindings [
"--enable-javahl"
"--with-jdk=${jdk}"
Expand Down
14 changes: 9 additions & 5 deletions pkgs/applications/window-managers/dwl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
, pixman
, pkg-config
, substituteAll
, wayland-scanner
, wayland
, wayland-protocols
, wlroots_0_16
Expand Down Expand Up @@ -36,6 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
installShellFiles
pkg-config
wayland-scanner
];

buildInputs = [
Expand All @@ -61,18 +63,20 @@ stdenv.mkDerivation (finalAttrs: {
else writeText "config.def.h" conf;
in lib.optionalString (conf != null) "cp ${configFile} config.def.h";

makeFlags = [
"PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config"
"WAYLAND_SCANNER=wayland-scanner"
"PREFIX=$(out)"
"MANDIR=$(man)/share/man/man1"
];

preBuild = ''
makeFlagsArray+=(
XWAYLAND=${lib.optionalString enableXWayland "-DXWAYLAND"}
XLIBS=${lib.optionalString enableXWayland "xcb\\ xcb-icccm"}
)
'';

installFlags = [
"PREFIX=$(out)"
"MANDIR=$(man)/share/man/man1"
];

meta = {
homepage = "https://github.com/djpohly/dwl/";
description = "Dynamic window manager for Wayland";
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/window-managers/labwc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
, libxcb
, libxkbcommon
, libxml2
, gettext
, meson
, ninja
, pango
, pkg-config
, scdoc
, wayland-scanner
, wayland
, wayland-protocols
, wlroots_0_16
Expand All @@ -35,10 +37,12 @@ stdenv.mkDerivation (finalAttrs: {
};

nativeBuildInputs = [
gettext
meson
ninja
pkg-config
scdoc
wayland-scanner
];

buildInputs = [
Expand Down
8 changes: 7 additions & 1 deletion pkgs/applications/window-managers/sway/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, swaybg
{ lib, stdenv, fetchFromGitHub, fetchpatch, substituteAll, swaybg
, meson, ninja, pkg-config, wayland-scanner, scdoc
, wayland, libxkbcommon, pcre2, json_c, libevdev
, pango, cairo, libinput, libcap, pam, gdk-pixbuf, librsvg
Expand Down Expand Up @@ -38,6 +38,12 @@ stdenv.mkDerivation rec {
src = ./fix-paths.patch;
inherit swaybg;
})

(fetchpatch {
name = "LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM.patch";
url = "https://github.com/swaywm/sway/commit/dee032d0a0ecd958c902b88302dc59703d703c7f.diff";
hash = "sha256-dx+7MpEiAkxTBnJcsT3/1BO8rYRfNLecXmpAvhqGMD0=";
})
] ++ lib.optionals (!isNixOS) [
# References to /nix/store/... will get GC'ed which causes problems when
# copying the default configuration:
Expand Down
1 change: 1 addition & 0 deletions pkgs/applications/window-managers/wayfire/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ stdenv.mkDerivation rec {
"--sysconfdir /etc"
"-Duse_system_wlroots=enabled"
"-Duse_system_wfconfig=enabled"
(lib.mesonEnable "wf-touch:tests" (stdenv.buildPlatform.canExecute stdenv.hostPlatform))
];

passthru.providedSessions = [ "wayfire" ];
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/window-managers/wayfire/wf-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ stdenv.mkDerivation rec {
# CMake is just used for finding doctest.
dontUseCmakeConfigure = true;

mesonFlags = [
(lib.mesonEnable "tests" (stdenv.buildPlatform.canExecute stdenv.hostPlatform))
];

doCheck = true;

meta = with lib; {
Expand Down
6 changes: 2 additions & 4 deletions pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
, isGNU ? false, isClang ? cc.isClang or false, isCcache ? cc.isCcache or false, gnugrep ? null
, buildPackages ? {}
, libcxx ? null
, grossHackForStagingNext ? false

# Whether or not to add `-B` and `-L` to `nix-support/cc-{c,ld}flags`
, useCcForLibs ?
Expand Down Expand Up @@ -52,7 +51,6 @@

# the derivation at which the `-B` and `-L` flags added by `useCcForLibs` will point
, gccForLibs ? if useCcForLibs then cc else null
, tmpDropB ? false # temporary hack; see PR #225846
}:

with lib;
Expand Down Expand Up @@ -336,7 +334,7 @@ stdenv.mkDerivation {
##
## GCC libs for non-GCC support
##
+ optionalString (useGccForLibs && !tmpDropB) ''
+ optionalString (useGccForLibs && isClang) ''
echo "-B${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version}" >> $out/nix-support/cc-cflags
''
Expand Down Expand Up @@ -415,7 +413,7 @@ stdenv.mkDerivation {
# already knows how to find its own libstdc++, and adding
# additional -isystem flags will confuse gfortran (see
# https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903)
+ optionalString (libcxx == null && (if grossHackForStagingNext then isClang else true) && (useGccForLibs && gccForLibs.langCC or false)) ''
+ optionalString (libcxx == null && isClang && (useGccForLibs && gccForLibs.langCC or false)) ''
for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*; do
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
done
Expand Down
20 changes: 15 additions & 5 deletions pkgs/build-support/setup-hooks/auto-patchelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class Dependency:
found: bool = False # Whether it was found somewhere


def auto_patchelf_file(path: Path, runtime_deps: list[Path]) -> list[Dependency]:
def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: List[Path] = []) -> list[Dependency]:
try:
with open_elf(path) as elf:

Expand Down Expand Up @@ -235,6 +235,8 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path]) -> list[Dependency]
dependencies.append(Dependency(path, dep, False))
print(f" {dep} -> not found!")

rpath.extend(append_rpaths)

# Dedup the rpath
rpath_str = ":".join(dict.fromkeys(map(Path.as_posix, rpath)))

Expand All @@ -251,8 +253,9 @@ def auto_patchelf(
paths_to_patch: List[Path],
lib_dirs: List[Path],
runtime_deps: List[Path],
recursive: bool =True,
ignore_missing: List[str] = []) -> None:
recursive: bool = True,
ignore_missing: List[str] = [],
append_rpaths: List[Path] = []) -> None:

if not paths_to_patch:
sys.exit("No paths to patch, stopping.")
Expand All @@ -265,7 +268,7 @@ def auto_patchelf(
dependencies = []
for path in chain.from_iterable(glob(p, '*', recursive) for p in paths_to_patch):
if not path.is_symlink() and path.is_file():
dependencies += auto_patchelf_file(path, runtime_deps)
dependencies += auto_patchelf_file(path, runtime_deps, append_rpaths)

missing = [dep for dep in dependencies if not dep.found]

Expand Down Expand Up @@ -312,6 +315,12 @@ def main() -> None:
parser.add_argument(
"--runtime-dependencies", nargs="*", type=Path,
help="Paths to prepend to the runtime path of executable binaries.")
parser.add_argument(
"--append-rpaths",
nargs="*",
type=Path,
help="Paths to append to all runtime paths unconditionally",
)

print("automatically fixing dependencies for ELF files")
args = parser.parse_args()
Expand All @@ -322,7 +331,8 @@ def main() -> None:
args.libs,
args.runtime_dependencies,
args.recursive,
args.ignore_missing)
args.ignore_missing,
append_rpaths=args.append_rpaths)


interpreter_path: Path = None # type: ignore
Expand Down
Loading

0 comments on commit d6b863f

Please sign in to comment.