])); RemoveIPC = true; RestrictAddressFamilies = [ <del> "AF_UNIX"  # for sd_notify() call </del> <ins> "AF_UNIX" </ins> "AF_INET" "AF_INET6" <ins> "AF_NETLINK" </ins> ]; RestrictNamespaces = true; RestrictRealtime = true;


{ lib , buildGoModule , fetchFromGitHub <ins> , fetchYarnDeps , fixup_yarn_lock </ins> , grafana-agent , nixosTests <ins> , nodejs </ins> , stdenv , systemd , testers <ins> , yarn </ins> }: buildGoModule rec {


buildInputs = [ nss nspr libqb ] ++ optional enableDbus dbus <del> ++ optional enableInfiniBandRdma [ librdmacm libibverbs ] </del> <ins> ++ optional enableInfiniBandRdma rdma-core </ins> ++ optional enableMonitoring libstatgrab ++ optional enableSnmp net_snmp;


{ lib , buildPythonPackage , fetchFromGitHub <del> , setuptools </del> , apispec , boto3 , cachetools


<ins> { lib , mkYarnPackage , fetchFromGitHub , fetchYarnDeps }: let pname = "ember-cli"; version = "5.3.0"; src = fetchFromGitHub { owner = "ember-cli"; repo = "ember-cli"; rev = "v${version}"; hash = "sha256-xkMsPE+iweIV14m4kE4ytEp4uHMJW6gr+n9oJblr4VQ="; }; in mkYarnPackage { inherit pname version src; offlineCache = fetchYarnDeps { yarnLock = src + "/yarn.lock"; hash = "sha256-QgT2JFvMupJo+pJc13n2lmHMZkROJRJWoozCho3E6+c="; }; packageJSON = ./package.json; meta = with lib; { homepage = "https://github.com/ember-cli/ember-cli"; description = "The Ember.js command line utility"; license = licenses.mit; maintainers = with maintainers; [ jfvillablanca ]; platforms = platforms.all; mainProgram = "ember"; }; } </ins>


mongoaudit = callPackage ../tools/security/mongoaudit { }; <del> mongodb-compass = callPackage ../tools/misc/mongodb-compass { }; </del> mongodb-tools = callPackage ../tools/misc/mongodb-tools { }; moosefs = callPackage ../tools/filesystems/moosefs { };


buildInputs = [ gmp ]; enableParallelBuilding = true; <del> preConfigure = '' cd src ''; </del> <ins> cmakeDir = "../src"; # Running the tests is required to build the *.olean files for the core # library. doCheck = true; postPatch = "patchShebangs ."; </ins> postInstall = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace $out/bin/leanpkg


index 3616104..e9bbfda 100755 --- a/setup.py +++ b/setup.py <del> @@ -112,7 +112,7 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto): DistUtilsExtra.auto.install_auto.run(self) target_data = '/' + os.path.relpath(self.install_data, self.root) + '/' </del> <ins> @@ -94,7 +94,7 @@ # Root is undefined if not installing into an alternate root root = self.root or "/" target_data = '/' + os.path.relpath(self.install_data, root) + '/' </ins> -        target_pkgdata = target_data + 'share/ulauncher/' +        target_pkgdata = '@out@/share/ulauncher/' target_scripts = '/' + os.path.relpath(self.install_scripts, <del> self.root) + '/' </del> <ins> root) + '/' </ins>


rustPlatform.buildRustPackage rec { pname = "pastel"; <del> version = "0.8.0"; </del> <ins> version = "0.8.1"; </ins> src = fetchFromGitHub { owner = "sharkdp"; repo = pname; rev = "v${version}"; <del> sha256 = "00xxrssa3gbr5w2jsqlf632jlzc0lc2rpybnbv618ndy5lxidnw0"; </del> <ins> sha256 = "12n1a9j61r4spx0zi2kk85nslv11j1s510asxqvj92ggqhr2s3sq"; </ins> }; <del> cargoSha256 = "0kkhj58q1lgsyj7hpy3sxg1jva9q51m0i7j60zfzhnjnirwcd0h8"; </del> <ins> cargoSha256 = "12zachbg78ajx1n1mqp53rd00dzcss5cqhsq0119lalzc8b5zkrn"; </ins> buildInputs = lib.optional stdenv.isDarwin Security;


qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; <del> qtwebengine = [ ] </del> <ins> qtwebengine = [ # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 (fetchpatch { name = "qtwebengine-bison-3.7-build.patch"; url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; stripLen = 1; extraPrefix = "src/3rdparty/"; }) ] </ins> ++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch; qtwebkit = [ ./qtwebkit.patch ] ++ optionals stdenv.isDarwin [


<ins> { lib , stdenv , fetchFromGitHub , patsh }: stdenv.mkDerivation rec { pname = "csvquote"; version = "0.1.5"; src = fetchFromGitHub { owner = "dbro"; repo = "csvquote"; rev = "v${version}"; hash = "sha256-847JAoDEfA9K4LB8z9cqSw+GTImqmITBylB/4odLDb0="; }; patches = [ # patch csvheader to use csvquote from the derivation ./csvquote-path.patch ]; nativeBuildInputs = [ patsh ]; makeFlags = [ "BINDIR=$(out)/bin" ]; preInstall = '' mkdir -p "$out/bin" ''; postInstall = '' substituteAllInPlace $out/bin/csvheader patsh $out/bin/csvheader -fs ${builtins.storeDir} ''; meta = with lib; { description = "Enables common unix utlities like cut, awk, wc, head to work correctly with csv data containing delimiters and newlines"; homepage = "https://github.com/dbro/csvquote"; license = licenses.mit; maintainers = with maintainers; [ figsoda ]; platforms = platforms.all; }; } </ins>


grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g" ''; <del> buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ]; nativeBuildInputs = [ makeWrapper ]; </del> <ins> nativeBuildInputs = [ makeWrapper python3 jdk11 ant watchman ]; </ins> buildPhase = '' <ins> # Set correct version, see https://github.com/facebook/buck/issues/2607 echo v${version} > .buckrelease </ins> ant PYTHONDONTWRITEBYTECODE=true ./bin/buck build -c buck.release_version=${version} buck ''; installPhase = '' <del> install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck </del> <ins> install -D -m755 buck-out/gen/*/programs/buck.pex $out/bin/buck </ins> wrapProgram $out/bin/buck  <del> --prefix PYTHONPATH : $PYTHONPATH  --prefix PATH : "${lib.makeBinPath [jdk watchman]}" </del> <ins> --prefix PATH : "${lib.makeBinPath [ jdk11 watchman python3 ]}" </ins> ''; meta = with lib; {


<del> [Nemo Action] Active=true Name=Open in Pulsar Comment=Open in Pulsar #%U is the current selected file, this will also work on current directory Exec=pulsar -n %U Icon-Name=pulsar Selection=any Extensions=any </del>


"tests/" ]; <del> # See https://github.com/google/jax/issues/9705. disabledTests = lib.optionals usingMKL [ "test_custom_root_with_aux" ]; </del> <ins> # See #  * https://github.com/google/jax/issues/9705 #  * https://discourse.nixos.org/t/getting-different-results-for-the-same-build-on-two-equally-configured-machines/17921 #  * https://github.com/NixOS/nixpkgs/issues/161960 disabledTests = lib.optionals usingMKL [ "test_custom_linear_solve_cholesky" "test_custom_root_with_aux" "testEigvalsGrad_shape" ]; </ins> pythonImportsCheck = [ "jax"


<del> <section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0" xml:id="sec-customising-packages"> <title>Customising Packages</title> <para> Some packages in Nixpkgs have options to enable or disable optional functionality or change other aspects of the package. For instance, the Firefox wrapper package (which provides Firefox with a set of plugins such as the Adobe Flash player) has an option to enable the Google Talk plugin. It can be set in <filename>configuration.nix</filename> as follows: <filename> nixpkgs.config.firefox.enableGoogleTalkPlugin = true; </filename> </para> <warning> <para> Unfortunately, Nixpkgs currently lacks a way to query available configuration options. </para> </warning> <para> Apart from high-level options, it’s possible to tweak a package in almost arbitrary ways, such as changing or disabling dependencies of a package. For instance, the Emacs package in Nixpkgs by default has a dependency on GTK 2. If you want to build it against GTK 3, you can specify that as follows: <programlisting> <xref linkend="opt-environment.systemPackages"/> = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ]; </programlisting> The function <varname>override</varname> performs the call to the Nix function that produces Emacs, with the original arguments amended by the set of arguments specified by you. So here the function argument <varname>gtk</varname> gets the value <literal>pkgs.gtk3</literal>, causing Emacs to depend on GTK 3. (The parentheses are necessary because in Nix, function application binds more weakly than list construction, so without them, <xref linkend="opt-environment.systemPackages"/> would be a list with two elements.) </para> <para> Even greater customisation is possible using the function <varname>overrideAttrs</varname>. While the <varname>override</varname> mechanism above overrides the arguments of a package function, <varname>overrideAttrs</varname> allows changing the <emphasis>attributes</emphasis> passed to <literal>mkDerivation</literal>. This permits changing any aspect of the package, such as the source code. For instance, if you want to override the source code of Emacs, you can say: <programlisting> <xref linkend="opt-environment.systemPackages"/> = [ (pkgs.emacs.overrideAttrs (oldAttrs: { name = "emacs-25.0-pre"; src = /path/to/my/emacs/tree; })) ]; </programlisting> Here, <varname>overrideAttrs</varname> takes the Nix derivation specified by <varname>pkgs.emacs</varname> and produces a new derivation in which the original’s <literal>name</literal> and <literal>src</literal> attribute have been replaced by the given values by re-calling <literal>stdenv.mkDerivation</literal>. The original attributes are accessible via the function argument, which is conventionally named <varname>oldAttrs</varname>. </para> <para> The overrides shown above are not global. They do not affect the original package; other packages in Nixpkgs continue to depend on the original rather than the customised package. This means that if another package in your system depends on the original package, you end up with two instances of the package. If you want to have everything depend on your customised instance, you can apply a <emphasis>global</emphasis> override as follows: <screen> nixpkgs.config.packageOverrides = pkgs: { emacs = pkgs.emacs.override { gtk = pkgs.gtk3; }; }; </screen> The effect of this definition is essentially equivalent to modifying the <literal>emacs</literal> attribute in the Nixpkgs source tree. Any package in Nixpkgs that depends on <literal>emacs</literal> will be passed your customised instance. (However, the value <literal>pkgs.emacs</literal> in <varname>nixpkgs.config.packageOverrides</varname> refers to the original rather than overridden instance, to prevent an infinite recursion.) </para> </section> </del>


<ins> #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl gojq nix-prefetch-github common-updater-scripts set -eou pipefail pkg_dir="$(dirname "$0")" gh-curl () { curl --silent ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "$1" } version="$(gh-curl "https://api.github.com/repos/ente-io/ente/releases" | gojq 'map(select(.draft == false and .prerelease == false and (.tag_name | startswith("auth-v")))) | first | .tag_name' --raw-output)" short_version="${version:6}" if [[ "$short_version" == "$UPDATE_NIX_OLD_VERSION" ]]; then echo "ente-auth is already up-to-date: $short_version" exit 0 fi echo "Updating to $short_version" # Subtree needed for lockfile and icons auth_tree="$(gh-curl "https://api.github.com/repos/ente-io/ente/git/trees/$version" | gojq '.tree[] | select(.path == "auth") | .url' --raw-output)" # Get lockfile, filter out incompatible sqlite dependency and convert to JSON echo "Updating lockfile" pubspec_lock="$(gh-curl "$auth_tree" | gojq '.tree[] | select(.path == "pubspec.lock") | .url' --raw-output)" gh-curl "$pubspec_lock" | gojq '.content | @base64d' --raw-output | gojq --yaml-input 'del(.packages.sqlite3_flutter_libs)' > "$pkg_dir/pubspec.lock.json" # Get rev and hash of simple-icons submodule echo "Updating icons" assets_tree="$(gh-curl "$auth_tree" | gojq '.tree[] | select(.path == "assets") | .url' --raw-output)" simple_icons_rev="$(gh-curl "$assets_tree" | gojq '.tree[] | select(.path == "simple-icons") | .sha' --raw-output)" nix-prefetch-github --rev "$simple_icons_rev" simple-icons simple-icons > "$pkg_dir/simple-icons.json" # Update package version and hash echo "Updating package source" update-source-version ente-auth "$short_version" --file="$pkg_dir/package.nix" </ins>


sha256 = "0pnva72f2w4jcgnl1y7nw5rdly4ipx3hji4c9yc9s0hna1n2ijxn"; }; <del> buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ]; </del> <ins> buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ] ++ stdenv.lib.optional stdenv.isDarwin libiconv; </ins> nativeBuildInputs = [ perl pkgconfig ]; dontDisableStatic = true;


necessary, but outside the scope of the Mailman module. </para> </section> <ins> <section xml:id="module-services-mailman-other-mtas"> <title>Using with other MTAs</title> <para> Mailman also supports other MTA, though with a little bit more configuration. For example, to use Mailman with Exim, you can use the following settings: <programlisting>{ config, ... }: { services = { mailman = { enable = true; siteOwner = "mailman@example.org"; <link linkend="opt-services.mailman.enablePostfix">enablePostfix</link> = false; settings.mta = { incoming = "mailman.mta.exim4.LMTP"; outgoing = "mailman.mta.deliver.deliver"; lmtp_host = "localhost"; lmtp_port = "8024"; smtp_host = "localhost"; smtp_port = "25"; configuration = "python:mailman.config.exim4"; }; }; exim = { enable = true; # You can configure Exim in a separate file to reduce configuration.nix clutter config = builtins.readFile ./exim.conf; }; }; }</programlisting> </para> <para> The exim config needs some special additions to work with Mailman. Currently NixOS can't manage Exim config with such granularity. Please refer to <link xlink:href="https://mailman.readthedocs.io/en/latest/src/mailman/docs/mta.html">Mailman documentation</link> for more info on configuring Mailman for working with Exim. </para> </section> </ins> </chapter>


usb-devices = callPackage ../development/python-modules/usb-devices { }; <ins> usb-monitor = callPackage ../development/python-modules/usb-monitor { }; </ins> usbrelay-py = callPackage ../os-specific/linux/usbrelay/python.nix { }; usbtmc = callPackage ../development/python-modules/usbtmc { };


sed -E "s#(libEGL_nvidia)#$i/lib/1#" 10_nvidia.json > 10_nvidia.json.fixed sed -E "s#(libnvidia-egl-wayland)#$i/lib/1#" 10_nvidia_wayland.json > 10_nvidia_wayland.json.fixed <del> install -Dm644 10_nvidia.json.fixed $i/share/glvnd/egl_vendor.d/nvidia.json install -Dm644 10_nvidia_wayland.json.fixed $i/share/glvnd/egl_vendor.d/nvidia_wayland.json </del> <ins> install -Dm644 10_nvidia.json.fixed $i/share/glvnd/egl_vendor.d/10_nvidia.json install -Dm644 10_nvidia_wayland.json.fixed $i/share/egl/egl_external_platform.d/10_nvidia_wayland.json if [[ -f "15_nvidia_gbm.json" ]]; then sed -E "s#(libnvidia-egl-gbm)#$i/lib/1#" 15_nvidia_gbm.json > 15_nvidia_gbm.json.fixed install -Dm644 15_nvidia_gbm.json.fixed $i/share/egl/egl_external_platform.d/15_nvidia_gbm.json mkdir -p $i/lib/gbm ln -s $i/lib/libnvidia-allocator.so $i/lib/gbm/nvidia-drm_gbm.so fi </ins> fi done


nativeBuildInputs = [ pkgconfig ]; buildInputs = [ igraph ]; <ins> propagatedBuildInputs = [ texttable ]; </ins> src = fetchPypi { inherit pname version; sha256 = "4601638d7d22eae7608cdf793efac75e6c039770ec4bd2cecf76378c84ce7d72"; }; <ins> # NB: We want to use our igraph, not vendored igraph, but even with # pkg-config on the PATH, their custom setup.py still needs to be explicitly # told to do it. ~ C. setupPyGlobalFlags = [ "--use-pkg-config" ]; </ins> doCheck = !isPy3k; meta = {


<del> From 28a27bdbb9500797e6767f80c8128b09112aeed5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <hjl.tools@gmail.com> Date: Sat, 11 Aug 2018 06:41:33 -0700 Subject: [PATCH] x86: Properly add X86_ISA_1_NEEDED property Existing properties may be removed during property merging.  We avoid adding X86_ISA_1_NEEDED property only if existing properties won't be removed. bfd/ PR ld/23428 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't add X86_ISA_1_NEEDED property only if existing properties won't be removed. ld/ PR ld/23428 * testsuite/ld-elf/dummy.s: New file. * testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property. * testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428. (cherry picked from commit ab9e342807d132182892de1be1a92d6e91a5c1da) --- bfd/elfxx-x86.c                   | 28 ++++++++++++++++++++++------ ld/testsuite/ld-elf/dummy.s       |  1 + ld/testsuite/ld-elf/linux-x86.S   | 28 ++++++++++++++++++++++++++++ ld/testsuite/ld-elf/linux-x86.exp |  2 +- 6 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 ld/testsuite/ld-elf/dummy.s diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index 7ccfd25815..2d8f7b640b 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -2588,7 +2588,6 @@ _bfd_x86_elf_link_setup_gnu_properties prop->pr_kind = property_number; } else if (has_text -	       && elf_properties (ebfd) == NULL && elf_tdata (info->output_bfd)->o->build_id.sec == NULL && !htab->elf.dynamic_sections_created && !info->traditional_format @@ -2598,11 +2597,28 @@ _bfd_x86_elf_link_setup_gnu_properties /* If the separate code program header is needed, make sure that the first read-only PT_LOAD segment has no code by adding a GNU_PROPERTY_X86_ISA_1_NEEDED note.  */ -	  prop = _bfd_elf_get_property (ebfd, -					GNU_PROPERTY_X86_ISA_1_NEEDED, -					4); -	  prop->u.number = GNU_PROPERTY_X86_ISA_1_486; -	  prop->pr_kind = property_number; +	  elf_property_list *list; +	  bfd_boolean need_property = TRUE; + +	  for (list = elf_properties (ebfd); list; list = list->next) +	    switch (list->property.pr_type) +	      { +	      case GNU_PROPERTY_STACK_SIZE: +	      case GNU_PROPERTY_NO_COPY_ON_PROTECTED: +	      case GNU_PROPERTY_X86_ISA_1_NEEDED: +		/* These properties won't be removed during merging.  */ +		need_property = FALSE; +		break; +	      } + +	  if (need_property) +	    { +	      prop = _bfd_elf_get_property (ebfd, +					    GNU_PROPERTY_X86_ISA_1_NEEDED, +					    4); +	      prop->u.number = GNU_PROPERTY_X86_ISA_1_486; +	      prop->pr_kind = property_number; +	    } } /* Create the GNU property note section if needed.  */ diff --git a/ld/testsuite/ld-elf/dummy.s b/ld/testsuite/ld-elf/dummy.s new file mode 100644 index 0000000000..403f98000d --- /dev/null +++ b/ld/testsuite/ld-elf/dummy.s @@ -0,0 +1 @@ +# Dummy diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S index bdf40c6e01..d94abc1106 100644 --- a/ld/testsuite/ld-elf/linux-x86.S +++ b/ld/testsuite/ld-elf/linux-x86.S @@ -61,3 +61,31 @@ syscall: ret			/* Return to caller.  */ .size syscall, .-syscall .section .note.GNU-stack,"",@progbits + +	.section ".note.gnu.property", "a" +#ifdef __LP64__ +	.p2align 3 +#else +	.p2align 2 +#endif +	.long 1f - 0f		/* name length */ +	.long 5f - 2f		/* data length */ +	.long 5			/* note type */ +0:	.asciz "GNU"		/* vendor name */ +1: +#ifdef __LP64__ +	.p2align 3 +#else +	.p2align 2 +#endif +2:	.long 0xc0000002	/* pr_type.  */ +	.long 4f - 3f		/* pr_datasz.  */ +3: +	.long 0x2 +4: +#ifdef __LP64__ +	.p2align 3 +#else +	.p2align 2 +#endif +5: diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp index 36217c6fb4..f6f5a80853 100644 --- a/ld/testsuite/ld-elf/linux-x86.exp +++ b/ld/testsuite/ld-elf/linux-x86.exp @@ -37,7 +37,7 @@ run_ld_link_exec_tests [list  "Run PR ld/23428 test"  "--no-dynamic-linker -z separate-code"  ""  -	{ linux-x86.S pr23428.c }  +	{ linux-x86.S pr23428.c dummy.s }  "pr23428"  "pass.out"  "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables"  -- 2.20.1 </del>


githubId = 84152630; name = "Ashley Chiara"; }; <ins> ashleyghooper = { email = "ashleyghooper@gmail.com"; github = "ashleyghooper"; githubId = 11037075; name = "Ashley Hooper"; }; </ins> aske = { email = "aske@fmap.me"; github = "aske";


LC_ALL = "en_US.UTF-8"; <ins> pytestFlags = stdenv.lib.optionals (xineBackend || !withGstPlugins) [ "--ignore=tests/plugin/test_replaygain.py" ] ++ [ # upstream does actually not enforce source code linting "--ignore=tests/quality" # build failure on Arch Linux # https://github.com/NixOS/nixpkgs/pull/77796#issuecomment-575841355 "--ignore=tests/test_operon.py" ]; </ins> checkPhase = '' runHook preCheck <del> env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS"  </del> <ins> env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS"  </ins> HOME=$(mktemp -d)  xvfb-run -s '-screen 0 800x600x24' dbus-run-session  --config-file=${dbus.daemon}/share/dbus-1/session.conf  <del> py.test${stdenv.lib.optionalString (xineBackend || !withGstPlugins) " --ignore=tests/plugin/test_replaygain.py"} </del> <ins> py.test $pytestFlags </ins> runHook postCheck '';


<ins> { config, lib, pkgs, ... }: with lib; let cfg = config.programs.msmtp; in { meta.maintainers = with maintainers; [ pacien ]; options = { programs.msmtp = { enable = mkEnableOption "msmtp - an SMTP client"; setSendmail = mkOption { type = types.bool; default = true; description = '' Whether to set the system sendmail to msmtp's. ''; }; defaults = mkOption { type = types.attrs; default = {}; example = { aliases = "/etc/aliases"; port = 587; tls = true; }; description = '' Default values applied to all accounts. See msmtp(1) for the available options. ''; }; accounts = mkOption { type = with types; attrsOf attrs; default = {}; example = { "default" = { host = "smtp.example"; auth = true; user = "someone"; passwordeval = "cat /secrets/password.txt"; }; }; description = '' Named accounts and their respective configurations. The special name "default" allows a default account to be defined. See msmtp(1) for the available options. Use `programs.msmtp.extraConfig` instead of this attribute set-based option if ordered account inheritance is needed. It is advised to use the `passwordeval` setting to read the password from a secret file to avoid having it written in the world-readable nix store. The password file must end with a newline (`n`). ''; }; extraConfig = mkOption { type = types.lines; default = ""; description = '' Extra lines to add to the msmtp configuration verbatim. See msmtp(1) for the syntax and available options. ''; }; }; }; config = mkIf cfg.enable { environment.systemPackages = [ pkgs.msmtp ]; services.mail.sendmailSetuidWrapper = mkIf cfg.setSendmail { program = "sendmail"; source = "${pkgs.msmtp}/bin/sendmail"; setuid = false; setgid = false; }; environment.etc."msmtprc".text = let mkValueString = v: if v == true then "on" else if v == false then "off" else generators.mkValueStringDefault {} v; mkKeyValueString = k: v: "${k} ${mkValueString v}"; mkInnerSectionString = attrs: concatStringsSep "n" (mapAttrsToList mkKeyValueString attrs); mkAccountString = name: attrs: '' account ${name} ${mkInnerSectionString attrs} ''; in '' defaults ${mkInnerSectionString cfg.defaults} ${concatStringsSep "n" (mapAttrsToList mkAccountString cfg.accounts)} ${cfg.extraConfig} ''; }; } </ins>


patchelf  --add-needed libasound.so.2  --add-needed libdbus-1.so.3  <ins> --add-needed libGL.so.1  </ins> --add-needed libpthread.so.0  --add-needed libudev.so.1  --add-needed libvulkan.so.1


optionalString config.security.pam.enableEcryptfs '' mr ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so, '' + <ins> optionalString config.security.pam.enableFscrypt '' mr ${pkgs.fscrypt-experimental}/lib/security/pam_fscrypt.so, '' + </ins> optionalString (isEnabled (cfg: cfg.pamMount)) '' mr ${pkgs.pam_mount}/lib/security/pam_mount.so, '' +


installPhase = '' install -D -m755 buck-out/gen/*/programs/buck.pex $out/bin/buck wrapProgram $out/bin/buck  <del> --prefix PATH : "${lib.makeBinPath [ jdk11 watchman python3 ]}" </del> <ins> --prefix PATH : "${lib.makeBinPath [ jdk8 watchman python3 ]}" </ins> ''; meta = with lib; {


libXfixes libGL nspr <del> nss </del> <ins> nss_latest </ins> systemd # For GTKLookAndFeel


<ins> { lib, buildNpmPackage, fetchFromGitHub, python3, nixosTests, }: let pname = "open-webui"; version = "0.2.4"; src = fetchFromGitHub { owner = "open-webui"; repo = "open-webui"; rev = "v${version}"; hash = "sha256-jWO0mo26C+QTIX5j3ucDk/no+vQnAh7Q6JwB3lLM83k="; }; frontend = buildNpmPackage { inherit pname version src; npmDepsHash = "sha256-QIgYHZusuq2QD8p8MGsNVhCbz6fR+qP9UuU/kbBkadc="; # Disabling `pyodide:fetch` as it downloads packages during `buildPhase` # Until this is solved, running python packages from the browser will not work. postPatch = '' substituteInPlace package.json  --replace-fail "npm run pyodide:fetch && vite build" "vite build"  ''; env.CYPRESS_INSTALL_BINARY = "0"; # disallow cypress from downloading binaries in sandbox installPhase = '' runHook preInstall mkdir -p $out/share cp -a build $out/share/open-webui runHook postInstall ''; }; in python3.pkgs.buildPythonApplication rec { inherit pname version src; pyproject = true; # The custom hook tries to run `npm install` in `buildPhase`. # We don't have to worry, as nodejs depedencies are managed by `frontend` drv. postPatch = '' substituteInPlace pyproject.toml  --replace-fail '[tool.hatch.build.hooks.custom]' ""  --replace-fail ', build = "open_webui/frontend"' "" ''; pythonRelaxDeps = true; pythonRemoveDeps = [ # using `psycopg2` instead "psycopg2-binary" # using `opencv4` "opencv-python-headless" # package request: https://github.com/NixOS/nixpkgs/issues/317065 "rapidocr-onnxruntime" # package request: https://github.com/NixOS/nixpkgs/issues/317066 "langfuse" # package request: https://github.com/NixOS/nixpkgs/issues/317068 "langchain-chroma" ]; dependencies = with python3.pkgs; [ beautifulsoup4 fastapi uvicorn python-multipart flask flask-cors python-socketio python-jose passlib requests aiohttp peewee peewee-migrate psycopg2 pymysql bcrypt litellm boto3 argon2-cffi apscheduler google-generativeai langchain langchain-community fake-useragent chromadb sentence-transformers pypdf docx2txt python-pptx unstructured markdown pypandoc pandas openpyxl pyxlsb xlrd validators opencv4 fpdf2 rank-bm25 faster-whisper pyjwt black youtube-transcript-api pytube ]; build-system = with python3.pkgs; [ hatchling pythonRelaxDepsHook ]; pythonImportsCheck = [ "open_webui" ]; postInstall = '' wrapProgram $out/bin/open-webui  --set FRONTEND_BUILD_DIR "${frontend}/share/open-webui" ''; passthru.tests = { inherit (nixosTests) open-webui; }; meta = { description = "Full-stack of open-webui. open-webui is a user-friendly WebUI for LLMs (Formerly Ollama WebUI)"; homepage = "https://github.com/open-webui/open-webui"; changelog = "https://github.com/open-webui/open-webui/blob/${src.rev}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ shivaraj-bh ]; mainProgram = "open-webui"; }; } </ins>


See <https://mailman.readthedocs.io/en/latest/src/mailman/docs/mta.html>. ''; }; <del> in [ </del> <ins> in (lib.optionals cfg.enablePostfix [ </ins> { assertion = postfix.enable; <del> message = "Mailman requires Postfix"; </del> <ins> message = '' Mailman's default NixOS configuration requires Postfix to be enabled. If you want to use another MTA, set services.mailman.enablePostfix to false and configure settings in services.mailman.settings.mta. Refer to <https://mailman.readthedocs.io/en/latest/src/mailman/docs/mta.html> for more info. ''; </ins> } (requirePostfixHash [ "relayDomains" ] "postfix_domains") (requirePostfixHash [ "config" "transport_maps" ] "postfix_lmtp") (requirePostfixHash [ "config" "local_recipient_maps" ] "postfix_lmtp") <del> ]; </del> <ins> ]); </ins> users.users.mailman = { description = "GNU Mailman";


, texinfo , hevea , buildDocs ? false <ins> , optimize ? false # optimize sage to the current system (obviously impure) </ins> }: stdenv.mkDerivation rec {


<ins> { lib , stdenv , fetchFromGitHub , cmake , gcc12Stdenv , SDL2 , libGL }: gcc12Stdenv.mkDerivation (finalAttrs: { pname = "bstone"; version = "1.2.12"; src = fetchFromGitHub { owner = "bibendovsky"; repo = "bstone"; rev = "v${finalAttrs.version}"; hash = "sha256-wtW595cSoVTZaVykxOkJViNs3OmuIch9nA5s1SqwbJo="; }; nativeBuildInputs = [ cmake ]; buildInputs = [ libGL SDL2 ]; postInstall = '' mkdir -p $out/bin mv $out/bstone* $out/bin ''; meta = { description = "Unofficial source port for the Blake Stone series"; homepage = "https://github.com/bibendovsky/bstone"; changelog = "https://github.com/bibendovsky/bstone/blob/${finalAttrs.src.rev}/CHANGELOG.md"; license = with lib.licenses; [ gpl2Plus # Original game source code mit # BStone ]; maintainers = with lib.maintainers; [ keenanweaver ]; mainProgram = "bstone"; platforms = lib.platforms.linux; #TODO: macOS / Darwin support }; }) </ins>


nativeBuildInputs = [ meson ninja pkg-config python3 wayland-scanner ]; buildInputs = [ cairo colord dbus freerdp lcms2 libGL libXcursor libdrm libevdev libinput <del> libjpeg libseat libunwind libva libwebp libxcb libxkbcommon mesa mtdev pam </del> <ins> libjpeg seatd libunwind libva libwebp libxcb libxkbcommon mesa mtdev pam </ins> pango pipewire udev vaapi wayland wayland-protocols xlibsWrapper ];


dontStrip = true; src = fetchzip { <del> url = "https://usa.kyoceradocumentsolutions.com/content/dam/kdc/kdag/downloads/technical/executables/drivers/kyoceradocumentsolutions/us/en/Kyocera_Linux_PPD_Ver_${version}.tar.gz"; </del> <ins> url = "https://la.kyoceradocumentsolutions.com/content/dam/kdc/kdag/downloads/technical/executables/drivers/kyoceradocumentsolutions/lad/en/Kyocera_Linux_PPD_Ver_${version}.tar.gz"; </ins> sha256 = "11znnlkfssakml7w80gxlz1k59f3nvhph91fkzzadnm9i7a8yjal"; };


, bison ? null , flex , texinfo <ins> , perl </ins> }: let reuseLibs = enableShared && withAllTargets; <del> # Remove gold-symbol-visibility patch when updating, the proper fix # is now upstream. # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3 version = "2.31.1"; </del> <ins> version = "2.34"; </ins> basename = "binutils"; # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable.


<del> { lib, fetchurl, appimageTools, imagemagick }: </del> <ins> { lib, fetchurl, appimageTools, imagemagick, systemd }: </ins> let pname = "ledger-live-desktop";


sha256 = "0wmw823ildwm9rcfyk22pvzg100yhps3y9hfjlrpspfd1hhkbp0d"; <del> extraPatches = [ ]; </del> <ins> extraPatches = [ reapplyPathSanitizerPatch ]; </ins> }; zfsUnstable = common {


"OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct" ]; <ins> postFixup = '' substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace  'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/' 'INTERFACE_INCLUDE_DIRECTORIES "' ''; </ins> meta = { homepage = "https://nlopt.readthedocs.io/en/latest/"; description = "Free open-source library for nonlinear optimization";


mv $out/usr/* $out/ rm -r $out/share/lintian rm -r $out/usr/ <ins> sed -i "s/${pname})/.${pname}-wrapped)/" $out/bin/${pname} </ins> # sed -i "s/'${pname}'/'.${pname}-wrapped'/" $out/bin/${pname} wrapProgram $out/bin/${pname}  --prefix "PATH" : "${gvfs}/bin"


captive-browser = callPackage ../applications/networking/browsers/captive-browser { }; <del> ndn-cxx = callPackage ../development/libraries/ndn-cxx { boost = boost175; }; </del> <ins> ndn-cxx = callPackage ../development/libraries/ndn-cxx { }; </ins> ndn-tools = callPackage ../tools/networking/ndn-tools { };


modernx-zydezu = callPackage ./modernx-zydezu.nix { }; mpris = callPackage ./mpris.nix { }; mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { }; <ins> mpv-discord = callPackage ./mpv-discord.nix { }; </ins> mpv-notify-send = callPackage ./mpv-notify-send.nix { }; mpv-osc-modern = callPackage ./mpv-osc-modern.nix { }; mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };


stdenv.mkDerivation rec { pname = "shotwell"; <del> version = "0.31.5"; </del> <ins> version = "0.31.7"; </ins> src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; <del> sha256 = "sha256-OwSPxs6ZsjLR4OqbjbB0CDyGyI07bWMTaiz4IXqkXBk="; </del> <ins> sha256 = "sha256-gPCj2HVS+L3vpeNig77XZ9AFdtqMyWpEo9NKQjXEmeA="; </ins> }; <ins> patches = [ # Fix build with vala 0.56.4, can be removed on next update # https://gitlab.gnome.org/GNOME/shotwell/-/merge_requests/69 (fetchpatch2 { url = "https://gitlab.gnome.org/GNOME/shotwell/-/commit/cd82759231e5ece2fa0dea40397c9051d15fd5c2.patch"; hash = "sha256-Vy2kvUlmPdEEuPB1RTcI5pGYNveeiQ+lId0YVlWo4wU="; }) ]; </ins> nativeBuildInputs = [ meson ninja


stdenv.mkDerivation rec { pname = "xow"; <del> version = "0.5"; </del> <ins> version = "unstable-2022-04-24"; </ins> src = fetchFromGitHub { owner = "medusalix"; repo = "xow"; <del> rev = "v${version}"; sha256 = "071r2kx44k1sc49cad3i607xg618mf34ki1ykr5lnfx9y6qyz075"; </del> <ins> rev = "d335d6024f8380f52767a7de67727d9b2f867871"; sha256 = "0q5nr21p4dlx2a99hiivwz6qj9anrqqsdhiz6xi375yqkxis4251"; </ins> }; firmware = fetchurl {


perlPackages.buildPerlPackage rec { pname = "SpamAssassin"; <del> version = "4.0.0"; rulesRev = "r1905950"; </del> <ins> version = "4.0.1"; rulesRev = "r1916528"; </ins> src = fetchurl { url = "mirror://apache/spamassassin/source/Mail-${pname}-${version}.tar.bz2"; <del> hash = "sha256-5aoXBQowvHK6qGr9xgSMrepNHsLsxh14dxegWbgxnog="; </del> <ins> hash = "sha256-l3XtdVnoPsPmwD7bK+j/x/FcxAX7E+hcFI6wvxkXIag="; </ins> }; defaultRulesSrc = fetchurl { url = "mirror://apache/spamassassin/source/Mail-${pname}-rules-${version}.${rulesRev}.tgz"; <del> hash = "sha256-rk/7uRfrx/76ckD8W7UVHdpmP45AWRYa18m0Lu0brG0="; </del> <ins> hash = "sha256-OB6t/H5RPl9zU4m3gXPeWvRx89Bv5quPEpY0pmRLS/Q="; </ins> }; patches = [


pixman cairo pango <ins> ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreText </ins> ]; desktopItems = [


in stdenv.mkDerivation rec { pname = "openshadinglanguage"; <del> version = "1.12.13.0"; </del> <ins> version = "1.12.14.0"; </ins> src = fetchFromGitHub { owner = "AcademySoftwareFoundation"; repo = "OpenShadingLanguage"; rev = "v${version}"; <del> hash = "sha256-EVV7YHovWwbRju+uv8IK2wpcpoK1ndZ8yNRHzU8LUuE="; </del> <ins> hash = "sha256-x8t7uC4q29MkTCIS1rK0ICw78u5zZG+/zyhwttLOBr4="; </ins> }; cmakeFlags = [


githubId = 303489; name = "Manuel Bärenz"; }; <ins> tu-maurice = { email = "valentin.gehrke+nixpkgs@zom.bi"; github = "tu-maurice"; githubId = 16151097; name = "Valentin Gehrke"; }; </ins> tv = { email = "tv@krebsco.de"; github = "4z3";


''; }; <ins> virtualisation.libvirtd.qemuOvmf = mkOption { type = types.bool; default = true; description = '' Allows libvirtd to take advantage of OVMF when creating new QEMU VMs with UEFI boot. ''; }; </ins> virtualisation.libvirtd.extraOptions = mkOption { type = types.listOf types.str; default = [ ];


python3Packages.buildPythonApplication rec { pname = "electron-cash"; <del> version = "4.2.0"; </del> <ins> version = "4.2.4"; </ins> src = fetchFromGitHub { owner = "Electron-Cash"; repo = "Electron-Cash"; rev = version; <del> sha256 = "0ixsx4224jilc5zis6wbsbxqxv10mm5sksrzq15xp30zz0bzb6md"; </del> <ins> sha256 = "sha256-hiOS0cTaPqllb31p+6nU4GYvw/E1Hdn8yd3sppzGkqg="; </ins> }; propagatedBuildInputs = with python3Packages; [ <del> dnspython </del> <ins> # requirements pyaes </ins> ecdsa <ins> requests qrcode protobuf </ins> jsonrpclib-pelix <del> matplotlib pbkdf2 pyaes pycrypto pyqt5 </del> pysocks <del> qrcode requests tlslite-ng </del> qdarkstyle <ins> python-dateutil </ins> stem <ins> certifi pathvalidate dnspython </ins> <del> # plugins keepkey </del> <ins> # requirements-binaries pyqt5 psutil pycryptodomex cryptography # requirements-hw cython </ins> trezor <ins> keepkey </ins> btchip <ins> hidapi pyscard pysatochip </ins> ]; nativeBuildInputs = [ wrapQtAppsHook ];


}; buildInputs = [ makeWrapper pkgconfig e19.efl python27 dbus ]; <del> propagatedBuildInputs = [ python27Packages.pythonefl_1_11 python27Packages.dbus e19.elementary ]; </del> <ins> propagatedBuildInputs = [ python27Packages.pythonefl_1_12 python27Packages.dbus e19.elementary ]; </ins> postInstall = '' <del> wrapProgram $out/bin/econnman-bin --prefix PYTHONPATH : ${python27Packages.dbus}/lib/python2.7/site-packages:${python27Packages.pythonefl_1_11}/lib/python2.7/site-packages </del> <ins> wrapProgram $out/bin/econnman-bin --prefix PYTHONPATH : ${python27Packages.dbus}/lib/python2.7/site-packages:${python27Packages.pythonefl_1_12}/lib/python2.7/site-packages </ins> ''; meta = {


src = fetchurl { url = <del> "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/flutter_linux_v${version}-${channel}.tar.xz"; </del> <ins> "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}"; </ins> sha256 = sha256Hash; };


outputs = [ "out" "dev" "doc" ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; <del> buildInputs = [ fftw ]; </del> <ins> buildInputs = lib.optionals withFftw3 [ fftw ]; </ins> <del> configureFlags = [ "--with-fft=gpl-fftw3" ] ++ lib.optional stdenv.isAarch64 "--disable-neon"; </del> <ins> configureFlags = lib.optionals withFftw3 [ "--with-fft=gpl-fftw3" ] ++ lib.optional stdenv.isAarch64 "--disable-neon"; </ins> meta = with lib; { homepage = "https://www.speex.org/";


check_systemd = callPackage ../servers/monitoring/nagios/plugins/check_systemd.nix { }; <del> neo4j = callPackage ../servers/nosql/neo4j { }; </del> <ins> neo4j = callPackage ../servers/nosql/neo4j { jre = jre8_headless; }; </ins> neo4j-desktop = callPackage ../applications/misc/neo4j-desktop { };


 <title>GNOME</title>
 <title>Packaging GNOME applications</title> <para> Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nix’s specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. <link xlink:href="#fun-wrapProgram">Wrapping</link> the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us. </para>
 <title>Settings</title> <para> <link xlink:href="https://developer.gnome.org/gio/stable/GSettings.html">GSettings</link> API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for <filename>glib-2.0/schemas/gschemas.compiled</filename> files inside the directories of <envar>XDG_DATA_DIRS</envar>. </para> <para> On Linux, GSettings API is implemented using <link xlink:href="https://wiki.gnome.org/Projects/dconf">dconf</link> backend. You will need to add <literal>dconf</literal> GIO module to <envar>GIO_EXTRA_MODULES</envar> variable, otherwise the <literal>memory</literal> backend will be used and the saved settings will not be persistent. </para> <para> Last you will need the dconf database D-Bus service itself. You can enable it using <option>programs.dconf.enable</option>. </para> <para> Some applications will also require <package>gsettings-desktop-schemas</package> for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for <literal>org.gnome.desktop</literal> and <literal>org.gnome.system</literal> to see if the schemas are needed. </para>

 <title>Icons</title> <para> When an application uses icons, an icon theme should be available in <envar>XDG_DATA_DIRS</envar>. The package for the default, icon-less <link xlink:href="https://www.freedesktop.org/wiki/Software/icon-theme/">hicolor-icon-theme</link> contains <link linkend="ssec-gnome-hooks-hicolor-icon-theme">a setup hook</link> that will pick up icon themes from <literal>buildInputs</literal> and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed. </para>

 <title>GTK Themes</title> <para> Previously, a GTK theme needed to be in <envar>XDG_DATA_DIRS</envar>. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for <link xlink:href="https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines">elementary HIG</link>) might require a special theme like <package>pantheon.elementary-gtk-theme</package>. </para>

 <title>GObject introspection typelibs</title> <para> <link xlink:href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject introspection</link> allows applications to use C libraries in other languages easily. It does this through <literal>typelib</literal> files searched in <envar>GI_TYPELIB_PATH</envar>. </para>

 <title>Various plug-ins</title> <para> If your application uses <link xlink:href="https://gstreamer.freedesktop.org/">GStreamer</link> or <link xlink:href="https://wiki.gnome.org/Projects/Grilo">Grilo</link>, you should set <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar>, respectively. </para>

 <title>Onto <package>wrapGAppsHook</package></title> <para> Given the requirements above, the package expression would become messy quickly: <programlisting> preFixup = '' for f in $(find $out/bin/ $out/libexec/ -type f -executable); do wrapProgram "$f"  --prefix GIO_EXTRA_MODULES : "${getLib gnome3.dconf}/lib/gio/modules"  --prefix XDG_DATA_DIRS : "$out/share"  --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}"  --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"  --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share"  --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}" done ''; </programlisting> Fortunately, there is <package>wrapGAppsHook</package>, that does the wrapping for us. In particular, it works in conjunction with other setup hooks that will populate the variable: <itemizedlist> <listitem xml:id="ssec-gnome-hooks-wrapgappshook"> <para> <package>wrapGAppsHook</package> itself will add the package’s <filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>. </para> </listitem> <listitem xml:id="ssec-gnome-hooks-glib"> <para> <package>glib</package> setup hook will populate <envar>GSETTINGS_SCHEMAS_PATH</envar> and then <package>wrapGAppsHook</package> will prepend it to <envar>XDG_DATA_DIRS</envar>. </para> </listitem> <listitem xml:id="ssec-gnome-hooks-dconf"> <para> <package>gnome3.dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable. </para> </listitem> <listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme"> <para> <package>hicolor-icon-theme</package>’s setup hook will add icon themes to <envar>XDG_ICON_DIRS</envar> which is prepended to <envar>XDG_DATA_DIRS</envar> by <package>wrapGAppsHook</package>. </para> </listitem> <listitem xml:id="ssec-gnome-hooks-gobject-introspection"> <para> <package>gobject-introspection</package> setup hook populates <envar>GI_TYPELIB_PATH</envar> variable with <filename>lib/girepository-1.0</filename> directories of dependencies, which is then added to wrapper by <package>wrapGAppsHook</package>. It also adds <filename>share</filename> directories of dependencies to <envar>XDG_DATA_DIRS</envar>, which is intended to promote GIR files but it also <link xlink:href="https://github.com/NixOS/nixpkgs/issues/32790">pollutes the closures</link> of packages using <package>wrapGAppsHook</package>. </para> <warning> <para> The setup hook <link xlink:href="https://github.com/NixOS/nixpkgs/issues/56943">currently</link> does not work in expressions with <literal>strictDeps</literal> enabled, like Python packages. In those cases, you will need to disable it with strictDeps = false;. </para> </warning> </listitem> <listitem xml:id="ssec-gnome-hooks-gst-grl-plugins"> <para> Setup hooks of <package>gst_all_1.gstreamer</package> and <package>gnome3.grilo</package> will populate the <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar> variables, respectively, which will then be added to the wrapper by <literal>wrapGAppsHook</literal>. </para> </listitem> </itemizedlist> </para> <para> You can also pass additional arguments to <literal>makeWrapper</literal> using <literal>gappsWrapperArgs</literal> in <literal>preFixup</literal> hook: <programlisting> preFixup = '' gappsWrapperArgs+=( # Thumbnailers --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" --prefix XDG_DATA_DIRS : "${librsvg}/share" --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" ) ''; </programlisting> </para>

 <title>Updating GNOME packages</title> <para> Most GNOME package offer <link linkend="var-passthru-updateScript"><literal>updateScript</literal></link>, it is therefore possible to update to latest source tarball by running <command>nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus</command> or even en masse with <command>nix-shell maintainers/scripts/update.nix --argstr path gnome3</command>. Read the package’s <filename>NEWS</filename> file to see what changed. </para>

 <title>Frequently encountered issues</title> <variablelist> <varlistentry xml:id="ssec-gnome-common-issues-no-schemas"> <term> <computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: No GSettings schemas are installed on the system</computeroutput> </term> <listitem> <para> There are no schemas avalable in <envar>XDG_DATA_DIRS</envar>. Temporarily add a random package containing schemas like <package>gsettings-desktop-schemas</package> to <literal>buildInputs</literal>. <link linkend="ssec-gnome-hooks-glib"><package>glib</package></link> and <link linkend="ssec-gnome-hooks-wrapgappshook"><package>wrapGAppsHook</package></link> setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the <link linkend="ssec-gnome-common-issues-missing-schema">next error</link>. Or you can try looking through the source code for the actual schemas used. </para> </listitem> </varlistentry> <varlistentry xml:id="ssec-gnome-common-issues-missing-schema"> <term> <computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: Settings schema ‘<replaceable>org.gnome.foo</replaceable>’ is not installed</computeroutput> </term> <listitem> <para> Package is missing some GSettings schemas. You can find out the package containing the schema with <command>nix-locate <replaceable>org.gnome.foo</replaceable>.gschema.xml</command> and let the hooks handle the wrapping as <link linkend="ssec-gnome-common-issues-no-schemas">above</link>. </para> </listitem> </varlistentry> <varlistentry xml:id="ssec-gnome-common-issues-double-wrapped"> <term> When using <package>wrapGAppsHook</package> with special derivers you can end up with double wrapped binaries. </term> <listitem> <para> This is because derivers like <function>python.pkgs.buildPythonApplication</function> or <function>qt5.mkDerivation</function> have setup-hooks automatically added that produce wrappers with <package>makeWrapper</package>. The simplest way to workaround that is to disable the <package>wrapGAppsHook</package> automatic wrapping with dontWrapGApps = true; and pass the arguments it intended to pass to <package>makeWrapper</package> to another. </para> <para> In the case of a Python application it could look like: <programlisting> python3.pkgs.buildPythonApplication { pname = "gnome-music"; version = "3.32.2"; nativeBuildInputs = [ wrapGAppsHook gobject-introspection ... ]; dontWrapGApps = true; # Arguments to be passed to `makeWrapper`, only used by buildPython* makeWrapperArgs = [ "${gappsWrapperArgs[@]}" ]; } </programlisting> And for a QT app like: <programlisting> mkDerivation { pname = "calibre"; version = "3.47.0"; nativeBuildInputs = [ wrapGAppsHook qmake ... ]; dontWrapGApps = true; # Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation qtWrapperArgs [ "${gappsWrapperArgs[@]}" ]; } </programlisting> </para> </listitem> </varlistentry> <varlistentry xml:id="ssec-gnome-common-issues-unwrappable-package"> <term> I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension. </term> <listitem> <para> You can rely on applications depending on the library set the necessary environment variables but that it often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples: <itemizedlist> <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext"> <para> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> – we are using <function>substituteAll</function> to include the path to a typelib into a patch. </para> </listitem> <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings"> <para> The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions <itemizedlist> <listitem> <para> <function>glib.getSchemaPath</function> Takes a nix package attribute as an argument. </para> </listitem> <listitem> <para> <function>glib.makeSchemaPath</function> Takes a package output like <literal>$out</literal> and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation. </para> </listitem> </itemizedlist> </para> <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala"> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> – here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>. </para> <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c"> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding GSettings schema path in C library</link> – nothing special other than using <link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle patch</link> to generate the patch itself. </para> </listitem> </itemizedlist> </para> </listitem> </varlistentry> </variablelist>


<del> ;;; NixOS specific load-path (setq load-path (append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/")) (split-string (or (getenv "NIX_PROFILES") "")))) load-path)) </del> <ins> (defun nix--profile-paths () "Returns a list of all paths in the NIX_PROFILES environment variable, ordered from more-specific (the user profile) to the least specific (the system profile)" (reverse (split-string (or (getenv "NIX_PROFILES") "")))) ;;; Extend `load-path' to search for elisp files in subdirectories of ;;; all folders in `NIX_PROFILES'. Also search for one level of ;;; subdirectories in these directories to handle multi-file libraries ;;; like `mu4e'.' (require 'seq) (let* ((subdirectory-sites (lambda (site-lisp) (when (file-exists-p site-lisp) (seq-filter (lambda (f) (file-directory-p (file-truename f))) ;; Returns all files in `site-lisp', excluding `.' and `..' (directory-files site-lisp 'full "^([^.]|.[^.]|...)"))))) (paths (apply #'append (mapcar (lambda (profile-dir) (let ((site-lisp (concat profile-dir "/share/emacs/site-lisp/"))) (cons site-lisp (funcall subdirectory-sites site-lisp)))) (nix--profile-paths))))) (setq load-path (append paths load-path))) </ins> ;;; Make `woman' find the man pages (eval-after-load 'woman '(setq woman-manpath <del> (append (reverse (mapcar (lambda (x) (concat x "/share/man/")) (split-string (or (getenv "NIX_PROFILES") "")))) </del> <ins> (append (mapcar (lambda (x) (concat x "/share/man/")) (nix--profile-paths)) </ins> woman-manpath))) ;;; Make tramp work for remote NixOS machines (eval-after-load 'tramp <ins> ;; TODO: We should also add the other `NIX_PROFILES' to this path. ;; However, these are user-specific, so we would need to discover ;; them dynamically after connecting via `tramp' </ins> '(add-to-list 'tramp-remote-path "/run/current-system/sw/bin")) ;;; C source directory


# which cannot be set at the same time as -Wformat-security hardeningDisable = [ "format" ]; <del> patches = [ # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 (fetchpatch { name = "qtwebengine-bison-3.7-build.patch"; url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; stripLen = 1; extraPrefix = "src/3rdparty/"; }) ]; </del> postPatch = # Patch Chromium build tools '' ( cd src/3rdparty/chromium; patchShebangs . ) '' <del> # Patch Chromium build files + optionalString (lib.versionOlder qtCompatVersion "5.12") '' substituteInPlace ./src/3rdparty/chromium/build/common.gypi --replace /bin/echo ${coreutils}/bin/echo substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/toolchain.gypi  --replace /bin/echo ${coreutils}/bin/echo substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/standalone.gypi  --replace /bin/echo ${coreutils}/bin/echo '' </del> # Prevent Chromium build script from making the path to `clang` relative to # the build directory.  `clang_base_path` is the value of `QMAKE_CLANG_DIR` # from `src/core/config/mac_osx.pri`.


qtWrapperArgs = lib.optionals stdenv.isLinux [ "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" <ins> # https://bugs.dolphin-emu.org/issues/11807 # The .desktop file should already set this, but Dolphin may be launched in other ways "--set QT_QPA_PLATFORM xcb" </ins> ]; # - Allow Dolphin to use nix-provided libraries instead of building them


cups-pdf = handleTest ./cups-pdf.nix {}; custom-ca = handleTest ./custom-ca.nix {}; croc = handleTest ./croc.nix {}; <ins> darling = handleTest ./darling.nix {}; </ins> deepin = handleTest ./deepin.nix {}; deluge = handleTest ./deluge.nix {}; dendrite = handleTest ./matrix/dendrite.nix {};


<del> { lib, stdenv </del> <ins> { lib , stdenv </ins> , fetchurl , dpkg , undmg


<ins> { stdenv , fetchFromGitLab , extra-cmake-modules , botan2 , karchive , kauth , libdrm , mesa-demos , procps , utillinux , vulkan-tools , qtbase , qtcharts , qtquickcontrols2 , qtsvg , qttools , qtxmlpatterns , wrapQtAppsHook } : stdenv.mkDerivation rec{ pname = "corectrl"; version = "1.1.1"; src = fetchFromGitLab { owner = "corectrl"; repo = "corectrl"; rev = "v${version}"; sha256 = "sha256-YQDrxPqCa3OzNKd3UiAffqqvOrgbXmDFJGjYPetolyY="; }; nativeBuildInputs = [ extra-cmake-modules wrapQtAppsHook ]; buildInputs = [ botan2 karchive kauth libdrm mesa-demos procps utillinux vulkan-tools qtbase qtcharts qtquickcontrols2 qtsvg qttools qtxmlpatterns ]; runtimeDeps = [ mesa-demos vulkan-tools ]; binPath = stdenv.lib.makeBinPath runtimeDeps; dontWrapQtApps = true; postInstall = '' wrapQtApp $out/bin/corectrl --prefix PATH ":" ${binPath} ''; meta = with stdenv.lib; { homepage = "https://gitlab.com/corectrl/corectrl/"; description = "Control your computer hardware via application profiles"; longDescription = '' CoreCtrl is a Free and Open Source GNU/Linux application that allows you to control with ease your computer hardware using application profiles. It aims to be flexible, comfortable and accessible to regular users. ''; license = licenses.gpl3Plus; platforms = platforms.linux; }; } # TODO: report upstream that libdrm is not detected at configure time </ins>


nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "scs" ]; <ins> disabledTests = lib.lists.optional (stdenv.system == "x86_64-linux") [ # `test/test_scs_rand.py` hang on "x86_64-linux" (https://github.com/NixOS/nixpkgs/pull/244532#pullrequestreview-1598095858) "test_feasible" "test_infeasibl" "test_unbounded" ]; </ins> meta = with lib; { description = "Python interface for SCS: Splitting Conic Solver";


<ins> # Adding Custom Packages {#sec-custom-packages} It's possible that a package you need is not available in NixOS. In that case, you can do two things. First, you can clone the Nixpkgs repository, add the package to your clone, and (optionally) submit a patch or pull request to have it accepted into the main Nixpkgs repository. This is described in detail in the [Nixpkgs manual](https://nixos.org/nixpkgs/manual). In short, you clone Nixpkgs: ```ShellSession $ git clone https://github.com/NixOS/nixpkgs $ cd nixpkgs ``` Then you write and test the package as described in the Nixpkgs manual. Finally, you add it to [](#opt-environment.systemPackages), e.g. ```nix environment.systemPackages = [ pkgs.my-package ]; ``` and you run `nixos-rebuild`, specifying your own Nixpkgs tree: ```ShellSession # nixos-rebuild switch -I nixpkgs=/path/to/my/nixpkgs ``` The second possibility is to add the package outside of the Nixpkgs tree. For instance, here is how you specify a build of the [GNU Hello](https://www.gnu.org/software/hello/) package directly in `configuration.nix`: ```nix environment.systemPackages = let my-hello = with pkgs; stdenv.mkDerivation rec { name = "hello-2.8"; src = fetchurl { url = "mirror://gnu/hello/${name}.tar.gz"; sha256 = "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"; }; }; in [ my-hello ]; ``` Of course, you can also move the definition of `my-hello` into a separate Nix expression, e.g. ```nix environment.systemPackages = [ (import ./my-hello.nix) ]; ``` where `my-hello.nix` contains: ```nix with import <nixpkgs> {}; # bring all of Nixpkgs into scope stdenv.mkDerivation rec { name = "hello-2.8"; src = fetchurl { url = "mirror://gnu/hello/${name}.tar.gz"; sha256 = "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"; }; } ``` This allows testing the package easily: ```ShellSession $ nix-build my-hello.nix $ ./result/bin/hello Hello, world! ``` </ins>


fetchSubmodules = true; }; <ins> patches = [ # prevents runtime crash when fcitx5-based IM attempts to look in /usr (fetchpatch { name = "use-CMAKE_INSTALL_PREFIX-for-loading-data.patch"; url = "https://github.com/OpenBangla/OpenBangla-Keyboard/commit/f402472780c29eaa6b4cc841a70289adf171462b.diff"; hash = "sha256-YahvtyOxe8F40Wfe+31C6fdmm197QN26/Q67oinOplk="; }) ]; </ins> nativeBuildInputs = [ cmake pkg-config


sed -i "s|$(DESTDIR)$(PGSQL_BINDIR)|$prefix/bin|g "  "raster/scripts/python/Makefile"; <del> ''; preInstall = '' </del> mkdir -p $out/bin <ins> # postgis' build system assumes it is being installed to the same place as postgresql, and looks # for the postgres binary relative to $PREFIX. We gently support this system using an illusion. ln -s ${postgresql}/bin/postgres $out/bin/postgres </ins> ''; # create aliases for all commands adding version information postInstall = '' <ins> # Teardown the illusory postgres used for building; see postConfigure. rm $out/bin/postgres </ins> for prog in $out/bin/*; do # */ ln -s $prog $prog-${version} done


''; cmakeFlags = [ <del> (lib.cmakeBool "USE_DLIB_USE_CUDA" cudaSupport) </del> (lib.cmakeBool "USE_SSE4_INSTRUCTIONS" sse4Support) (lib.cmakeBool "USE_AVX_INSTRUCTIONS" avxSupport) <ins> (lib.cmakeBool "DLIB_USE_CUDA" cudaSupport) ] ++ lib.optionals cudaSupport [ (lib.cmakeFeature "DLIB_USE_CUDA_COMPUTE_CAPABILITIES" (builtins.concatStringsSep "," (with cudaPackages.flags; map dropDot cudaCapabilities))) </ins> ]; <del> nativeBuildInputs = [ cmake pkg-config ]; </del> <ins> nativeBuildInputs = [ cmake pkg-config ] ++ lib.optionals cudaSupport (with cudaPackages; [ cuda_nvcc ]); </ins> buildInputs = [ <del> fftw </del> libpng libjpeg libwebp <del> openblas ] ++ lib.optional guiSupport libX11; </del> <ins> blas lapack ] ++ lib.optionals guiSupport [ libX11 ] ++ lib.optionals config.cudaSupport (with cudaPackages; [ cuda_cudart.dev cuda_cudart.lib cuda_cudart.static cuda_nvcc.dev libcublas.dev libcublas.lib libcublas.static libcurand.dev libcurand.lib libcurand.static libcusolver.dev libcusolver.lib libcusolver.static cudnn.dev cudnn.lib cudnn.static cuda_cccl.dev ]); passthru = { inherit cudaSupport cudaPackages sse4Support avxSupport; }; </ins> meta = with lib; { description = "A general purpose cross-platform C++ machine learning library";


<ins> { lib , buildPythonPackage , python , pythonOlder , fetchFromGitLab , substituteAll , bubblewrap , exiftool , ffmpeg , mime-types , wrapGAppsHook , gdk-pixbuf , gobject-introspection , librsvg , poppler_gi , mutagen , pygobject3 , pycairo , dolphinIntegration ? false, plasma5Packages }: buildPythonPackage rec { pname = "mat2"; version = "0.12.0"; disabled = pythonOlder "3.5"; src = fetchFromGitLab { domain = "0xacab.org"; owner = "jvoisin"; repo = "mat2"; rev = version; sha256 = "0amxwwmcf47dakfm6zvsksv6ja7rz7dpmd1z2rsspy8yds6zgxs7"; }; patches = [ # hardcode paths to some binaries (substituteAll ({ src = ./paths.patch; bwrap = "${bubblewrap}/bin/bwrap"; exiftool = "${exiftool}/bin/exiftool"; ffmpeg = "${ffmpeg}/bin/ffmpeg"; # remove once faf0f8a8a4134edbeec0a73de7f938453444186d is in master mimetypes = "${mime-types}/etc/mime.types"; } // lib.optionalAttrs dolphinIntegration { kdialog = "${plasma5Packages.kdialog}/bin/kdialog"; })) # the executable shouldn't be called .mat2-wrapped ./executable-name.patch # hardcode path to mat2 executable ./tests.patch ]; postPatch = '' substituteInPlace dolphin/mat2.desktop  --replace "@mat2@" "$out/bin/mat2"  --replace "@mat2svg@" "$out/share/icons/hicolor/scalable/apps/mat2.svg" ''; nativeBuildInputs = [ wrapGAppsHook ]; buildInputs = [ gdk-pixbuf gobject-introspection librsvg poppler_gi ]; propagatedBuildInputs = [ mutagen pygobject3 pycairo ]; postInstall = '' install -Dm 444 data/mat2.svg -t "$out/share/icons/hicolor/scalable/apps" install -Dm 444 doc/mat2.1 -t "$out/share/man/man1" install -Dm 444 nautilus/mat2.py -t "$out/share/nautilus-python/extensions" buildPythonPath "$out $pythonPath" patchPythonScript "$out/share/nautilus-python/extensions/mat2.py" '' + lib.optionalString dolphinIntegration '' install -Dm 444 dolphin/mat2.desktop -t "$out/share/kservices5/ServiceMenus" ''; checkPhase = '' ${python.interpreter} -m unittest discover -v ''; meta = with lib; { description = "A handy tool to trash your metadata"; homepage = "https://0xacab.org/jvoisin/mat2"; changelog = "https://0xacab.org/jvoisin/mat2/-/blob/${version}/CHANGELOG.md"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ dotlambda ]; }; } </ins>


''; }; <ins> jshint = nodePackages.jshint.override { buildInputs = [ pkgs.phantomjs2 ]; }; </ins> dat = nodePackages.dat.override { buildInputs = [ nodePackages.node-gyp-build ]; };


--> <para> <del> By default, PostgreSQL stores its databases in <filename>/var/lib/postgresql/$psqlSchema</filename>. You can override this using <xref linkend="opt-services.postgresql.dataDir"/>, e.g. </del> <ins> By default, PostgreSQL stores its databases in <filename>/var/lib/postgresql/$psqlSchema</filename>. You can override this using <xref linkend="opt-services.postgresql.dataDir"/>, e.g. </ins> <programlisting> <xref linkend="opt-services.postgresql.dataDir"/> = "/data/postgresql"; </programlisting>


<ins> { lib , pkgs , alsa-lib , plugins ? [ pkgs.alsa-plugins ] , lndir , symlinkJoin , runCommand }: let merged = symlinkJoin { name = "alsa-plugins-merged"; paths = plugins; }; in runCommand "${alsa-lib.pname}-${alsa-lib.version}" { meta = with lib; { description = "wrapper to ease access to ALSA plugins"; platforms = platforms.linux; maintainers = with maintainers; [ gm6k ]; }; outputs = alsa-lib.outputs; } ( ( lib.concatMapStringsSep "n" ( output: '' mkdir ${builtins.placeholder output} ${lndir}/bin/lndir ${lib.attrByPath [output] null alsa-lib}  ${builtins.placeholder output} '' ) alsa-lib.outputs ) + '' cp -r ${merged}/lib/alsa-lib $out/lib ( echo $out | wc -c echo ${alsa-lib} | wc -c ) | xargs echo | grep -q "^(.*) 1$" || ( echo cannot binary patch exit 1 ) rm $out/lib/libasound.la rm $out/lib/libasound.so.?.?.? rm $dev/lib/pkgconfig/alsa.pc rm $dev/nix-support/propagated-build-inputs cp ${alsa-lib}/lib/libasound.la $out/lib cp ${alsa-lib}/lib/libasound.so.?.?.? $out/lib cp ${alsa-lib.dev}/lib/pkgconfig/alsa.pc $dev/lib/pkgconfig cp ${alsa-lib.dev}/nix-support/propagated-build-inputs $dev/nix-support sed -i  $out/lib/libasound.la  $out/lib/libasound.so.?.?.?  $dev/lib/pkgconfig/alsa.pc  $dev/nix-support/propagated-build-inputs  -e "s@${alsa-lib}@$out@g" '' ) </ins>


{ lib , buildPythonPackage , fetchPypi <del> , mock , nose </del> <ins> , pytestCheckHook , pythonOlder </ins> , requests <del> , yanc </del> }: buildPythonPackage rec { pname = "ovh"; <del> version = "1.0.0"; </del> <ins> version = "1.1.0"; </ins> format = "setuptools"; <ins> disabled = pythonOlder "3.7"; </ins> src = fetchPypi { inherit pname version; <del> hash = "sha256-IQzwu0gwfPNPOLQLCO99KL5Hu2094Y+acQBFXVGzHhU="; </del> <ins> hash = "sha256-EI+bWjtHEZPOSkWJx3gvS8y//gugMWl3TrBHKsKO9nk="; </ins> }; propagatedBuildInputs = [ requests ]; <del> preCheck = '' export HOME=$(mktemp -d) ''; </del> nativeCheckInputs = [ <del> mock nose yanc </del> <ins> pytestCheckHook </ins> ]; <del> # requires network checkPhase = '' nosetests .  -e test_config_get_conf  -e test_config_get_custom_conf  -e test_endpoints  -e test_init_from_custom_config ''; </del> <ins> pythonImportsCheck = [ "ovh" ]; disabledTests = [ # Tests require network access "test_config_from_files" "test_config_from_given_config_file" "test_config_from_invalid_ini_file" "test_config_from_only_one_file" "test_endpoints" ]; </ins> <del> meta = { </del> <ins> meta = with lib; { </ins> description = "Thin wrapper around OVH's APIs"; homepage = "https://github.com/ovh/python-ovh"; <del> license = lib.licenses.bsd2; maintainers = [ lib.maintainers.makefu ]; </del> <ins> changelog = "https://github.com/ovh/python-ovh/blob/v${version}/CHANGELOG.md"; license = licenses.bsd2; maintainers = with maintainers; [ makefu ]; </ins> }; }


{ stdenv , lib , fetchFromGitHub <ins> , fetchpatch </ins> , substituteAll , cairo , cinnamon-desktop


srt systemd taglib <del> wayland wayland-protocols </del> zlib ] ++ (with xorg; [


}; }; } <ins> { settings.bind_interface = "eth0"; port = bindTestPort; } </ins> ]; }; };


buildInputs = lib.optionals withMkl [ mkl <ins> ] ++ lib.optionals withCUDA [ cudaPackages.cuda_cudart cudaPackages.libcublas cudaPackages.libcurand ] ++ lib.optionals withCuDNN [ cudaPackages.cudnn </ins> ] ++ lib.optionals withOneDNN [ oneDNN ] ++ lib.optionals withOpenblas [


]; buildInputs = [ <del> attr </del> <ins> bzip2 libcdio libiconv readline </ins> zlib libburn libisofs <ins> ] ++ lib.optionals stdenv.isLinux [ acl attr </ins> ]; <del> propagatedBuildInputs = [ </del> <ins> propagatedBuildInputs = lib.optionals stdenv.isLinux [ </ins> acl ];


{ lib <ins> , stdenv </ins> , buildPythonPackage , fetchFromGitHub , blas


<ins> diff --git a/src/vcpkg/vcpkgpaths.cpp b/src/vcpkg/vcpkgpaths.cpp index 3f588c21..e6f2bbed 100644 --- a/src/vcpkg/vcpkgpaths.cpp +++ b/src/vcpkg/vcpkgpaths.cpp @@ -579,7 +579,8 @@ namespace vcpkg if (!args.do_not_take_lock) { std::error_code ec; -                    const auto vcpkg_root_file = root / ".vcpkg-root"; +                    fs.create_directories(Path{"/tmp/vcpkg"}, VCPKG_LINE_INFO); +                    const auto vcpkg_root_file = Path{"/tmp/vcpkg"} / Hash::get_string_sha256(root.c_str()); if (args.wait_for_lock.value_or(false)) { file_lock_handle = fs.take_exclusive_file_lock(vcpkg_root_file, ec); </ins>


++ optionals config.security.pam.enableOTPW [ pkgs.otpw ] ++ optionals config.security.pam.oath.enable [ pkgs.oath-toolkit ] ++ optionals config.security.pam.p11.enable [ pkgs.pam_p11 ] <ins> ++ optionals config.security.pam.enableFscrypt [ pkgs.fscrypt-experimental ] </ins> ++ optionals config.security.pam.u2f.enable [ pkgs.pam_u2f ]; boot.supportedFilesystems = optionals config.security.pam.enableEcryptfs [ "ecryptfs" ];


nativeBuildInputs = [ pkg-config <del> ] ++ lib.optionals enablePython [ python3 python3.pkgs.setuptools </del> ] ++ [ sphinx ]; <del> buildInputs = [ acl attr e2fsprogs libuuid lzo python3 udev zlib zstd ]; </del> <ins> buildInputs = [ acl attr e2fsprogs libuuid lzo udev zlib zstd ]; </ins> # gcc bug with -O1 on ARM with gcc 4.8 # This should be fine on all platforms so apply universally


"-Dxml=ON" "-Dxrootd=OFF" ] <del> ++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.lib.getDev stdenv.cc.libc}/include"; </del> <ins> ++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.lib.getDev stdenv.cc.libc}/include" ++ stdenv.lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; </ins> enableParallelBuilding = true;


cpp-jwt = callPackage ../development/libraries/cpp-jwt { }; <del> ctranslate2 = callPackage ../development/libraries/ctranslate2 { }; </del> <ins> ctranslate2 = callPackage ../development/libraries/ctranslate2 { stdenv = if pkgs.config.cudaSupport then gcc11Stdenv else stdenv; withCUDA = pkgs.config.cudaSupport; withCuDNN = pkgs.config.cudaSupport; }; </ins> ubus = callPackage ../development/libraries/ubus { };


reverse=True, ) return versions def get_git_hash(self, rev: str): return ( subprocess.check_output( [ <del> "nix-universal-prefetch", "fetchFromGitLab", "--owner", self.owner, "--repo", self.repo, "--rev", rev, </del> <ins> "nix-prefetch-url", "--unpack", f"https://gitlab.com/{self.owner}/{self.repo}/-/archive/{rev}/{self.repo}-{rev}.tar.gz", </ins> ] ) .decode("utf-8")


do [ -d "$targetDir" ] || continue <del> find "$targetDir" -type f -executable -print0 | while IFS= read -r -d '' file </del> <ins> find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file </ins> do patchelf --print-interpreter "$file" >/dev/null 2>&1 || continue


<ins> { lib, stdenv, fetchurl, makeWrapper, jre_headless, gawk, }: stdenv.mkDerivation rec { pname = "nexus"; version = "3.69.0-02"; src = fetchurl { url = "https://download.sonatype.com/nexus/3/nexus-${version}-unix.tar.gz"; hash = "sha256-7sgLPuM93mFEPlTd3qJY+FGVHErvgcTGJWwSBcqBgWI="; }; preferLocalBuild = true; sourceRoot = "${pname}-${version}"; nativeBuildInputs = [ makeWrapper ]; patches = [ ./nexus-bin.patch ./nexus-vm-opts.patch ]; postPatch = '' substituteInPlace bin/nexus.vmoptions  --replace-fail ../sonatype-work /var/lib/sonatype-work  --replace-fail etc/karaf $out/etc/karaf  --replace-fail =. =$out ''; installPhase = '' runHook preInstall mkdir -p $out cp -rfv * .install4j $out rm -fv $out/bin/nexus.bat wrapProgram $out/bin/nexus  --set JAVA_HOME ${jre_headless}  --set ALTERNATIVE_NAME "nexus"  --prefix PATH "${lib.makeBinPath [ gawk ]}" runHook postInstall ''; meta = { description = "Repository manager for binary software components"; homepage = "https://www.sonatype.com/products/sonatype-nexus-oss"; sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; license = lib.licenses.epl10; platforms = lib.platforms.all; maintainers = with lib.maintainers; [ aespinosa ironpinguin luftmensch-luftmensch zaninime ]; }; } </ins>


homepage = "https://github.com/nomic-ai/gpt4all"; license = lib.licenses.mit; mainProgram = "gpt4all"; <del> maintainers = with lib.maintainers; [ polygon ]; </del> <ins> maintainers = with lib.maintainers; [ polygon titaniumtown ]; </ins> }; })


<del> { lib, stdenv, fetchFromGitHub, pkg-config, ncurses, readline, conf ? null }: </del> <ins> { lib, stdenv, fetchFromGitHub, pkg-config, ncurses, readline , conf ? null, withIcons ? false, withNerdIcons ? false }: </ins> <del> with lib; </del> <ins> # Mutually exclusive options assert withIcons -> withNerdIcons == false; assert withNerdIcons -> withIcons == false; </ins> stdenv.mkDerivation rec { pname = "nnn";


<ins> { "owner": "simple-icons", "repo": "simple-icons", "rev": "bffc992b7d1365ee44b1683f8397e9f7a44d0c2c", "hash": "sha256-aqX6X/UsXXprWYU0xYK+wM9vWULYI8enCbVFebEM0yw=" } </ins>


# from upstream https://github.com/canonical/netplan/blob/ee0d5df7b1dfbc3197865f02c724204b955e0e58/rpm/netplan.spec#L81 sed -e "s/-Werror//g" -i Makefile <ins> substituteInPlace netplan/cli/utils.py  --replace-fail "/usr/libexec/netplan/generate" "${placeholder "out"}/lib/netplan/generate" </ins> ''; makeFlags = [


mplleaflet = callPackage ../development/python-modules/mplleaflet { }; <ins> mpl-scatter-density = callPackage ../development/python-modules/mpl-scatter-density { }; </ins> mpmath = callPackage ../development/python-modules/mpmath { }; mpris-server = callPackage ../development/python-modules/mpris-server { };


<del> --- old/build/pkgs/singular/spkg-install	2015-07-26 15:34:43.000000000 +0200 +++ new/build/pkgs/singular/spkg-install	2015-09-15 20:42:51.716505855 +0200 @@ -115,6 +115,11 @@ done } </del> <ins> --- old/build/pkgs/singular/spkg-install	2017-10-15 10:35:41.826540964 -0500 +++ new/build/pkgs/singular/spkg-install	2017-10-15 10:36:40.613743443 -0500 @@ -4,6 +4,9 @@ ## Singular ########################################### </ins> <del> +nix_nuke_bin_rm() +{ +    find . -exec sed -e 's@/bin/rm@rm@g' -i '{}' ';' +} </del> <ins> +find . -type f -exec sed -e 's@/bin/rm@rm@g' -i '{}' ';' +#echo '#!/usr/bin/env bashnIgnoring missing $1' > src/build-aux/missing </ins> + <del> remove_old_version() { rm -f "$SAGE_LOCAL"/bin/Singular* @@ -306,11 +311,11 @@ # Actually run all the functions defined above -for i in choose_patches apply_patches remove_old_version config  +for i in choose_patches apply_patches nix_nuke_bin_rm remove_old_version config  build_singular build_libsingular build_factory build_libfac  create_singular_script install_docs ; do echo "### Singular spkg-install: $i ###" -    cd "$SRC" && $i +    cd "$SRC" && pwd && $i if [ $? -ne 0 ]; then echo >&2 "Error building Singular (error in $i)." exit 1 </del> <ins> if [ -z "$SAGE_LOCAL" ]; then echo >&2 "Error: SAGE_LOCAL undefined -- exiting..." echo >&2 "Maybe run 'sage -sh'?" </ins>


./patches/widevine-79.patch ]; <del> postPatch = '' </del> <ins> postPatch = optionalString (versionRange "100" "101") '' base64 --decode ${webrtcWaylandScreenshareCoredumpFix} | patch -p1 -d third_party/webrtc '' + '' </ins> # remove unused third-party for lib in ${toString gnSystemLibraries}; do if [ -d "third_party/$lib" ]; then


<ins> From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001 From: Liu Hao <lh_mouse@126.com> Date: Wed, 25 Apr 2018 21:54:19 +0800 Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. Signed-off-by: Liu Hao <lh_mouse@126.com> --- config/gthr.m4                          |  1 + gcc/config.gcc                          |  3 +++ gcc/config/i386/mingw-mcfgthread.h      |  1 + gcc/config/i386/mingw-w64.h             |  2 +- gcc/config/i386/mingw32.h               | 11 ++++++++++- gcc/configure                           |  2 +- gcc/configure.ac                        |  2 +- libatomic/configure.tgt                 |  2 +- libgcc/config.host                      |  6 ++++++ libgcc/config/i386/gthr-mcf.h           |  1 + libgcc/config/i386/t-mingw-mcfgthread   |  2 ++ libgcc/configure                        |  1 + libstdc++-v3/configure                  |  1 + libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ libstdc++-v3/libsupc++/guard.cc         | 23 +++++++++++++++++++++++ libstdc++-v3/src/c++11/thread.cc        |  9 +++++++++ 16 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 gcc/config/i386/mingw-mcfgthread.h create mode 100644 libgcc/config/i386/gthr-mcf.h create mode 100644 libgcc/config/i386/t-mingw-mcfgthread diff --git a/config/gthr.m4 b/config/gthr.m4 index 7b29f1f3327..82e21fe1709 100644 --- a/config/gthr.m4 +++ b/config/gthr.m4 @@ -21,6 +21,7 @@ case $1 in tpf)	thread_header=config/s390/gthr-tpf.h ;; vxworks)	thread_header=config/gthr-vxworks.h ;; win32)	thread_header=config/i386/gthr-win32.h ;; +    mcf)	thread_header=config/i386/gthr-mcf.h ;; esac AC_SUBST(thread_header) ]) diff --git a/gcc/config.gcc b/gcc/config.gcc index 46a9029acec..112c24e95a3 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) if test x$enable_threads = xposix ; then tm_file="${tm_file} i386/mingw-pthread.h" fi +	if test x$enable_threads = xmcf ; then +		tm_file="${tm_file} i386/mingw-mcfgthread.h" +	fi tm_file="${tm_file} i386/mingw32.h" # This makes the logic if mingw's or the w64 feature set has to be used case ${target} in diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h new file mode 100644 index 00000000000..ec381a7798f --- /dev/null +++ b/gcc/config/i386/mingw-mcfgthread.h @@ -0,0 +1 @@ +#define TARGET_USE_MCFGTHREAD 1 diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h index 484dc7a9e9f..a15bbeea500 100644 --- a/gcc/config/i386/mingw-w64.h +++ b/gcc/config/i386/mingw-w64.h @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see "%{mwindows:-lgdi32 -lcomdlg32} "  "%{fvtable-verify=preinit:-lvtv -lpsapi;  fvtable-verify=std:-lvtv -lpsapi} "  -		 "-ladvapi32 -lshell32 -luser32 -lkernel32" +		 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" #undef SPEC_32 #undef SPEC_64 diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h index 0612b87199a..76cea94f3b7 100644 --- a/gcc/config/i386/mingw32.h +++ b/gcc/config/i386/mingw32.h @@ -32,6 +32,14 @@ along with GCC; see the file COPYING3.  If not see | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE  | MASK_MS_BITFIELD_LAYOUT) +#ifndef TARGET_USE_MCFGTHREAD +#define CPP_MCFGTHREAD()  ((void)0) +#define LIB_MCFGTHREAD     "" +#else +#define CPP_MCFGTHREAD()  (builtin_define("__USING_MCFGTHREAD__")) +#define LIB_MCFGTHREAD     " -lmcfgthread " +#endif + /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS is for compatibility with native compiler.  */ #define EXTRA_OS_CPP_BUILTINS()					 @@ -50,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see builtin_define_std ("WIN64");				 builtin_define ("_WIN64");				 }							 +	CPP_MCFGTHREAD();	 }								 while (0) @@ -93,7 +102,7 @@ along with GCC; see the file COPYING3.  If not see "%{mwindows:-lgdi32 -lcomdlg32} "  "%{fvtable-verify=preinit:-lvtv -lpsapi;  fvtable-verify=std:-lvtv -lpsapi} "  -                 "-ladvapi32 -lshell32 -luser32 -lkernel32" +                 LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" /* Weak symbols do not get resolved if using a Windows dll import lib. Make the unwind registration references strong undefs.  */ diff --git a/gcc/configure b/gcc/configure index 6121e163259..52f0e00efe6 100755 --- a/gcc/configure +++ b/gcc/configure @@ -11693,7 +11693,7 @@ case ${enable_threads} in target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems |  -  single | tpf | vxworks | win32) +  single | tpf | vxworks | win32 | mcf) target_thread_file=${enable_threads} ;; *) diff --git a/gcc/configure.ac b/gcc/configure.ac index b066cc609e1..4ecdba88de7 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1612,7 +1612,7 @@ case ${enable_threads} in target_thread_file='single' ;; aix | dce | lynx | mipssde | posix | rtems |  -  single | tpf | vxworks | win32) +  single | tpf | vxworks | win32 | mcf) target_thread_file=${enable_threads} ;; *) diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt index ea8c34f8c71..23134ad7363 100644 --- a/libatomic/configure.tgt +++ b/libatomic/configure.tgt @@ -145,7 +145,7 @@ case "${target}" in *-*-mingw*) # OS support for atomic primitives. case ${target_thread_file} in -          win32) +          win32 | mcf) config_path="${config_path} mingw" ;; posix) diff --git a/libgcc/config.host b/libgcc/config.host index 11b4acaff55..9fbd38650bd 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -737,6 +737,9 @@ i[34567]86-*-mingw*) posix) tmake_file="i386/t-mingw-pthread $tmake_file" ;; +	  mcf) +	    tmake_file="i386/t-mingw-mcfgthread $tmake_file" +	    ;; esac # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h if test x$ac_cv_sjlj_exceptions = xyes; then @@ -761,6 +764,9 @@ x86_64-*-mingw*) posix) tmake_file="i386/t-mingw-pthread $tmake_file" ;; +	  mcf) +	    tmake_file="i386/t-mingw-mcfgthread $tmake_file" +	    ;; esac # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h if test x$ac_cv_sjlj_exceptions = xyes; then diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h new file mode 100644 index 00000000000..5ea2908361f --- /dev/null +++ b/libgcc/config/i386/gthr-mcf.h @@ -0,0 +1 @@ +#include <mcfgthread/gthread.h> diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread new file mode 100644 index 00000000000..4b9b10e32d6 --- /dev/null +++ b/libgcc/config/i386/t-mingw-mcfgthread @@ -0,0 +1,2 @@ +SHLIB_PTHREAD_CFLAG = +SHLIB_PTHREAD_LDFLAG = -lmcfgthread diff --git a/libgcc/configure b/libgcc/configure index b2f3f870844..eff889dc3b3 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -5451,6 +5451,7 @@ case $target_thread_file in tpf)	thread_header=config/s390/gthr-tpf.h ;; vxworks)	thread_header=config/gthr-vxworks.h ;; win32)	thread_header=config/i386/gthr-win32.h ;; +    mcf)	thread_header=config/i386/gthr-mcf.h ;; esac diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index ba094be6f15..979a5ab9ace 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -15187,6 +15187,7 @@ case $target_thread_file in tpf)	thread_header=config/s390/gthr-tpf.h ;; vxworks)	thread_header=config/gthr-vxworks.h ;; win32)	thread_header=config/i386/gthr-win32.h ;; +    mcf)	thread_header=config/i386/gthr-mcf.h ;; esac diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc index de920d714c6..665fb74bd6b 100644 --- a/libstdc++-v3/libsupc++/atexit_thread.cc +++ b/libstdc++-v3/libsupc++/atexit_thread.cc @@ -25,6 +25,22 @@ #include <cstdlib> #include <new> #include "bits/gthr.h" + +#ifdef __USING_MCFGTHREAD__ + +#include <mcfgthread/gthread.h> + +extern "C" int +__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), +				 void *obj, void *dso_handle) +  _GLIBCXX_NOTHROW +{ +  return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; +  (void)dso_handle; +} + +#else // __USING_MCFGTHREAD__ + #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha } #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ + +#endif // __USING_MCFGTHREAD__ diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc index 3a2ec3ad0d6..8b4cc96199b 100644 --- a/libstdc++-v3/libsupc++/guard.cc +++ b/libstdc++-v3/libsupc++/guard.cc @@ -28,6 +28,27 @@ #include <cxxabi.h> #include <exception> #include <new> + +#ifdef __USING_MCFGTHREAD__ + +#include <mcfgthread/gthread.h> + +namespace __cxxabiv1 { + +extern "C" int __cxa_guard_acquire(__guard *g){ +	return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; +} +extern "C" void __cxa_guard_abort(__guard *g) throw() { +	::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); +} +extern "C" void __cxa_guard_release(__guard *g) throw() { +	::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); +} + +} + +#else // __USING_MCFGTHREAD__ + #include <ext/atomicity.h> #include <ext/concurrence.h> #include <bits/atomic_lockfree_defines.h> @@ -425,3 +446,5 @@ namespace __cxxabiv1 #endif } } + +#endif diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc index 8238817c2e9..0c6a1f85f6f 100644 --- a/libstdc++-v3/src/c++11/thread.cc +++ b/libstdc++-v3/src/c++11/thread.cc @@ -55,6 +55,15 @@ static inline int get_nprocs() #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN) # include <unistd.h> # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN) +#elif defined(_WIN32) +# include <windows.h> +static inline int get_nprocs() +{ +  SYSTEM_INFO sysinfo; +  GetSystemInfo(&sysinfo); +  return (int)sysinfo.dwNumberOfProcessors; +} +# define _GLIBCXX_NPROCS get_nprocs() #else # define _GLIBCXX_NPROCS 0 #endif -- 2.17.0 </ins>


