lol

Merge staging-next into staging

authored by

github-actions[bot] and committed by
GitHub
8379968b ded44e80

+499 -103
+6 -1
README.md
··· 1 1 <p align="center"> 2 - <a href="https://nixos.org/nixos"><img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="NixOS logo" /></a> 2 + <a href="https://nixos.org#gh-light-mode-only"> 3 + <img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/master/logo/nixos-hires.png" width="500px" alt="NixOS logo"/> 4 + </a> 5 + <a href="https://nixos.org#gh-dark-mode-only"> 6 + <img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png" width="500px" alt="NixOS logo"/> 7 + </a> 3 8 </p> 4 9 5 10 <p align="center">
+17
maintainers/maintainer-list.nix
··· 1301 1301 githubId = 75235; 1302 1302 name = "Michael Walker"; 1303 1303 }; 1304 + bartsch = { 1305 + email = "consume.noise@gmail.com"; 1306 + github = "bartsch"; 1307 + githubId = 3390885; 1308 + name = "Daniel Martin"; 1309 + }; 1304 1310 bartuka = { 1305 1311 email = "wand@hey.com"; 1306 1312 github = "wandersoncferreira"; ··· 8405 8411 github = "mredaelli"; 8406 8412 githubId = 3073833; 8407 8413 name = "Massimo Redaelli"; 8414 + }; 8415 + mrhedgehog = { 8416 + name = "Mr Hedgehog"; 8417 + email = "hedgehog@mrhedgehog.xyz"; 8418 + matrix = "@mrhedgehog:jupiterbroadcasting.com"; 8419 + github = "ModdedGamers"; 8420 + githubId = 35778371; 8421 + keys = [{ 8422 + longkeyid = "rsa4096/0x7D5107866B1C6752"; 8423 + fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752"; 8424 + }]; 8408 8425 }; 8409 8426 mrkkrp = { 8410 8427 email = "markkarpov92@gmail.com";
+2 -2
pkgs/applications/blockchains/ledger-live-desktop/default.nix
··· 2 2 3 3 let 4 4 pname = "ledger-live-desktop"; 5 - version = "2.38.3"; 5 + version = "2.39.2"; 6 6 name = "${pname}-${version}"; 7 7 8 8 src = fetchurl { 9 9 url = "https://github.com/LedgerHQ/${pname}/releases/download/v${version}/${pname}-${version}-linux-x86_64.AppImage"; 10 - hash = "sha256-svNsVdenolrfMGKJvB/8HQMq08Ov5Oe5QooI1jFAcbI="; 10 + hash = "sha256-zVefF5CsyVVMNffec/xwA3KmMtZepM51C3Xh0ZCGl0c="; 11 11 }; 12 12 13 13 appimageContents = appimageTools.extractType2 {
+2 -2
pkgs/applications/graphics/foxotron/default.nix
··· 25 25 26 26 stdenv.mkDerivation rec { 27 27 pname = "foxotron"; 28 - version = "2022-03-05"; 28 + version = "2022-03-06"; 29 29 30 30 src = fetchFromGitHub { 31 31 owner = "Gargaj"; 32 32 repo = "Foxotron"; 33 33 rev = version; 34 34 fetchSubmodules = true; 35 - sha256 = "sha256-DvNW7VGMZyefLhmmLdkf6AnGbuudZW6Yj/MFXw6HgXQ="; 35 + sha256 = "sha256-w66wi+aMwQa9akfNA/1cS6UmDXPWC4OPK9BIa9Kt47A="; 36 36 }; 37 37 38 38 nativeBuildInputs = [ cmake pkg-config makeWrapper ];
+3 -3
pkgs/applications/misc/marktext/default.nix
··· 2 2 3 3 let 4 4 pname = "marktext"; 5 - version = "v0.16.3"; 5 + version = "v0.17.1"; 6 6 name = "${pname}-${version}-binary"; 7 7 8 8 src = fetchurl { 9 9 url = "https://github.com/marktext/marktext/releases/download/${version}/marktext-x86_64.AppImage"; 10 - sha256 = "0s93c79vy2vsi7b6xq4hvsvjjad8bdkhl1q135vp98zmbf7bvm9b"; 10 + sha256 = "2e2555113e37df830ba3958efcccce7020907b12fd4162368cfd906aeda630b7"; 11 11 }; 12 12 13 13 appimageContents = appimageTools.extractType2 { ··· 48 48 description = "A simple and elegant markdown editor, available for Linux, macOS and Windows"; 49 49 homepage = "https://marktext.app"; 50 50 license = licenses.mit; 51 - maintainers = with maintainers; [ nh2 ]; 51 + maintainers = with maintainers; [ nh2 eduarrrd ]; 52 52 platforms = [ "x86_64-linux" ]; 53 53 mainProgram = "marktext"; 54 54 };
+2 -2
pkgs/applications/networking/browsers/brave/default.nix
··· 91 91 92 92 stdenv.mkDerivation rec { 93 93 pname = "brave"; 94 - version = "1.36.109"; 94 + version = "1.36.111"; 95 95 96 96 src = fetchurl { 97 97 url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb"; 98 - sha256 = "KKoMpMagq5lVoRFyWNs92LdPwNIlmAjfwqxfOArIFeo="; 98 + sha256 = "bXZsUqLaP43wJV3Cehgblw1G179HgGhToSL36v5QseA="; 99 99 }; 100 100 101 101 dontConfigure = true;
+2 -2
pkgs/applications/networking/cluster/tilt/default.nix
··· 5 5 /* Do not use "dev" as a version. If you do, Tilt will consider itself 6 6 running in development environment and try to serve assets from the 7 7 source tree, which is not there once build completes. */ 8 - version = "0.25.1"; 8 + version = "0.25.2"; 9 9 10 10 src = fetchFromGitHub { 11 11 owner = "tilt-dev"; 12 12 repo = pname; 13 13 rev = "v${version}"; 14 - sha256 = "sha256-dvY5kiLJ3psoQxG12E4qOjgF9GdXpjRKU3HlbPvwWBU="; 14 + sha256 = "sha256-L5pXq4vfus8gpQMO+j2+WXMPkk3sv3WeeeYrBFd+w7s="; 15 15 }; 16 16 vendorSha256 = null; 17 17
+2 -2
pkgs/applications/office/qownnotes/default.nix
··· 5 5 6 6 mkDerivation rec { 7 7 pname = "qownnotes"; 8 - version = "22.2.9"; 8 + version = "22.3.1"; 9 9 10 10 src = fetchurl { 11 11 url = "https://download.tuxfamily.org/${pname}/src/${pname}-${version}.tar.xz"; 12 12 # Fetch the checksum of current version with curl: 13 13 # curl https://download.tuxfamily.org/qownnotes/src/qownnotes-<version>.tar.xz.sha256 14 - sha256 = "ced99f4b2106148c683267c2c5ccc5902dc6b98249eb7c132dde2bd6ea37bc34"; 14 + sha256 = "4d75684751a10f24d20d993b30748c7a09bd8bdfd4e1d4d5703746954a0f6bb2"; 15 15 }; 16 16 17 17 nativeBuildInputs = [ qmake qttools ];
+2 -2
pkgs/applications/video/kodi/addons/pvr-hdhomerun/default.nix
··· 2 2 buildKodiBinaryAddon rec { 3 3 pname = "pvr-hdhomerun"; 4 4 namespace = "pvr.hdhomerun"; 5 - version = "19.0.2"; 5 + version = "19.1.0"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "kodi-pvr"; 9 9 repo = "pvr.hdhomerun"; 10 10 rev = "${version}-${rel}"; 11 - sha256 = "sha256-iFAOoQvZAdvJvN8FBg2w+oZWtr8mYdBQ3QX58HLmBho="; 11 + sha256 = "sha256-sYVb4nhUz2j19yv3/cyLyUAC+1K0c05+iAMEfpPifjs="; 12 12 }; 13 13 14 14 extraBuildInputs = [ jsoncpp libhdhomerun ];
+43 -38
pkgs/applications/virtualization/qemu/9p-ignore-noatime.patch
··· 1 - commit cdc3e7eeafa9f683214d2c15d52ef384c3de6611 2 - Author: aszlig <aszlig@nix.build> 3 - Date: Mon Mar 18 13:21:01 2019 +0100 1 + From 9e4932ae99946b1a08ab5b5345fd2bc3486e54a5 Mon Sep 17 00:00:00 2001 2 + From: aszlig <aszlig@nix.build> 3 + Date: Mon, 18 Mar 2019 13:21:01 +0100 4 + Subject: [PATCH] 9pfs: Ignore O_NOATIME open flag 5 + 6 + Since Linux 4.19, overlayfs uses the O_NOATIME flag on its lowerdir, 7 + which in turn causes errors when the Nix store is mounted in the guest 8 + because the file owner of the store paths typically don't match the 9 + owner of the QEMU process. 10 + 11 + After submitting a patch to the overlayfs mailing list[1], it turns out 12 + that my patch was incomplete[2] and needs a bit more rework. 13 + 14 + So instead of using an incomplete kernel patch in nixpkgs, which affects 15 + *all* users of overlayfs, not just NixOS VM tests, I decided that for 16 + now it's better to patch QEMU instead. 17 + 18 + The change here really only ignores the O_NOATIME flag so that the 19 + behaviour is similar to what NFS does. From open(2): 20 + 21 + This flag may not be effective on all filesystems. One example is NFS, 22 + where the server maintains the access time. 4 23 5 - 9pfs: Ignore O_NOATIME open flag 6 - 7 - Since Linux 4.19, overlayfs uses the O_NOATIME flag on its lowerdir, 8 - which in turn causes errors when the Nix store is mounted in the guest 9 - because the file owner of the store paths typically don't match the 10 - owner of the QEMU process. 11 - 12 - After submitting a patch to the overlayfs mailing list[1], it turns out 13 - that my patch was incomplete[2] and needs a bit more rework. 14 - 15 - So instead of using an incomplete kernel patch in nixpkgs, which affects 16 - *all* users of overlayfs, not just NixOS VM tests, I decided that for 17 - now it's better to patch QEMU instead. 18 - 19 - The change here really only ignores the O_NOATIME flag so that the 20 - behaviour is similar to what NFS does. From open(2): 21 - 22 - This flag may not be effective on all filesystems. One example is NFS, 23 - where the server maintains the access time. 24 - 25 - This change is therefore only temporary until the final fix lands in the 26 - stable kernel releases. 27 - 28 - [1]: https://www.spinics.net/lists/linux-unionfs/msg06755.html 29 - [2]: https://www.spinics.net/lists/linux-unionfs/msg06756.html 30 - 31 - Signed-off-by: aszlig <aszlig@nix.build> 24 + This change is therefore only temporary until the final fix lands in the 25 + stable kernel releases. 26 + 27 + [1]: https://www.spinics.net/lists/linux-unionfs/msg06755.html 28 + [2]: https://www.spinics.net/lists/linux-unionfs/msg06756.html 29 + 30 + Signed-off-by: aszlig <aszlig@nix.build> 31 + --- 32 + hw/9pfs/9p.c | 1 - 33 + 1 file changed, 1 deletion(-) 32 34 33 35 diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c 34 - index 55821343e5..0b8425fe18 100644 36 + index a6d6b3f835..4eb26e2294 100644 35 37 --- a/hw/9pfs/9p.c 36 38 +++ b/hw/9pfs/9p.c 37 - @@ -127,7 +127,6 @@ static int dotl_to_open_flags(int flags) 38 - { P9_DOTL_LARGEFILE, O_LARGEFILE }, 39 - { P9_DOTL_DIRECTORY, O_DIRECTORY }, 40 - { P9_DOTL_NOFOLLOW, O_NOFOLLOW }, 39 + @@ -139,7 +139,6 @@ static int dotl_to_open_flags(int flags) 40 + { P9_DOTL_DSYNC, O_DSYNC }, 41 + { P9_DOTL_FASYNC, FASYNC }, 42 + #ifndef CONFIG_DARWIN 41 43 - { P9_DOTL_NOATIME, O_NOATIME }, 42 - { P9_DOTL_SYNC, O_SYNC }, 43 - }; 44 - 44 + /* 45 + * On Darwin, we could map to F_NOCACHE, which is 46 + * similar, but doesn't quite have the same 47 + -- 48 + 2.35.1 49 +
+77
pkgs/applications/virtualization/qemu/allow-virtfs-on-darwin.patch
··· 1 + From 4ca09b7cd1d42eb6b1587fed74cd4d684e31bfbe Mon Sep 17 00:00:00 2001 2 + From: Keno Fischer <keno@juliacomputing.com> 3 + Date: Sun, 27 Feb 2022 17:35:22 -0500 4 + Subject: [PATCH] 9p: darwin: meson: Allow VirtFS on Darwin 5 + 6 + To allow VirtFS on darwin, we need to check that pthread_fchdir_np is 7 + available, which has only been available since macOS 10.12. 8 + 9 + Additionally, virtfs_proxy_helper is disabled on Darwin. This patch 10 + series does not currently provide an implementation of the proxy-helper, 11 + but this functionality could be implemented later on. 12 + 13 + Signed-off-by: Keno Fischer <keno@juliacomputing.com> 14 + [Michael Roitzsch: - Rebase for NixOS] 15 + Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com> 16 + [Will Cohen: - Rebase to master] 17 + Signed-off-by: Will Cohen <wwcohen@gmail.com> 18 + Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> 19 + [Will Cohen: - Add check for pthread_fchdir_np to virtfs 20 + - Add comments to patch commit 21 + - Note that virtfs_proxy_helper does not work 22 + on macOS 23 + - Fully adjust meson virtfs error note to specify 24 + macOS 25 + - Rebase to master] 26 + Signed-off-by: Will Cohen <wwcohen@gmail.com> 27 + Message-Id: <20220227223522.91937-12-wwcohen@gmail.com> 28 + Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> 29 + Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com> 30 + --- 31 + fsdev/meson.build | 1 + 32 + meson.build | 17 +++++++++++------ 33 + 2 files changed, 12 insertions(+), 6 deletions(-) 34 + 35 + diff --git a/fsdev/meson.build b/fsdev/meson.build 36 + index adf57cc43e..b632b66348 100644 37 + --- a/fsdev/meson.build 38 + +++ b/fsdev/meson.build 39 + @@ -7,6 +7,7 @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files( 40 + 'qemu-fsdev.c', 41 + ), if_false: files('qemu-fsdev-dummy.c')) 42 + softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss) 43 + +softmmu_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss) 44 + 45 + if have_virtfs_proxy_helper 46 + executable('virtfs-proxy-helper', 47 + diff --git a/meson.build b/meson.build 48 + index 2265fa409a..6d73c02903 100644 49 + --- a/meson.build 50 + +++ b/meson.build 51 + @@ -1383,12 +1383,17 @@ endif 52 + have_host_block_device = (targetos != 'darwin' or 53 + cc.has_header('IOKit/storage/IOMedia.h')) 54 + 55 + -have_virtfs = (targetos == 'linux' and 56 + - have_system and 57 + - libattr.found() and 58 + - libcap_ng.found()) 59 + - 60 + -have_virtfs_proxy_helper = have_virtfs and have_tools 61 + +have_virtfs = get_option('virtfs') \ 62 + + .require(targetos == 'linux' or targetos == 'darwin', 63 + + error_message: 'virtio-9p (virtfs) requires Linux or macOS') \ 64 + + .require(targetos == 'linux' or cc.has_function('pthread_fchdir_np'), 65 + + error_message: 'virtio-9p (virtfs) on macOS requires the presence of pthread_fchdir_np') \ 66 + + .require(targetos == 'darwin' or (libattr.found() and libcap_ng.found()), 67 + + error_message: 'virtio-9p (virtfs) on Linux requires libcap-ng-devel and libattr-devel') \ 68 + + .disable_auto_if(not have_tools and not have_system) \ 69 + + .allowed() 70 + + 71 + +have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools 72 + 73 + if get_option('virtfs').enabled() 74 + if not have_virtfs 75 + -- 76 + 2.35.1 77 +
+52 -2
pkgs/applications/virtualization/qemu/default.nix
··· 88 88 89 89 patches = [ 90 90 ./fix-qemu-ga.patch 91 - ./9p-ignore-noatime.patch 92 91 # Cocoa clipboard support only works on macOS 10.14+ 93 92 (fetchpatch { 94 93 url = "https://gitlab.com/qemu-project/qemu/-/commit/7e3e20d89129614f4a7b2451fe321cc6ccca3b76.diff"; 95 94 sha256 = "09xz06g57wxbacic617pq9c0qb7nly42gif0raplldn5lw964xl2"; 96 95 revert = true; 97 96 }) 98 - ] ++ lib.optional nixosTestRunner ./force-uid0-on-9p.patch; 97 + # 9p-darwin for 7.0 backported to 6.2.0 98 + # 99 + # Can generally be removed when updating derivation to 7.0. Nine of the 100 + # patches can be drawn directly from QEMU upstream, but the second commit 101 + # and the eleventh commit had to be modified when rebasing back to 6.2.0. 102 + (fetchpatch { 103 + url = "https://gitlab.com/qemu-project/qemu/-/commit/e0bd743bb2dd4985791d4de880446bdbb4e04fed.patch"; 104 + sha256 = "sha256-c6QYL3zig47fJwm6rqkqGp3E1PakVTaihvXDRebbBlQ="; 105 + }) 106 + ./rename-9p-util.patch 107 + (fetchpatch { 108 + url = "https://gitlab.com/qemu-project/qemu/-/commit/f41db099c71151291c269bf48ad006de9cbd9ca6.patch"; 109 + sha256 = "sha256-70/rrhZw+02JJbJ3CoW8B1GbdM4Lwb2WkUdwstYAoIQ="; 110 + }) 111 + (fetchpatch { 112 + url = "https://gitlab.com/qemu-project/qemu/-/commit/6b3b279bd670c6a2fa23c9049820c814f0e2c846.patch"; 113 + sha256 = "sha256-7WqklSvLirEuxTXTIMQDQhWpXnwMseJ1RumT+faq/Y8="; 114 + }) 115 + (fetchpatch { 116 + url = "https://gitlab.com/qemu-project/qemu/-/commit/67a71e3b71a2834d028031a92e76eb9444e423c6.patch"; 117 + sha256 = "sha256-COFm/SwfJSoSl9YDpL6ceAE8CcE4mGhsGxw1HMuL++o="; 118 + }) 119 + (fetchpatch { 120 + url = "https://gitlab.com/qemu-project/qemu/-/commit/38d7fd68b0c8775b5253ab84367419621aa032e6.patch"; 121 + sha256 = "sha256-iwGIzq9FWW6zpbDg/IKrp5OZpK9cgQqTRWWq8WBIHRQ="; 122 + }) 123 + (fetchpatch { 124 + url = "https://gitlab.com/qemu-project/qemu/-/commit/57b3910bc3513ab515296692daafd1c546f3c115.patch"; 125 + sha256 = "sha256-ybl9+umZAcQKHYL7NkGJQC0W7bccTagA9KQiFaR2LYA="; 126 + }) 127 + (fetchpatch { 128 + url = "https://gitlab.com/qemu-project/qemu/-/commit/b5989326f558faedd2511f29459112cced2ca8f5.patch"; 129 + sha256 = "sha256-s+O9eCgj2Ev+INjL9LY9MJBdISIdZLslI3lue2DICGM="; 130 + }) 131 + (fetchpatch { 132 + url = "https://gitlab.com/qemu-project/qemu/-/commit/029ed1bd9defa33a80bb40cdcd003699299af8db.patch"; 133 + sha256 = "sha256-mGqcRWcEibDJdhTRrN7ZWrMuCfUWW8vWiFj7sb2/RYo="; 134 + }) 135 + (fetchpatch { 136 + url = "https://gitlab.com/qemu-project/qemu/-/commit/d3671fd972cd185a6923433aa4802f54d8b62112.patch"; 137 + sha256 = "sha256-GUh5o7mbFTm/dm6CqcGdoMlC+YrV8RlcEwu/mxrfTzo="; 138 + }) 139 + ./allow-virtfs-on-darwin.patch 140 + # QEMU upstream does not demand compatibility to pre-10.13, so 9p-darwin 141 + # support on nix requires utimensat fallback. The patch adding this fallback 142 + # set was removed during the process of upstreaming this functionality, and 143 + # will still be needed in nix until the macOS SDK reaches 10.13+. 144 + ./provide-fallback-for-utimensat.patch 145 + # Still needed indefinitely 146 + ./9p-ignore-noatime.patch 147 + ] 148 + ++ lib.optional nixosTestRunner ./force-uid0-on-9p.patch; 99 149 100 150 postPatch = '' 101 151 # Otherwise tries to ensure /var/run exists.
+190
pkgs/applications/virtualization/qemu/provide-fallback-for-utimensat.patch
··· 1 + From 70328c307001f4bb75d30d93c5bba3c3cd790c88 Mon Sep 17 00:00:00 2001 2 + From: Keno Fischer <keno@juliacomputing.com> 3 + Date: Sat, 16 Jun 2018 20:56:54 -0400 4 + Subject: [PATCH] 9p: darwin: Provide fallback impl for utimensat 5 + 6 + This function is new in Mac OS 10.13. Provide a fallback implementation 7 + when building against older SDKs. The complication in the definition comes 8 + having to separately handle the used SDK version and the target OS version. 9 + 10 + - If the SDK version is too low (__MAC_10_13 not defined), utimensat is not 11 + defined in the header, so we must not try to use it (doing so would error). 12 + - Otherwise, if the targetted OS version is at least 10.13, we know this 13 + function is available, so we can unconditionally call it. 14 + - Lastly, we check for the availability of the __builtin_available macro to 15 + potentially insert a dynamic check for this OS version. However, __builtin_available 16 + is only available with sufficiently recent versions of clang and while all 17 + Apple clang versions that ship with Xcode versions that support the 10.13 18 + SDK support with builtin, we want to allow building with compilers other 19 + than Apple clang that may not support this builtin. 20 + 21 + Signed-off-by: Keno Fischer <keno@juliacomputing.com> 22 + Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com> 23 + Signed-off-by: Will Cohen <wwcohen@gmail.com> 24 + --- 25 + hw/9pfs/9p-local.c | 2 +- 26 + hw/9pfs/9p-util-darwin.c | 96 ++++++++++++++++++++++++++++++++++++++++ 27 + hw/9pfs/9p-util-linux.c | 6 +++ 28 + hw/9pfs/9p-util.h | 8 ++++ 29 + 4 files changed, 111 insertions(+), 1 deletion(-) 30 + 31 + diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c 32 + index d42ce6d8b8..b2c1fa42e1 100644 33 + --- a/hw/9pfs/9p-local.c 34 + +++ b/hw/9pfs/9p-local.c 35 + @@ -1085,7 +1085,7 @@ static int local_utimensat(FsContext *s, V9fsPath *fs_path, 36 + goto out; 37 + } 38 + 39 + - ret = utimensat(dirfd, name, buf, AT_SYMLINK_NOFOLLOW); 40 + + ret = utimensat_nofollow(dirfd, name, buf); 41 + close_preserve_errno(dirfd); 42 + out: 43 + g_free(dirpath); 44 + diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c 45 + index bec0253474..2fc0475292 100644 46 + --- a/hw/9pfs/9p-util-darwin.c 47 + +++ b/hw/9pfs/9p-util-darwin.c 48 + @@ -95,3 +95,99 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev) 49 + } 50 + 51 + #endif 52 + + 53 + +#ifndef __has_builtin 54 + +#define __has_builtin(x) 0 55 + +#endif 56 + + 57 + +static int update_times_from_stat(int fd, struct timespec times[2], 58 + + int update0, int update1) 59 + +{ 60 + + struct stat buf; 61 + + int ret = fstat(fd, &buf); 62 + + if (ret == -1) { 63 + + return ret; 64 + + } 65 + + if (update0) { 66 + + times[0] = buf.st_atimespec; 67 + + } 68 + + if (update1) { 69 + + times[1] = buf.st_mtimespec; 70 + + } 71 + + return 0; 72 + +} 73 + + 74 + +int utimensat_nofollow(int dirfd, const char *filename, 75 + + const struct timespec times_in[2]) 76 + +{ 77 + + int ret, fd; 78 + + int special0, special1; 79 + + struct timeval futimes_buf[2]; 80 + + struct timespec times[2]; 81 + + memcpy(times, times_in, 2 * sizeof(struct timespec)); 82 + + 83 + +/* Check whether we have an SDK version that defines utimensat */ 84 + +#if defined(__MAC_10_13) 85 + +# if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 86 + +# define UTIMENSAT_AVAILABLE 1 87 + +# elif __has_builtin(__builtin_available) 88 + +# define UTIMENSAT_AVAILABLE __builtin_available(macos 10.13, *) 89 + +# else 90 + +# define UTIMENSAT_AVAILABLE 0 91 + +# endif 92 + + if (UTIMENSAT_AVAILABLE) { 93 + + return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW); 94 + + } 95 + +#endif 96 + + 97 + + /* utimensat not available. Use futimes. */ 98 + + fd = openat_file(dirfd, filename, O_PATH_9P_UTIL | O_NOFOLLOW, 0); 99 + + if (fd == -1) { 100 + + return -1; 101 + + } 102 + + 103 + + special0 = times[0].tv_nsec == UTIME_OMIT; 104 + + special1 = times[1].tv_nsec == UTIME_OMIT; 105 + + if (special0 || special1) { 106 + + /* If both are set, nothing to do */ 107 + + if (special0 && special1) { 108 + + ret = 0; 109 + + goto done; 110 + + } 111 + + 112 + + ret = update_times_from_stat(fd, times, special0, special1); 113 + + if (ret < 0) { 114 + + goto done; 115 + + } 116 + + } 117 + + 118 + + special0 = times[0].tv_nsec == UTIME_NOW; 119 + + special1 = times[1].tv_nsec == UTIME_NOW; 120 + + if (special0 || special1) { 121 + + ret = futimes(fd, NULL); 122 + + if (ret < 0) { 123 + + goto done; 124 + + } 125 + + 126 + + /* If both are set, we are done */ 127 + + if (special0 && special1) { 128 + + ret = 0; 129 + + goto done; 130 + + } 131 + + 132 + + ret = update_times_from_stat(fd, times, special0, special1); 133 + + if (ret < 0) { 134 + + goto done; 135 + + } 136 + + } 137 + + 138 + + futimes_buf[0].tv_sec = times[0].tv_sec; 139 + + futimes_buf[0].tv_usec = times[0].tv_nsec / 1000; 140 + + futimes_buf[1].tv_sec = times[1].tv_sec; 141 + + futimes_buf[1].tv_usec = times[1].tv_nsec / 1000; 142 + + ret = futimes(fd, futimes_buf); 143 + + 144 + +done: 145 + + close_preserve_errno(fd); 146 + + return ret; 147 + +} 148 + diff --git a/hw/9pfs/9p-util-linux.c b/hw/9pfs/9p-util-linux.c 149 + index db451b0784..320697f347 100644 150 + --- a/hw/9pfs/9p-util-linux.c 151 + +++ b/hw/9pfs/9p-util-linux.c 152 + @@ -68,3 +68,9 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev) 153 + { 154 + return mknodat(dirfd, filename, mode, dev); 155 + } 156 + + 157 + +int utimensat_nofollow(int dirfd, const char *filename, 158 + + const struct timespec times[2]) 159 + +{ 160 + + return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW); 161 + +} 162 + diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h 163 + index 1f74d37558..a4b002d1b5 100644 164 + --- a/hw/9pfs/9p-util.h 165 + +++ b/hw/9pfs/9p-util.h 166 + @@ -36,6 +36,12 @@ static inline int qemu_lsetxattr(const char *path, const char *name, 167 + #define qemu_lsetxattr lsetxattr 168 + #endif 169 + 170 + +/* Compatibility with old SDK Versions for Darwin */ 171 + +#if defined(CONFIG_DARWIN) && !defined(UTIME_NOW) 172 + +#define UTIME_NOW -1 173 + +#define UTIME_OMIT -2 174 + +#endif 175 + + 176 + static inline void close_preserve_errno(int fd) 177 + { 178 + int serrno = errno; 179 + @@ -96,6 +102,8 @@ ssize_t flistxattrat_nofollow(int dirfd, const char *filename, 180 + char *list, size_t size); 181 + ssize_t fremovexattrat_nofollow(int dirfd, const char *filename, 182 + const char *name); 183 + +int utimensat_nofollow(int dirfd, const char *filename, 184 + + const struct timespec times[2]); 185 + 186 + /** 187 + * Darwin has d_seekoff, which appears to function similarly to d_off. 188 + -- 189 + 2.35.1 190 +
+54
pkgs/applications/virtualization/qemu/rename-9p-util.patch
··· 1 + From 011b121d7f84c8974f03a81582cf1107249245bb Mon Sep 17 00:00:00 2001 2 + From: Keno Fischer <keno@juliacomputing.com> 3 + Date: Sun, 27 Feb 2022 17:35:13 -0500 4 + Subject: [PATCH] 9p: Rename 9p-util -> 9p-util-linux 5 + MIME-Version: 1.0 6 + Content-Type: text/plain; charset=UTF-8 7 + Content-Transfer-Encoding: 8bit 8 + 9 + The current file only has the Linux versions of these functions. 10 + Rename the file accordingly and update the Makefile to only build 11 + it on Linux. A Darwin version of these will follow later in the 12 + series. 13 + 14 + Signed-off-by: Keno Fischer <keno@juliacomputing.com> 15 + [Michael Roitzsch: - Rebase for NixOS] 16 + Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com> 17 + Signed-off-by: Will Cohen <wwcohen@gmail.com> 18 + Reviewed-by: Greg Kurz <groug@kaod.org> 19 + Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> 20 + Message-Id: <20220227223522.91937-3-wwcohen@gmail.com> 21 + Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> 22 + --- 23 + hw/9pfs/{9p-util.c => 9p-util-linux.c} | 0 24 + hw/9pfs/meson.build | 2 +- 25 + 2 files changed, 1 insertion(+), 1 deletion(-) 26 + rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (100%) 27 + 28 + diff --git a/hw/9pfs/9p-util.c b/hw/9pfs/9p-util-linux.c 29 + similarity index 100% 30 + rename from hw/9pfs/9p-util.c 31 + rename to hw/9pfs/9p-util-linux.c 32 + diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build 33 + index 99be5d9119..1b28e70040 100644 34 + --- a/hw/9pfs/meson.build 35 + +++ b/hw/9pfs/meson.build 36 + @@ -4,7 +4,6 @@ fs_ss.add(files( 37 + '9p-posix-acl.c', 38 + '9p-proxy.c', 39 + '9p-synth.c', 40 + - '9p-util.c', 41 + '9p-xattr-user.c', 42 + '9p-xattr.c', 43 + '9p.c', 44 + @@ -14,6 +13,7 @@ fs_ss.add(files( 45 + 'coth.c', 46 + 'coxattr.c', 47 + )) 48 + +fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c')) 49 + fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c')) 50 + softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss) 51 + 52 + -- 53 + 2.35.1 54 +
+3 -3
pkgs/development/compilers/rust/make-rust-platform.nix
··· 1 - { buildPackages, callPackage, stdenv }@prev: 1 + { buildPackages, callPackage, stdenv, runCommand }@prev: 2 2 3 3 { rustc, cargo, stdenv ? prev.stdenv, ... }: 4 4 ··· 21 21 importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {}; 22 22 23 23 rustcSrc = callPackage ./rust-src.nix { 24 - inherit stdenv rustc; 24 + inherit runCommand rustc; 25 25 }; 26 26 27 27 rustLibSrc = callPackage ./rust-lib-src.nix { 28 - inherit stdenv rustc; 28 + inherit runCommand rustc; 29 29 }; 30 30 31 31 # Hooks
+5 -10
pkgs/development/compilers/rust/rust-lib-src.nix
··· 1 - { stdenv, rustc }: 1 + { runCommand, rustc }: 2 2 3 - stdenv.mkDerivation { 4 - name = "rust-lib-src"; 5 - src = rustc.src; 6 - phases = [ "unpackPhase" "installPhase" ]; 7 - 8 - installPhase = '' 9 - mv library $out 10 - ''; 11 - } 3 + runCommand "rust-lib-src" { } '' 4 + tar --strip-components=1 -xzf ${rustc.src} 5 + mv library $out 6 + ''
+20 -24
pkgs/development/compilers/rust/rust-src.nix
··· 1 - { lib, stdenv, rustc, minimalContent ? true }: 1 + { lib, runCommand, rustc, minimalContent ? true }: 2 2 3 - stdenv.mkDerivation { 4 - name = "rust-src"; 5 - src = rustc.src; 6 - phases = [ "unpackPhase" "installPhase" ]; 7 - installPhase = '' 8 - mv src $out 9 - rm -rf $out/{${lib.concatStringsSep "," ([ 10 - "ci" 11 - "doc" 12 - "etc" 13 - "grammar" 14 - "llvm-project" 15 - "llvm-emscripten" 16 - "rtstartup" 17 - "rustllvm" 18 - "test" 19 - "vendor" 20 - ] ++ lib.optionals minimalContent [ 21 - "tools" 22 - "stdarch" 23 - ])}} 24 - ''; 25 - } 3 + runCommand "rust-src" { } '' 4 + tar -xzf ${rustc.src} 5 + mv rustc-${rustc.version}-src $out 6 + rm -rf $out/{${lib.concatStringsSep "," ([ 7 + "ci" 8 + "doc" 9 + "etc" 10 + "grammar" 11 + "llvm-project" 12 + "llvm-emscripten" 13 + "rtstartup" 14 + "rustllvm" 15 + "test" 16 + "vendor" 17 + ] ++ lib.optionals minimalContent [ 18 + "tools" 19 + "stdarch" 20 + ])}} 21 + ''
+1
pkgs/development/libraries/retro-gtk/default.nix
··· 72 72 license = licenses.gpl3Plus; 73 73 maintainers = [ maintainers.DamienCassou ]; 74 74 platforms = platforms.all; 75 + broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/retro-gtk.x86_64-darwin 75 76 }; 76 77 }
+1 -1
pkgs/misc/uboot/default.nix
··· 111 111 homepage = "http://www.denx.de/wiki/U-Boot/"; 112 112 description = "Boot loader for embedded systems"; 113 113 license = licenses.gpl2; 114 - maintainers = with maintainers; [ dezgeg samueldr lopsided98 ]; 114 + maintainers = with maintainers; [ bartsch dezgeg samueldr lopsided98 ]; 115 115 } // extraMeta; 116 116 } // removeAttrs args [ "extraMeta" ]); 117 117 in {
+2 -2
pkgs/tools/audio/abcmidi/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "abcMIDI"; 5 - version = "2022.02.13"; 5 + version = "2022.02.21"; 6 6 7 7 src = fetchzip { 8 8 url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip"; 9 - hash = "sha256-iPeGcEDGvltXqJY50B+yDKYKRF4Oz9GQifn7Pqe8dG8="; 9 + hash = "sha256-oGGtJhVugqTvXD34Q2f8L5qoYoyyT5JjuBhqh4VYAAo="; 10 10 }; 11 11 12 12 meta = with lib; {
+8 -2
pkgs/tools/graphics/astc-encoder/default.nix
··· 31 31 32 32 gccStdenv.mkDerivation rec { 33 33 pname = "astc-encoder"; 34 - version = "3.3"; 34 + version = "3.4"; 35 35 36 36 src = fetchFromGitHub { 37 37 owner = "ARM-software"; 38 38 repo = "astc-encoder"; 39 39 rev = version; 40 - sha256 = "sha256-5E26QzphF5HwVTH+92S4rT3IUAp9ravT/wxsmaH9IAM="; 40 + sha256 = "sha256-blOfc/H64UErjPjkdZQNp2H/Hw57RbQRFBcUo/C2b0Q="; 41 41 }; 42 42 43 43 nativeBuildInputs = [ cmake ]; ··· 45 45 cmakeFlags = isaFlags ++ archFlags ++ [ 46 46 "-DCMAKE_BUILD_TYPE=Release" 47 47 ]; 48 + 49 + # Set a fixed build year to display within help output (otherwise, it would be 1980) 50 + postPatch = '' 51 + substituteInPlace Source/cmake_core.cmake \ 52 + --replace 'string(TIMESTAMP astcencoder_YEAR "%Y")' 'set(astcencoder_YEAR "2022")' 53 + ''; 48 54 49 55 # Link binaries into environment and provide 'astcenc' link 50 56 postInstall = ''