diff --git a/README.md b/README.md
index 082469876b75..ff66ef0d85e8 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,10 @@
-
+
+
+
+
+
+
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 31e18072cd7d..1388dc698860 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -1301,6 +1301,12 @@
githubId = 75235;
name = "Michael Walker";
};
+ bartsch = {
+ email = "consume.noise@gmail.com";
+ github = "bartsch";
+ githubId = 3390885;
+ name = "Daniel Martin";
+ };
bartuka = {
email = "wand@hey.com";
github = "wandersoncferreira";
@@ -8406,6 +8412,17 @@
githubId = 3073833;
name = "Massimo Redaelli";
};
+ mrhedgehog = {
+ name = "Mr Hedgehog";
+ email = "hedgehog@mrhedgehog.xyz";
+ matrix = "@mrhedgehog:jupiterbroadcasting.com";
+ github = "ModdedGamers";
+ githubId = 35778371;
+ keys = [{
+ longkeyid = "rsa4096/0x7D5107866B1C6752";
+ fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752";
+ }];
+ };
mrkkrp = {
email = "markkarpov92@gmail.com";
github = "mrkkrp";
diff --git a/pkgs/applications/blockchains/ledger-live-desktop/default.nix b/pkgs/applications/blockchains/ledger-live-desktop/default.nix
index 297eca245429..6dc644fbb968 100644
--- a/pkgs/applications/blockchains/ledger-live-desktop/default.nix
+++ b/pkgs/applications/blockchains/ledger-live-desktop/default.nix
@@ -2,12 +2,12 @@
let
pname = "ledger-live-desktop";
- version = "2.38.3";
+ version = "2.39.2";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage";
- hash = "sha256-svNsVdenolrfMGKJvB/8HQMq08Ov5Oe5QooI1jFAcbI=";
+ hash = "sha256-zVefF5CsyVVMNffec/xwA3KmMtZepM51C3Xh0ZCGl0c=";
};
appimageContents = appimageTools.extractType2 {
diff --git a/pkgs/applications/graphics/foxotron/default.nix b/pkgs/applications/graphics/foxotron/default.nix
index 0cd66bae2910..39fb78b317f1 100644
--- a/pkgs/applications/graphics/foxotron/default.nix
+++ b/pkgs/applications/graphics/foxotron/default.nix
@@ -25,14 +25,14 @@
stdenv.mkDerivation rec {
pname = "foxotron";
- version = "2022-03-05";
+ version = "2022-03-06";
src = fetchFromGitHub {
owner = "Gargaj";
repo = "Foxotron";
rev = version;
fetchSubmodules = true;
- sha256 = "sha256-DvNW7VGMZyefLhmmLdkf6AnGbuudZW6Yj/MFXw6HgXQ=";
+ sha256 = "sha256-w66wi+aMwQa9akfNA/1cS6UmDXPWC4OPK9BIa9Kt47A=";
};
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
diff --git a/pkgs/applications/misc/marktext/default.nix b/pkgs/applications/misc/marktext/default.nix
index 0688c189e45e..168863908372 100644
--- a/pkgs/applications/misc/marktext/default.nix
+++ b/pkgs/applications/misc/marktext/default.nix
@@ -2,12 +2,12 @@
let
pname = "marktext";
- version = "v0.16.3";
+ version = "v0.17.1";
name = "${pname}-${version}-binary";
src = fetchurl {
url = "https://github.com/marktext/marktext/releases/download/${version}/marktext-x86_64.AppImage";
- sha256 = "0s93c79vy2vsi7b6xq4hvsvjjad8bdkhl1q135vp98zmbf7bvm9b";
+ sha256 = "2e2555113e37df830ba3958efcccce7020907b12fd4162368cfd906aeda630b7";
};
appimageContents = appimageTools.extractType2 {
@@ -48,7 +48,7 @@ appimageTools.wrapType2 rec {
description = "A simple and elegant markdown editor, available for Linux, macOS and Windows";
homepage = "https://marktext.app";
license = licenses.mit;
- maintainers = with maintainers; [ nh2 ];
+ maintainers = with maintainers; [ nh2 eduarrrd ];
platforms = [ "x86_64-linux" ];
mainProgram = "marktext";
};
diff --git a/pkgs/applications/networking/browsers/brave/default.nix b/pkgs/applications/networking/browsers/brave/default.nix
index cbf055c56454..f5965767cd8f 100644
--- a/pkgs/applications/networking/browsers/brave/default.nix
+++ b/pkgs/applications/networking/browsers/brave/default.nix
@@ -91,11 +91,11 @@ in
stdenv.mkDerivation rec {
pname = "brave";
- version = "1.36.109";
+ version = "1.36.111";
src = fetchurl {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
- sha256 = "KKoMpMagq5lVoRFyWNs92LdPwNIlmAjfwqxfOArIFeo=";
+ sha256 = "bXZsUqLaP43wJV3Cehgblw1G179HgGhToSL36v5QseA=";
};
dontConfigure = true;
diff --git a/pkgs/applications/networking/cluster/tilt/default.nix b/pkgs/applications/networking/cluster/tilt/default.nix
index 47392ea83a54..5193d1de5df6 100644
--- a/pkgs/applications/networking/cluster/tilt/default.nix
+++ b/pkgs/applications/networking/cluster/tilt/default.nix
@@ -5,13 +5,13 @@ buildGoModule rec {
/* Do not use "dev" as a version. If you do, Tilt will consider itself
running in development environment and try to serve assets from the
source tree, which is not there once build completes. */
- version = "0.25.1";
+ version = "0.25.2";
src = fetchFromGitHub {
owner = "tilt-dev";
repo = pname;
rev = "v${version}";
- sha256 = "sha256-dvY5kiLJ3psoQxG12E4qOjgF9GdXpjRKU3HlbPvwWBU=";
+ sha256 = "sha256-L5pXq4vfus8gpQMO+j2+WXMPkk3sv3WeeeYrBFd+w7s=";
};
vendorSha256 = null;
diff --git a/pkgs/applications/office/qownnotes/default.nix b/pkgs/applications/office/qownnotes/default.nix
index 121c1ccf36e7..1d7a02daa9c2 100644
--- a/pkgs/applications/office/qownnotes/default.nix
+++ b/pkgs/applications/office/qownnotes/default.nix
@@ -5,13 +5,13 @@
mkDerivation rec {
pname = "qownnotes";
- version = "22.2.9";
+ version = "22.3.1";
src = fetchurl {
url = "https://download.tuxfamily.org/${pname}/src/${pname}-${version}.tar.xz";
# Fetch the checksum of current version with curl:
# curl https://download.tuxfamily.org/qownnotes/src/qownnotes-.tar.xz.sha256
- sha256 = "ced99f4b2106148c683267c2c5ccc5902dc6b98249eb7c132dde2bd6ea37bc34";
+ sha256 = "4d75684751a10f24d20d993b30748c7a09bd8bdfd4e1d4d5703746954a0f6bb2";
};
nativeBuildInputs = [ qmake qttools ];
diff --git a/pkgs/applications/video/kodi/addons/pvr-hdhomerun/default.nix b/pkgs/applications/video/kodi/addons/pvr-hdhomerun/default.nix
index 758e509b85d9..9c7041441ff1 100644
--- a/pkgs/applications/video/kodi/addons/pvr-hdhomerun/default.nix
+++ b/pkgs/applications/video/kodi/addons/pvr-hdhomerun/default.nix
@@ -2,13 +2,13 @@
buildKodiBinaryAddon rec {
pname = "pvr-hdhomerun";
namespace = "pvr.hdhomerun";
- version = "19.0.2";
+ version = "19.1.0";
src = fetchFromGitHub {
owner = "kodi-pvr";
repo = "pvr.hdhomerun";
rev = "${version}-${rel}";
- sha256 = "sha256-iFAOoQvZAdvJvN8FBg2w+oZWtr8mYdBQ3QX58HLmBho=";
+ sha256 = "sha256-sYVb4nhUz2j19yv3/cyLyUAC+1K0c05+iAMEfpPifjs=";
};
extraBuildInputs = [ jsoncpp libhdhomerun ];
diff --git a/pkgs/applications/video/streamlink-twitch-gui/bin.nix b/pkgs/applications/video/streamlink-twitch-gui/bin.nix
index 911373c58e30..395da881ea9f 100644
--- a/pkgs/applications/video/streamlink-twitch-gui/bin.nix
+++ b/pkgs/applications/video/streamlink-twitch-gui/bin.nix
@@ -27,7 +27,7 @@
}:
let
basename = "streamlink-twitch-gui";
- runtimeLibs = lib.makeLibraryPath [ libudev0-shim ];
+ runtimeLibs = lib.makeLibraryPath [ gtk3-x11 libudev0-shim ];
runtimeBins = lib.makeBinPath [ streamlink ];
arch =
if stdenv.hostPlatform.system == "x86_64-linux"
@@ -39,16 +39,16 @@ let
in
stdenv.mkDerivation rec {
pname = "${basename}-bin";
- version = "1.11.0";
+ version = "2.0.0";
src = fetchurl {
url = "https://github.com/streamlink/${basename}/releases/download/v${version}/${basename}-v${version}-${arch}.tar.gz";
- sha256 =
+ hash =
if arch == "linux64"
then
- "0y96nziavvpdvrpn58p6a175kaa8cgadp19rnbm250x9cypn1d9y"
+ "sha256-5AgQ+nvv/J493Zi+F+6QRT/DGg8JyusXsP5qVuXtiG4="
else
- "0sfmhqf55w7wavqy4idsqpkf5p7l8sapjxap6xvyzpz4z5z6xr7y";
+ "sha256-+jgTpIYb4BPM7Ixmo+YUeOX5OlQlMaRVEXf3WzS2lAI=";
};
nativeBuildInputs = with xorg; [
diff --git a/pkgs/applications/virtualization/qemu/9p-ignore-noatime.patch b/pkgs/applications/virtualization/qemu/9p-ignore-noatime.patch
index 03e47a57863c..7376e6f66adc 100644
--- a/pkgs/applications/virtualization/qemu/9p-ignore-noatime.patch
+++ b/pkgs/applications/virtualization/qemu/9p-ignore-noatime.patch
@@ -1,44 +1,49 @@
-commit cdc3e7eeafa9f683214d2c15d52ef384c3de6611
-Author: aszlig
-Date: Mon Mar 18 13:21:01 2019 +0100
+From 9e4932ae99946b1a08ab5b5345fd2bc3486e54a5 Mon Sep 17 00:00:00 2001
+From: aszlig
+Date: Mon, 18 Mar 2019 13:21:01 +0100
+Subject: [PATCH] 9pfs: Ignore O_NOATIME open flag
- 9pfs: Ignore O_NOATIME open flag
-
- Since Linux 4.19, overlayfs uses the O_NOATIME flag on its lowerdir,
- which in turn causes errors when the Nix store is mounted in the guest
- because the file owner of the store paths typically don't match the
- owner of the QEMU process.
-
- After submitting a patch to the overlayfs mailing list[1], it turns out
- that my patch was incomplete[2] and needs a bit more rework.
-
- So instead of using an incomplete kernel patch in nixpkgs, which affects
- *all* users of overlayfs, not just NixOS VM tests, I decided that for
- now it's better to patch QEMU instead.
-
- The change here really only ignores the O_NOATIME flag so that the
- behaviour is similar to what NFS does. From open(2):
-
- This flag may not be effective on all filesystems. One example is NFS,
- where the server maintains the access time.
-
- This change is therefore only temporary until the final fix lands in the
- stable kernel releases.
-
- [1]: https://www.spinics.net/lists/linux-unionfs/msg06755.html
- [2]: https://www.spinics.net/lists/linux-unionfs/msg06756.html
-
- Signed-off-by: aszlig
+Since Linux 4.19, overlayfs uses the O_NOATIME flag on its lowerdir,
+which in turn causes errors when the Nix store is mounted in the guest
+because the file owner of the store paths typically don't match the
+owner of the QEMU process.
+
+After submitting a patch to the overlayfs mailing list[1], it turns out
+that my patch was incomplete[2] and needs a bit more rework.
+
+So instead of using an incomplete kernel patch in nixpkgs, which affects
+*all* users of overlayfs, not just NixOS VM tests, I decided that for
+now it's better to patch QEMU instead.
+
+The change here really only ignores the O_NOATIME flag so that the
+behaviour is similar to what NFS does. From open(2):
+
+This flag may not be effective on all filesystems. One example is NFS,
+where the server maintains the access time.
+
+This change is therefore only temporary until the final fix lands in the
+stable kernel releases.
+
+[1]: https://www.spinics.net/lists/linux-unionfs/msg06755.html
+[2]: https://www.spinics.net/lists/linux-unionfs/msg06756.html
+
+Signed-off-by: aszlig
+---
+ hw/9pfs/9p.c | 1 -
+ 1 file changed, 1 deletion(-)
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
-index 55821343e5..0b8425fe18 100644
+index a6d6b3f835..4eb26e2294 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
-@@ -127,7 +127,6 @@ static int dotl_to_open_flags(int flags)
- { P9_DOTL_LARGEFILE, O_LARGEFILE },
- { P9_DOTL_DIRECTORY, O_DIRECTORY },
- { P9_DOTL_NOFOLLOW, O_NOFOLLOW },
+@@ -139,7 +139,6 @@ static int dotl_to_open_flags(int flags)
+ { P9_DOTL_DSYNC, O_DSYNC },
+ { P9_DOTL_FASYNC, FASYNC },
+ #ifndef CONFIG_DARWIN
- { P9_DOTL_NOATIME, O_NOATIME },
- { P9_DOTL_SYNC, O_SYNC },
- };
-
+ /*
+ * On Darwin, we could map to F_NOCACHE, which is
+ * similar, but doesn't quite have the same
+--
+2.35.1
+
diff --git a/pkgs/applications/virtualization/qemu/allow-virtfs-on-darwin.patch b/pkgs/applications/virtualization/qemu/allow-virtfs-on-darwin.patch
new file mode 100644
index 000000000000..a498d309c233
--- /dev/null
+++ b/pkgs/applications/virtualization/qemu/allow-virtfs-on-darwin.patch
@@ -0,0 +1,77 @@
+From 4ca09b7cd1d42eb6b1587fed74cd4d684e31bfbe Mon Sep 17 00:00:00 2001
+From: Keno Fischer
+Date: Sun, 27 Feb 2022 17:35:22 -0500
+Subject: [PATCH] 9p: darwin: meson: Allow VirtFS on Darwin
+
+To allow VirtFS on darwin, we need to check that pthread_fchdir_np is
+available, which has only been available since macOS 10.12.
+
+Additionally, virtfs_proxy_helper is disabled on Darwin. This patch
+series does not currently provide an implementation of the proxy-helper,
+but this functionality could be implemented later on.
+
+Signed-off-by: Keno Fischer
+[Michael Roitzsch: - Rebase for NixOS]
+Signed-off-by: Michael Roitzsch
+[Will Cohen: - Rebase to master]
+Signed-off-by: Will Cohen
+Reviewed-by: Paolo Bonzini
+[Will Cohen: - Add check for pthread_fchdir_np to virtfs
+ - Add comments to patch commit
+ - Note that virtfs_proxy_helper does not work
+ on macOS
+ - Fully adjust meson virtfs error note to specify
+ macOS
+ - Rebase to master]
+Signed-off-by: Will Cohen
+Message-Id: <20220227223522.91937-12-wwcohen@gmail.com>
+Signed-off-by: Christian Schoenebeck
+Acked-by: Christian Schoenebeck
+---
+ fsdev/meson.build | 1 +
+ meson.build | 17 +++++++++++------
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/fsdev/meson.build b/fsdev/meson.build
+index adf57cc43e..b632b66348 100644
+--- a/fsdev/meson.build
++++ b/fsdev/meson.build
+@@ -7,6 +7,7 @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
+ 'qemu-fsdev.c',
+ ), if_false: files('qemu-fsdev-dummy.c'))
+ softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
++softmmu_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)
+
+ if have_virtfs_proxy_helper
+ executable('virtfs-proxy-helper',
+diff --git a/meson.build b/meson.build
+index 2265fa409a..6d73c02903 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1383,12 +1383,17 @@ endif
+ have_host_block_device = (targetos != 'darwin' or
+ cc.has_header('IOKit/storage/IOMedia.h'))
+
+-have_virtfs = (targetos == 'linux' and
+- have_system and
+- libattr.found() and
+- libcap_ng.found())
+-
+-have_virtfs_proxy_helper = have_virtfs and have_tools
++have_virtfs = get_option('virtfs') \
++ .require(targetos == 'linux' or targetos == 'darwin',
++ error_message: 'virtio-9p (virtfs) requires Linux or macOS') \
++ .require(targetos == 'linux' or cc.has_function('pthread_fchdir_np'),
++ error_message: 'virtio-9p (virtfs) on macOS requires the presence of pthread_fchdir_np') \
++ .require(targetos == 'darwin' or (libattr.found() and libcap_ng.found()),
++ error_message: 'virtio-9p (virtfs) on Linux requires libcap-ng-devel and libattr-devel') \
++ .disable_auto_if(not have_tools and not have_system) \
++ .allowed()
++
++have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools
+
+ if get_option('virtfs').enabled()
+ if not have_virtfs
+--
+2.35.1
+
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix
index 2c2094763cc6..9dcf80d0369a 100644
--- a/pkgs/applications/virtualization/qemu/default.nix
+++ b/pkgs/applications/virtualization/qemu/default.nix
@@ -88,14 +88,64 @@ stdenv.mkDerivation rec {
patches = [
./fix-qemu-ga.patch
- ./9p-ignore-noatime.patch
# Cocoa clipboard support only works on macOS 10.14+
(fetchpatch {
url = "https://gitlab.com/qemu-project/qemu/-/commit/7e3e20d89129614f4a7b2451fe321cc6ccca3b76.diff";
sha256 = "09xz06g57wxbacic617pq9c0qb7nly42gif0raplldn5lw964xl2";
revert = true;
})
- ] ++ lib.optional nixosTestRunner ./force-uid0-on-9p.patch;
+ # 9p-darwin for 7.0 backported to 6.2.0
+ #
+ # Can generally be removed when updating derivation to 7.0. Nine of the
+ # patches can be drawn directly from QEMU upstream, but the second commit
+ # and the eleventh commit had to be modified when rebasing back to 6.2.0.
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/e0bd743bb2dd4985791d4de880446bdbb4e04fed.patch";
+ sha256 = "sha256-c6QYL3zig47fJwm6rqkqGp3E1PakVTaihvXDRebbBlQ=";
+ })
+ ./rename-9p-util.patch
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/f41db099c71151291c269bf48ad006de9cbd9ca6.patch";
+ sha256 = "sha256-70/rrhZw+02JJbJ3CoW8B1GbdM4Lwb2WkUdwstYAoIQ=";
+ })
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/6b3b279bd670c6a2fa23c9049820c814f0e2c846.patch";
+ sha256 = "sha256-7WqklSvLirEuxTXTIMQDQhWpXnwMseJ1RumT+faq/Y8=";
+ })
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/67a71e3b71a2834d028031a92e76eb9444e423c6.patch";
+ sha256 = "sha256-COFm/SwfJSoSl9YDpL6ceAE8CcE4mGhsGxw1HMuL++o=";
+ })
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/38d7fd68b0c8775b5253ab84367419621aa032e6.patch";
+ sha256 = "sha256-iwGIzq9FWW6zpbDg/IKrp5OZpK9cgQqTRWWq8WBIHRQ=";
+ })
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/57b3910bc3513ab515296692daafd1c546f3c115.patch";
+ sha256 = "sha256-ybl9+umZAcQKHYL7NkGJQC0W7bccTagA9KQiFaR2LYA=";
+ })
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/b5989326f558faedd2511f29459112cced2ca8f5.patch";
+ sha256 = "sha256-s+O9eCgj2Ev+INjL9LY9MJBdISIdZLslI3lue2DICGM=";
+ })
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/029ed1bd9defa33a80bb40cdcd003699299af8db.patch";
+ sha256 = "sha256-mGqcRWcEibDJdhTRrN7ZWrMuCfUWW8vWiFj7sb2/RYo=";
+ })
+ (fetchpatch {
+ url = "https://gitlab.com/qemu-project/qemu/-/commit/d3671fd972cd185a6923433aa4802f54d8b62112.patch";
+ sha256 = "sha256-GUh5o7mbFTm/dm6CqcGdoMlC+YrV8RlcEwu/mxrfTzo=";
+ })
+ ./allow-virtfs-on-darwin.patch
+ # QEMU upstream does not demand compatibility to pre-10.13, so 9p-darwin
+ # support on nix requires utimensat fallback. The patch adding this fallback
+ # set was removed during the process of upstreaming this functionality, and
+ # will still be needed in nix until the macOS SDK reaches 10.13+.
+ ./provide-fallback-for-utimensat.patch
+ # Still needed indefinitely
+ ./9p-ignore-noatime.patch
+ ]
+ ++ lib.optional nixosTestRunner ./force-uid0-on-9p.patch;
postPatch = ''
# Otherwise tries to ensure /var/run exists.
diff --git a/pkgs/applications/virtualization/qemu/provide-fallback-for-utimensat.patch b/pkgs/applications/virtualization/qemu/provide-fallback-for-utimensat.patch
new file mode 100644
index 000000000000..dbc4e2b9af51
--- /dev/null
+++ b/pkgs/applications/virtualization/qemu/provide-fallback-for-utimensat.patch
@@ -0,0 +1,190 @@
+From 70328c307001f4bb75d30d93c5bba3c3cd790c88 Mon Sep 17 00:00:00 2001
+From: Keno Fischer
+Date: Sat, 16 Jun 2018 20:56:54 -0400
+Subject: [PATCH] 9p: darwin: Provide fallback impl for utimensat
+
+This function is new in Mac OS 10.13. Provide a fallback implementation
+when building against older SDKs. The complication in the definition comes
+having to separately handle the used SDK version and the target OS version.
+
+- If the SDK version is too low (__MAC_10_13 not defined), utimensat is not
+ defined in the header, so we must not try to use it (doing so would error).
+- Otherwise, if the targetted OS version is at least 10.13, we know this
+ function is available, so we can unconditionally call it.
+- Lastly, we check for the availability of the __builtin_available macro to
+ potentially insert a dynamic check for this OS version. However, __builtin_available
+ is only available with sufficiently recent versions of clang and while all
+ Apple clang versions that ship with Xcode versions that support the 10.13
+ SDK support with builtin, we want to allow building with compilers other
+ than Apple clang that may not support this builtin.
+
+Signed-off-by: Keno Fischer
+Signed-off-by: Michael Roitzsch
+Signed-off-by: Will Cohen
+---
+ hw/9pfs/9p-local.c | 2 +-
+ hw/9pfs/9p-util-darwin.c | 96 ++++++++++++++++++++++++++++++++++++++++
+ hw/9pfs/9p-util-linux.c | 6 +++
+ hw/9pfs/9p-util.h | 8 ++++
+ 4 files changed, 111 insertions(+), 1 deletion(-)
+
+diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
+index d42ce6d8b8..b2c1fa42e1 100644
+--- a/hw/9pfs/9p-local.c
++++ b/hw/9pfs/9p-local.c
+@@ -1085,7 +1085,7 @@ static int local_utimensat(FsContext *s, V9fsPath *fs_path,
+ goto out;
+ }
+
+- ret = utimensat(dirfd, name, buf, AT_SYMLINK_NOFOLLOW);
++ ret = utimensat_nofollow(dirfd, name, buf);
+ close_preserve_errno(dirfd);
+ out:
+ g_free(dirpath);
+diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
+index bec0253474..2fc0475292 100644
+--- a/hw/9pfs/9p-util-darwin.c
++++ b/hw/9pfs/9p-util-darwin.c
+@@ -95,3 +95,99 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
+ }
+
+ #endif
++
++#ifndef __has_builtin
++#define __has_builtin(x) 0
++#endif
++
++static int update_times_from_stat(int fd, struct timespec times[2],
++ int update0, int update1)
++{
++ struct stat buf;
++ int ret = fstat(fd, &buf);
++ if (ret == -1) {
++ return ret;
++ }
++ if (update0) {
++ times[0] = buf.st_atimespec;
++ }
++ if (update1) {
++ times[1] = buf.st_mtimespec;
++ }
++ return 0;
++}
++
++int utimensat_nofollow(int dirfd, const char *filename,
++ const struct timespec times_in[2])
++{
++ int ret, fd;
++ int special0, special1;
++ struct timeval futimes_buf[2];
++ struct timespec times[2];
++ memcpy(times, times_in, 2 * sizeof(struct timespec));
++
++/* Check whether we have an SDK version that defines utimensat */
++#if defined(__MAC_10_13)
++# if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13
++# define UTIMENSAT_AVAILABLE 1
++# elif __has_builtin(__builtin_available)
++# define UTIMENSAT_AVAILABLE __builtin_available(macos 10.13, *)
++# else
++# define UTIMENSAT_AVAILABLE 0
++# endif
++ if (UTIMENSAT_AVAILABLE) {
++ return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW);
++ }
++#endif
++
++ /* utimensat not available. Use futimes. */
++ fd = openat_file(dirfd, filename, O_PATH_9P_UTIL | O_NOFOLLOW, 0);
++ if (fd == -1) {
++ return -1;
++ }
++
++ special0 = times[0].tv_nsec == UTIME_OMIT;
++ special1 = times[1].tv_nsec == UTIME_OMIT;
++ if (special0 || special1) {
++ /* If both are set, nothing to do */
++ if (special0 && special1) {
++ ret = 0;
++ goto done;
++ }
++
++ ret = update_times_from_stat(fd, times, special0, special1);
++ if (ret < 0) {
++ goto done;
++ }
++ }
++
++ special0 = times[0].tv_nsec == UTIME_NOW;
++ special1 = times[1].tv_nsec == UTIME_NOW;
++ if (special0 || special1) {
++ ret = futimes(fd, NULL);
++ if (ret < 0) {
++ goto done;
++ }
++
++ /* If both are set, we are done */
++ if (special0 && special1) {
++ ret = 0;
++ goto done;
++ }
++
++ ret = update_times_from_stat(fd, times, special0, special1);
++ if (ret < 0) {
++ goto done;
++ }
++ }
++
++ futimes_buf[0].tv_sec = times[0].tv_sec;
++ futimes_buf[0].tv_usec = times[0].tv_nsec / 1000;
++ futimes_buf[1].tv_sec = times[1].tv_sec;
++ futimes_buf[1].tv_usec = times[1].tv_nsec / 1000;
++ ret = futimes(fd, futimes_buf);
++
++done:
++ close_preserve_errno(fd);
++ return ret;
++}
+diff --git a/hw/9pfs/9p-util-linux.c b/hw/9pfs/9p-util-linux.c
+index db451b0784..320697f347 100644
+--- a/hw/9pfs/9p-util-linux.c
++++ b/hw/9pfs/9p-util-linux.c
+@@ -68,3 +68,9 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
+ {
+ return mknodat(dirfd, filename, mode, dev);
+ }
++
++int utimensat_nofollow(int dirfd, const char *filename,
++ const struct timespec times[2])
++{
++ return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW);
++}
+diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h
+index 1f74d37558..a4b002d1b5 100644
+--- a/hw/9pfs/9p-util.h
++++ b/hw/9pfs/9p-util.h
+@@ -36,6 +36,12 @@ static inline int qemu_lsetxattr(const char *path, const char *name,
+ #define qemu_lsetxattr lsetxattr
+ #endif
+
++/* Compatibility with old SDK Versions for Darwin */
++#if defined(CONFIG_DARWIN) && !defined(UTIME_NOW)
++#define UTIME_NOW -1
++#define UTIME_OMIT -2
++#endif
++
+ static inline void close_preserve_errno(int fd)
+ {
+ int serrno = errno;
+@@ -96,6 +102,8 @@ ssize_t flistxattrat_nofollow(int dirfd, const char *filename,
+ char *list, size_t size);
+ ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
+ const char *name);
++int utimensat_nofollow(int dirfd, const char *filename,
++ const struct timespec times[2]);
+
+ /**
+ * Darwin has d_seekoff, which appears to function similarly to d_off.
+--
+2.35.1
+
diff --git a/pkgs/applications/virtualization/qemu/rename-9p-util.patch b/pkgs/applications/virtualization/qemu/rename-9p-util.patch
new file mode 100644
index 000000000000..fe3e2d7b4b8f
--- /dev/null
+++ b/pkgs/applications/virtualization/qemu/rename-9p-util.patch
@@ -0,0 +1,54 @@
+From 011b121d7f84c8974f03a81582cf1107249245bb Mon Sep 17 00:00:00 2001
+From: Keno Fischer
+Date: Sun, 27 Feb 2022 17:35:13 -0500
+Subject: [PATCH] 9p: Rename 9p-util -> 9p-util-linux
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The current file only has the Linux versions of these functions.
+Rename the file accordingly and update the Makefile to only build
+it on Linux. A Darwin version of these will follow later in the
+series.
+
+Signed-off-by: Keno Fischer
+[Michael Roitzsch: - Rebase for NixOS]
+Signed-off-by: Michael Roitzsch
+Signed-off-by: Will Cohen
+Reviewed-by: Greg Kurz
+Reviewed-by: Philippe Mathieu-Daudé
+Message-Id: <20220227223522.91937-3-wwcohen@gmail.com>
+Signed-off-by: Christian Schoenebeck
+---
+ hw/9pfs/{9p-util.c => 9p-util-linux.c} | 0
+ hw/9pfs/meson.build | 2 +-
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+ rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (100%)
+
+diff --git a/hw/9pfs/9p-util.c b/hw/9pfs/9p-util-linux.c
+similarity index 100%
+rename from hw/9pfs/9p-util.c
+rename to hw/9pfs/9p-util-linux.c
+diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build
+index 99be5d9119..1b28e70040 100644
+--- a/hw/9pfs/meson.build
++++ b/hw/9pfs/meson.build
+@@ -4,7 +4,6 @@ fs_ss.add(files(
+ '9p-posix-acl.c',
+ '9p-proxy.c',
+ '9p-synth.c',
+- '9p-util.c',
+ '9p-xattr-user.c',
+ '9p-xattr.c',
+ '9p.c',
+@@ -14,6 +13,7 @@ fs_ss.add(files(
+ 'coth.c',
+ 'coxattr.c',
+ ))
++fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c'))
+ fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c'))
+ softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
+
+--
+2.35.1
+
diff --git a/pkgs/development/compilers/rust/make-rust-platform.nix b/pkgs/development/compilers/rust/make-rust-platform.nix
index 2071c48cc6d5..b859d01dc085 100644
--- a/pkgs/development/compilers/rust/make-rust-platform.nix
+++ b/pkgs/development/compilers/rust/make-rust-platform.nix
@@ -1,4 +1,4 @@
-{ buildPackages, callPackage, stdenv }@prev:
+{ buildPackages, callPackage, stdenv, runCommand }@prev:
{ rustc, cargo, stdenv ? prev.stdenv, ... }:
@@ -21,11 +21,11 @@ rec {
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
rustcSrc = callPackage ./rust-src.nix {
- inherit stdenv rustc;
+ inherit runCommand rustc;
};
rustLibSrc = callPackage ./rust-lib-src.nix {
- inherit stdenv rustc;
+ inherit runCommand rustc;
};
# Hooks
diff --git a/pkgs/development/compilers/rust/rust-lib-src.nix b/pkgs/development/compilers/rust/rust-lib-src.nix
index 67a7fa3641ad..aa914338639d 100644
--- a/pkgs/development/compilers/rust/rust-lib-src.nix
+++ b/pkgs/development/compilers/rust/rust-lib-src.nix
@@ -1,11 +1,6 @@
-{ stdenv, rustc }:
+{ runCommand, rustc }:
-stdenv.mkDerivation {
- name = "rust-lib-src";
- src = rustc.src;
- phases = [ "unpackPhase" "installPhase" ];
-
- installPhase = ''
- mv library $out
- '';
-}
+runCommand "rust-lib-src" { } ''
+ tar --strip-components=1 -xzf ${rustc.src}
+ mv library $out
+''
diff --git a/pkgs/development/compilers/rust/rust-src.nix b/pkgs/development/compilers/rust/rust-src.nix
index 4239e92b0363..69bdb37ac2fd 100644
--- a/pkgs/development/compilers/rust/rust-src.nix
+++ b/pkgs/development/compilers/rust/rust-src.nix
@@ -1,25 +1,21 @@
-{ lib, stdenv, rustc, minimalContent ? true }:
+{ lib, runCommand, rustc, minimalContent ? true }:
-stdenv.mkDerivation {
- name = "rust-src";
- src = rustc.src;
- phases = [ "unpackPhase" "installPhase" ];
- installPhase = ''
- mv src $out
- rm -rf $out/{${lib.concatStringsSep "," ([
- "ci"
- "doc"
- "etc"
- "grammar"
- "llvm-project"
- "llvm-emscripten"
- "rtstartup"
- "rustllvm"
- "test"
- "vendor"
- ] ++ lib.optionals minimalContent [
- "tools"
- "stdarch"
- ])}}
- '';
-}
+runCommand "rust-src" { } ''
+ tar -xzf ${rustc.src}
+ mv rustc-${rustc.version}-src $out
+ rm -rf $out/{${lib.concatStringsSep "," ([
+ "ci"
+ "doc"
+ "etc"
+ "grammar"
+ "llvm-project"
+ "llvm-emscripten"
+ "rtstartup"
+ "rustllvm"
+ "test"
+ "vendor"
+ ] ++ lib.optionals minimalContent [
+ "tools"
+ "stdarch"
+ ])}}
+''
diff --git a/pkgs/development/libraries/retro-gtk/default.nix b/pkgs/development/libraries/retro-gtk/default.nix
index 113143311edf..7711dde497f0 100644
--- a/pkgs/development/libraries/retro-gtk/default.nix
+++ b/pkgs/development/libraries/retro-gtk/default.nix
@@ -72,5 +72,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
maintainers = [ maintainers.DamienCassou ];
platforms = platforms.all;
+ broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/retro-gtk.x86_64-darwin
};
}
diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix
index 19dd0dc1cb06..986494e599d1 100644
--- a/pkgs/misc/uboot/default.nix
+++ b/pkgs/misc/uboot/default.nix
@@ -111,7 +111,7 @@ let
homepage = "http://www.denx.de/wiki/U-Boot/";
description = "Boot loader for embedded systems";
license = licenses.gpl2;
- maintainers = with maintainers; [ dezgeg samueldr lopsided98 ];
+ maintainers = with maintainers; [ bartsch dezgeg samueldr lopsided98 ];
} // extraMeta;
} // removeAttrs args [ "extraMeta" ]);
in {
diff --git a/pkgs/tools/audio/abcmidi/default.nix b/pkgs/tools/audio/abcmidi/default.nix
index 87b8940026a0..17f4d8848481 100644
--- a/pkgs/tools/audio/abcmidi/default.nix
+++ b/pkgs/tools/audio/abcmidi/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "abcMIDI";
- version = "2022.02.13";
+ version = "2022.02.21";
src = fetchzip {
url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip";
- hash = "sha256-iPeGcEDGvltXqJY50B+yDKYKRF4Oz9GQifn7Pqe8dG8=";
+ hash = "sha256-oGGtJhVugqTvXD34Q2f8L5qoYoyyT5JjuBhqh4VYAAo=";
};
meta = with lib; {
diff --git a/pkgs/tools/graphics/astc-encoder/default.nix b/pkgs/tools/graphics/astc-encoder/default.nix
index a982d329f90b..cecc52b9df2d 100644
--- a/pkgs/tools/graphics/astc-encoder/default.nix
+++ b/pkgs/tools/graphics/astc-encoder/default.nix
@@ -31,13 +31,13 @@ with rec {
gccStdenv.mkDerivation rec {
pname = "astc-encoder";
- version = "3.3";
+ version = "3.4";
src = fetchFromGitHub {
owner = "ARM-software";
repo = "astc-encoder";
rev = version;
- sha256 = "sha256-5E26QzphF5HwVTH+92S4rT3IUAp9ravT/wxsmaH9IAM=";
+ sha256 = "sha256-blOfc/H64UErjPjkdZQNp2H/Hw57RbQRFBcUo/C2b0Q=";
};
nativeBuildInputs = [ cmake ];
@@ -46,6 +46,12 @@ gccStdenv.mkDerivation rec {
"-DCMAKE_BUILD_TYPE=Release"
];
+ # Set a fixed build year to display within help output (otherwise, it would be 1980)
+ postPatch = ''
+ substituteInPlace Source/cmake_core.cmake \
+ --replace 'string(TIMESTAMP astcencoder_YEAR "%Y")' 'set(astcencoder_YEAR "2022")'
+ '';
+
# Link binaries into environment and provide 'astcenc' link
postInstall = ''
mv $out/astcenc $out/bin