diff options
author | Vincent Ambo <tazjin@tvl.su> | 2024-07-01T09·47+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2024-07-01T17·42+0000 |
commit | 4b2f3c5454a249c6fbd7697a5297c6d4db92ef3e (patch) | |
tree | 1967abbea143ca7ed1a106edacecf4ad08cde9b1 /third_party/overlays/patches/crate2nix-run-tests-in-build-source.patch | |
parent | 17bdf9a5748be02d5cc36a7be4689788c49a33fe (diff) |
chore(3p/sources): bump to OpenSSH vulnerability hotfix r/8337
See https://github.com/NixOS/nixpkgs/pull/323753 for details. Changes: * git: temporarily comment out dottime patch (it doesn't apply, but it's not critical) * third-party/cgit: use an older git version where dottime patch still applies * 3p/crate2nix: remove crate2nix patches included in latest release * tvix: remove unneeded defaultCrateOverrides (upstreamed to nixpkgs) * tvix: regenerate Cargo.nix * tvix/nix-compat: remove unnused AtermWriteable::aterm_bytes pub(crate) function * tvix/nix-compat: remove redundant trait bounds * tvix/glue: use clone_into() to set drv.{builder,system} * tools/crate2nix: apply workaround for https://github.com/numtide/treefmt/issues/327 * toold/depotfmt: expose treefmt config as passthru * tools/crate2nix: undo some more hacks in the crate2nix-check drv Change-Id: Ifbcedeb3e8f81b2f6ec1dbf10189bfa6dfd9c75c Co-Authored-By: Florian Klink <flokli@flokli.de> Reviewed-on: https://cl.tvl.fyi/c/depot/+/11907 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'third_party/overlays/patches/crate2nix-run-tests-in-build-source.patch')
-rw-r--r-- | third_party/overlays/patches/crate2nix-run-tests-in-build-source.patch | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/third_party/overlays/patches/crate2nix-run-tests-in-build-source.patch b/third_party/overlays/patches/crate2nix-run-tests-in-build-source.patch deleted file mode 100644 index 52793270e6e8..000000000000 --- a/third_party/overlays/patches/crate2nix-run-tests-in-build-source.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 7cf084f73f7d15fe0538a625182fa7179c083b3d Mon Sep 17 00:00:00 2001 -From: Raito Bezarius <masterancpp@gmail.com> -Date: Tue, 16 Jan 2024 02:10:48 +0100 -Subject: [PATCH] fix(template): run tests in `/build/source` instead `/build` - -Previously, the source tree was located inline in `/build` during tests, this was a mistake -because the crates more than often are built in `/build/source` as per the `sourceRoot` system. - -This can cause issues with test binaries hardcoding `/build/source/...` as their choice for doing things, -causing them to be confused in the test phase which is relocated without rewriting the paths inside test binaries. - -We fix that by relocating ourselves in the right hierarchy. - -This is a "simple" fix in the sense that more edge cases could exist but they are hard to reason about -because they would be crates using custom `sourceRoot`, i.e. having `crate.sourceRoot` set and then it becomes -a bit hard to reproduce the hierarchy, you need to analyze whether the path is absolute or relative, - -If it's relative, you can just reuse it and reproduce that specific hierarchy. -If it's absolute, you need to cut the "absolute" meaningless part, e.g. `$NIX_BUILD_TOP/` and proceed like -it's a relative path IMHO. ---- - crate2nix/Cargo.nix | 10 ++++++++++ - crate2nix/templates/nix/crate2nix/default.nix | 10 ++++++++++ - -diff --git a/Cargo.nix b/Cargo.nix -index 6ef7a49..172ff34 100644 ---- a/Cargo.nix -+++ b/Cargo.nix -@@ -2889,6 +2889,16 @@ rec { - # recreate a file hierarchy as when running tests with cargo - - # the source for test data -+ # It's necessary to locate the source in $NIX_BUILD_TOP/source/ -+ # instead of $NIX_BUILD_TOP/ -+ # because we compiled those test binaries in the former and not the latter. -+ # So all paths will expect source tree to be there and not in the build top directly. -+ # For example: $NIX_BUILD_TOP := /build in general, if you ask yourself. -+ # TODO(raitobezarius): I believe there could be more edge cases if `crate.sourceRoot` -+ # do exist but it's very hard to reason about them, so let's wait until the first bug report. -+ mkdir -p source/ -+ cd source/ -+ - ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${crate.src} - - # build outputs -diff --git a/crate2nix/templates/nix/crate2nix/default.nix b/crate2nix/templates/nix/crate2nix/default.nix -index e4fc2e9..dfb14c4 100644 ---- a/templates/nix/crate2nix/default.nix -+++ b/templates/nix/crate2nix/default.nix -@@ -135,6 +135,16 @@ rec { - # recreate a file hierarchy as when running tests with cargo - - # the source for test data -+ # It's necessary to locate the source in $NIX_BUILD_TOP/source/ -+ # instead of $NIX_BUILD_TOP/ -+ # because we compiled those test binaries in the former and not the latter. -+ # So all paths will expect source tree to be there and not in the build top directly. -+ # For example: $NIX_BUILD_TOP := /build in general, if you ask yourself. -+ # TODO(raitobezarius): I believe there could be more edge cases if `crate.sourceRoot` -+ # do exist but it's very hard to reason about them, so let's wait until the first bug report. -+ mkdir -p source/ -+ cd source/ -+ - ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${crate.src} - - # build outputs --- -2.43.0 - |