# TODO: aarch64-darwin has mcpu incompatible with gcc + optionalString ((targetPlatform ? gcc.arch) && !isClang && !(stdenv.isDarwin && stdenv.isAarch64) && <del> isGccArchSupported targetPlatform.gcc.arch && !disableMarch) '' </del> <ins> isGccArchSupported targetPlatform.gcc.arch) '' </ins> echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before ''


, gobject-introspection , itstool , libsecret <ins> , libportal-gtk3 </ins> , gsettings-desktop-schemas , python3 }:


cp tool/target/gp.jar "$out/share/java" makeWrapper "${jre8_headless}/bin/java" "$out/bin/gp"  --add-flags "-jar '$out/share/java/gp.jar'"  <del> --prefix LD_LIBRARY_PATH : "${pcsclite.out}/lib" </del> <ins> --prefix LD_LIBRARY_PATH : "${lib.getLib pcsclite}/lib" </ins> ''; meta = with lib; {


my $action = shift @ARGV; <ins> if ("@localeArchive@" ne "") { $ENV{LOCALE_ARCHIVE} = "@localeArchive@"; } </ins> if (!defined $action || ($action ne "switch" && $action ne "boot" && $action ne "test" && $action ne "dry-activate")) { print STDERR <<EOF; Usage: $0 [switch|boot|test]


buildPythonPackage rec { pname = "dvc"; <del> version = "3.53.1"; </del> <ins> version = "3.53.2"; </ins> pyproject = true; disabled = pythonOlder "3.8";


<ins> { lib , buildNpmPackage , fetchFromGitHub , fetchpatch }: buildNpmPackage rec { pname = "emmet-ls"; version = "0.4.1"; src = fetchFromGitHub { owner = "aca"; repo = "emmet-ls"; rev = version; hash = "sha256-TmsJpVLF9FZf/6uOM9LZBKC6S3bMPjA3QMiRMPaY9Dg="; }; npmDepsHash = "sha256-Boaxkad7S6H+eTW5AHwBa/zj/f1oAGGSsmW1QrzuFWc="; patches = [ # update package-lock.json as it is outdated (fetchpatch { name = "fix-lock-file-to-match-package-json.patch"; url = "https://github.com/aca/emmet-ls/commit/111111a2c2113f751fa12a716ccfbeae61c32079.patch"; hash = "sha256-/3ZbOBxScnfhL1F66cnIoD2flVeYTJ2sLxNHQ9Yrgjw="; }) ]; meta = with lib; { description = "Emmet support based on LSP"; homepage = "https://github.com/aca/emmet-ls"; changelog = "https://github.com/aca/emmet-ls/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ figsoda ]; mainProgram = "emmet-ls"; }; } </ins>


version = "0.43"; src = fetchFromGitHub { <del> owner = "evgeni"; </del> <ins> owner = "linux-thinkpad"; </ins> repo = "tp_smapi"; rev = "tp-smapi/${version}"; sha256 = "1rjb0njckczc2mj05cagvj0lkyvmyk6bw7wkiinv81lw8m90g77g"; <del> name = "tp-smapi-${version}"; </del> }; <ins> patches = [ # update DEFINE_SEMAPHORE usage for linux 6.4+ # https://github.com/linux-thinkpad/tp_smapi/pull/45 (fetchpatch { url = "https://github.com/linux-thinkpad/tp_smapi/commit/0c3398b1acf2a2cabd9cee91dc3fe3d35805fa8b.patch"; hash = "sha256-J/WvijrpHGwFOZMMxnHdNin5eh8vViTcNb4nwsCqsLs="; }) ]; </ins> nativeBuildInputs = kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ];


{ lib , stdenv <del> , buildPythonApplication , colorama </del> , fetchFromGitHub , fetchpatch <del> , flask , flask-compress , flask-socketio , gevent-websocket </del> , obfs4 <del> , psutil , packaging , pycrypto , pynacl , pyside6 , pysocks , pytestCheckHook , qrcode </del> <ins> , python3 </ins> , qt5 <del> , requests </del> , snowflake <del> , stem </del> , substituteAll , tor <del> , unidecode , waitress , werkzeug </del> }: let version = "2.6.2"; src = fetchFromGitHub { owner = "onionshare"; repo = "onionshare"; rev = "v${version}"; hash = "sha256-J8Hdriy8eWpHuMCI87a9a/zCR6xafM3A/Tkyom0Ktko="; }; meta = with lib; { description = "Securely and anonymously send and receive files"; longDescription = ''


<ins> diff --git a/configure.pri b/configure.pri index 897bea54..6f834c20 100644 --- a/configure.pri +++ b/configure.pri @@ -269,7 +269,7 @@ defineReplace(webEngineGetMacOSVersion) { } defineReplace(webEngineGetMacOSSDKVersion) { -    value = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") +    value = $$system("xcrun --show-sdk-version") return($$value) } </ins> diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf <ins> index 35eb6b89..7eed640a 100644 </ins> --- a/mkspecs/features/platform.prf +++ b/mkspecs/features/platform.prf @@ -40,8 +40,6 @@ defineTest(isPlatformSupported) {


''} ''; <del> postFixup = '' </del> <ins> postFixup = let archMap = { "x86_64-linux" = "x86_64"; "i686-linux" = "x86"; }; layerPlatform = archMap."${stdenv.hostPlatform.system}" or null; # We need to give the different layers separate names or else the loader # might try the 32-bit one first, fail and not attempt to load the 64-bit # layer under the same name. in lib.optionalString (layerPlatform != null) '' substituteInPlace $out/share/vulkan/implicit_layer.d/MangoHud.${layerPlatform}.json  --replace "VK_LAYER_MANGOHUD_overlay" "VK_LAYER_MANGOHUD_overlay_${toString stdenv.hostPlatform.parsed.cpu.bits}" '' + '' </ins> # Add OpenGL driver path to RUNPATH to support NVIDIA cards addOpenGLRunpath "$out/lib/mangohud/libMangoHud.so" <del> ${lib.optionalString gamescopeSupport '' addOpenGLRunpath "$out/bin/mangoapp" ''} ${lib.optionalString finalAttrs.doCheck '' # libcmocka.so is only used for tests rm "$out/lib/libcmocka.so" ''} </del> <ins> '' + lib.optionalString gamescopeSupport '' addOpenGLRunpath "$out/bin/mangoapp" '' + lib.optionalString finalAttrs.doCheck '' # libcmocka.so is only used for tests rm "$out/lib/libcmocka.so" </ins> ''; passthru.updateScript = nix-update-script { };


qmediathekview = libsForQt5.callPackage ../applications/video/qmediathekview { }; <del> qmplay2 = libsForQt5.callPackage ../applications/video/qmplay2 { }; </del> <ins> qmplay2-qt5 = qmplay2.override { qtVersion = "5"; }; qmplay2-qt6 = qmplay2.override { qtVersion = "6"; }; </ins> qmidiarp = callPackage ../applications/audio/qmidiarp { };


wrapProgram "$out/bin/${projectName}"  --prefix PATH : "''${defaultPathInputs// //bin:}''${defaultPathInputs:+/bin:}" # Make changes in the config file <del> ${lib.optionalString enableNvidiaContainerCli '' </del> <ins> ${lib.optionalString forceNvcCli '' </ins> substituteInPlace "$out/etc/${projectName}/${projectName}.conf"  --replace "use nvidia-container-cli = no" "use nvidia-container-cli = yes" ''}


config = mkIf cfg.enable { programs.singularity.packageOverriden = (cfg.package.override ( <del> optionalAttrs cfg.enableFakeroot { </del> <ins> optionalAttrs cfg.enableExternalLocalStateDir { externalLocalStateDir = "/var/lib"; } // optionalAttrs cfg.enableFakeroot { </ins> newuidmapPath = "/run/wrappers/bin/newuidmap"; newgidmapPath = "/run/wrappers/bin/newgidmap"; } // optionalAttrs cfg.enableSuid {


<ins> Remove about:buildconfig.  If used as-is, it would add unnecessary runtime dependencies. --- a/comm/mail/base/jar.mn +++ b/comm/mail/base/jar.mn @@ -119,9 +119,6 @@ messenger.jar: % override chrome://mozapps/content/profile/profileDowngrade.js chrome://messenger/content/profileDowngrade.js % override chrome://mozapps/content/profile/profileDowngrade.xhtml chrome://messenger/content/profileDowngrade.xhtml -*   content/messenger/buildconfig.html              (content/buildconfig.html) -% override chrome://global/content/buildconfig.html chrome://messenger/content/buildconfig.html - # L10n resources and overrides. % override chrome://mozapps/locale/profile/profileDowngrade.dtd chrome://messenger/locale/profileDowngrade.dtd % override chrome://global/locale/netError.dtd chrome://messenger/locale/netError.dtd </ins>


ledfx = callPackage ../applications/audio/ledfx { }; <del> libdislocator = callPackage ../tools/security/afl/libdislocator.nix { }; </del> <ins> libdislocator = callPackage ../tools/security/aflplusplus/libdislocator.nix { }; </ins> afpfs-ng = callPackage ../tools/filesystems/afpfs-ng { };


version = "1.3.0"; format = "setuptools"; <del> src = fetchPypi  { </del> <ins> src = fetchPypi { </ins> pname = "face_recognition"; inherit version; hash = "sha256-Xl790WhqpWavDTzBMTsTHksZdleo/9A2aebT+tknBew=";


let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule <del> version = "21.3.3"; </del> <ins> version = "21.3.4"; </ins> branch  = versions.major version; self = stdenv.mkDerivation {


Group = data.group; PrivateTmp = true; StateDirectory = "acme/.lego ${lpath}"; <del> StateDirectoryMode = rights; </del> <ins> StateDirectoryMode = if data.allowKeysForGroup then "750" else "700"; </ins> WorkingDirectory = spath; # Only try loading the credentialsFile if the dns challenge is enabled EnvironmentFile = if data.dnsProvider != null then data.credentialsFile else null;


githubId = 2526296; name = "Adrien Bustany"; }; <ins> abysssol = { name = "abysssol"; email = "abysssol@pm.me"; matrix = "@abysssol:tchncs.de"; github = "abysssol"; githubId = 76763323; }; </ins> acairncross = { email = "acairncross@gmail.com"; github = "acairncross";


--retry 1000 --retry-delay 1 --retry-all-errors  "$@" } <del> # query the old config old_cfg=$(curl ${cfg.guiAddress}/rest/config) # generate the new config by merging with the NixOS config options new_cfg=$(printf '%sn' "$old_cfg" | ${pkgs.jq}/bin/jq -c ${escapeShellArg ''. * ${builtins.toJSON cleanedConfig} * { "devices": ('${escapeShellArg (builtins.toJSON devices)}'${optionalString (cfg.settings.devices == {} || ! cfg.overrideDevices) " + .devices"}), "folders": ('${escapeShellArg (builtins.toJSON folders)}'${optionalString (cfg.settings.folders == {} || ! cfg.overrideFolders) " + .folders"}) }''}) # send the new config curl -X PUT -d "$new_cfg" ${cfg.guiAddress}/rest/config </del> <ins> '' + /* Syncthing's rest API for the folders and devices is almost identical. Hence we iterate them using lib.pipe and generate shell commands for both at the sime time. */ (lib.pipe { # The attributes below are the only ones that are different for devices / # folders. devs = { new_conf_IDs = map (v: v.id) devices; GET_IdAttrName = "deviceID"; override = cfg.overrideDevices; conf = devices; baseAddress = "${cfg.guiAddress}/rest/config/devices"; }; dirs = { new_conf_IDs = map (v: v.id) folders; GET_IdAttrName = "id"; override = cfg.overrideFolders; conf = folders; baseAddress = "${cfg.guiAddress}/rest/config/folders"; }; } [ # Now for each of these attributes, write the curl commands that are # identical to both folders and devices. (mapAttrs (conf_type: s: # We iterate the `conf` list now, and run a curl -X POST command for each, that # should update that device/folder only. lib.pipe s.conf [ # Quoting https://docs.syncthing.net/rest/config.html: # # > PUT takes an array and POST a single object. In both cases if a # given folder/device already exists, it’s replaced, otherwise a new # one is added. # # What's not documented, is that using PUT will remove objects that # don't exist in the array given. That's why we use here `POST`, and # only if s.override == true then we DELETE the relevant folders # afterwards. (map (new_cfg: '' curl -d ${lib.escapeShellArg (builtins.toJSON new_cfg)} -X POST ${s.baseAddress} '')) (lib.concatStringsSep "n") ] /* If we need to override devices/folders, we iterate all currently configured IDs, via another `curl -X GET`, and we delete all IDs that are not part of the Nix configured list of IDs */ + lib.optionalString s.override '' old_conf_${conf_type}_ids="$(curl -X GET ${s.baseAddress} | ${jq} --raw-output '.[].${s.GET_IdAttrName}')" for id in ''${old_conf_${conf_type}_ids}; do if echo ${lib.concatStringsSep " " s.new_conf_IDs} | grep -q $id; then continue else curl -X DELETE ${s.baseAddress}/$id fi done '' )) builtins.attrValues (lib.concatStringsSep "n") ]) + /* Now we update the other settings defined in cleanedConfig which are not "folders" or "devices". */ (lib.pipe cleanedConfig [ builtins.attrNames (lib.subtractLists ["folders" "devices"]) (map (subOption: '' curl -X PUT -d ${lib.escapeShellArg (builtins.toJSON cleanedConfig.${subOption})}  ${cfg.guiAddress}/rest/config/${subOption} '')) (lib.concatStringsSep "n") ]) + '' </ins> # restart Syncthing if required if curl ${cfg.guiAddress}/rest/config/restart-required | <del> ${pkgs.jq}/bin/jq -e .requiresRestart > /dev/null; then </del> <ins> ${jq} -e .requiresRestart > /dev/null; then </ins> curl -X POST ${cfg.guiAddress}/rest/system/restart fi <del> ''; </del> <ins> ''); </ins> in { ###### interface options = {


coilmq = buildPythonPackage (rec { <del> name = "coilmq-0.6.1"; </del> <ins> name = "CoilMQ-${version}"; version = "1.0.0"; </ins> src = pkgs.fetchurl { <del> url = "http://pypi.python.org/packages/source/C/CoilMQ/CoilMQ-0.6.1.tar.gz"; sha256 = "9755733bdae33a9d87630232d166a7da2382f68c2cffb3bb81503806e8d310cb"; </del> <ins> url = "http://pypi.python.org/packages/source/C/CoilMQ/${name}.tar.gz"; sha256 = "0wwa6fsqw1mxsryvgp0yrdjil8axyj0kslzi7lr45cnhgp5ab375"; </ins> }; <del> propagatedBuildInputs = with self; [ self.stompclient ]; </del> <ins> propagatedBuildInputs = with self; [ stompclient pythondaemon redis pid]; </ins> <del> preConfigure = '' sed -i '/distribute/d' setup.py ''; </del> <ins> buildInputs = with self; [ pytest six click coverage sqlalchemy ]; </ins> <del> buildInputs = with self; [ self.coverage self.sqlalchemy7 ]; # ValueError: Could not parse auth file: # /tmp/nix-build-.../CoilMQ-0.6.1/coilmq/tests/resources/auth.ini </del> <ins> # The teste data is not included in the distribution </ins> doCheck = false; meta = {


"-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation" ]; <ins> makeFlags = if stdenv.hostPlatform == stdenv.buildPlatform then null else "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; </ins> installFlags = "install install-man ASCIIDOC8=1"; preFixup = ''