about summary refs log tree commit diff
path: root/third_party/overlays
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/overlays')
-rw-r--r--third_party/overlays/patches/crate2nix-fix-resolve-missing-target-features-to-null.patch53
-rw-r--r--third_party/overlays/patches/crate2nix-skip-running-tests-when-cross-compiling.patch33
-rw-r--r--third_party/overlays/patches/crate2nix-take-lndir-from-buildPackages.patch26
-rw-r--r--third_party/overlays/tvl.nix9
4 files changed, 1 insertions, 120 deletions
diff --git a/third_party/overlays/patches/crate2nix-fix-resolve-missing-target-features-to-null.patch b/third_party/overlays/patches/crate2nix-fix-resolve-missing-target-features-to-null.patch
deleted file mode 100644
index 96e0fdd263cc..000000000000
--- a/third_party/overlays/patches/crate2nix-fix-resolve-missing-target-features-to-null.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 5ed4d5f99e8c2ee0e552ceb3842fdf0afaed7534 Mon Sep 17 00:00:00 2001
-From: tilpner <git@tilpner.com>
-Date: Tue, 24 Oct 2023 20:26:29 +0200
-Subject: [PATCH] fix: resolve missing target features to 'null'
-
----
- crate2nix/Cargo.nix                              | 16 ++++++++--------
- crate2nix/src/render.rs                          | 10 +++++-----
- sample_projects/bin/Cargo.toml                   |  3 +++
- .../bin_with_git_submodule_dep/Cargo.nix         |  6 +++---
- sample_projects/codegen/Cargo.nix                |  2 +-
- 5 files changed, 20 insertions(+), 17 deletions(-)
-
-diff --git a/crate2nix/src/render.rs b/crate2nix/src/render.rs
-index 8ca2f1c..a269fc7 100644
---- a/src/render.rs
-+++ b/src/render.rs
-@@ -224,7 +224,7 @@ fn cfg_to_nix_expr(cfg: &CfgExpr) -> String {
-                 } else if key == "target_family" {
-                     format!("(builtins.elem {} target.{})", escaped_value, target(key))
-                 } else {
--                    format!("({} == target.{})", escaped_value, target(key))
-+                    format!("({} == target.{} or null)", escaped_value, target(key))
-                 });
-             }
-             CfgExpr::Not(expr) => {
-@@ -292,19 +292,19 @@ fn test_render_cfg_to_nix_expr() {
-         &cfg_to_nix_expr(&kv("target_family", "unix"))
-     );
-     assert_eq!(
--        "(\"linux\" == target.\"os\")",
-+        "(\"linux\" == target.\"os\" or null)",
-         &cfg_to_nix_expr(&kv("target_os", "linux"))
-     );
-     assert_eq!(
--        "(!(\"linux\" == target.\"os\"))",
-+        "(!(\"linux\" == target.\"os\" or null))",
-         &cfg_to_nix_expr(&CfgExpr::Not(Box::new(kv("target_os", "linux"))))
-     );
-     assert_eq!(
--        "((target.\"unix\" or false) || (\"linux\" == target.\"os\"))",
-+        "((target.\"unix\" or false) || (\"linux\" == target.\"os\" or null))",
-         &cfg_to_nix_expr(&CfgExpr::Any(vec![name("unix"), kv("target_os", "linux")]))
-     );
-     assert_eq!(
--        "((target.\"unix\" or false) && (\"linux\" == target.\"os\"))",
-+        "((target.\"unix\" or false) && (\"linux\" == target.\"os\" or null))",
-         &cfg_to_nix_expr(&CfgExpr::All(vec![name("unix"), kv("target_os", "linux")]))
-     );
-     assert_eq!("true", &cfg_to_nix_expr(&CfgExpr::All(vec![])));
--- 
-2.42.0
-
diff --git a/third_party/overlays/patches/crate2nix-skip-running-tests-when-cross-compiling.patch b/third_party/overlays/patches/crate2nix-skip-running-tests-when-cross-compiling.patch
deleted file mode 100644
index 6c47986705d7..000000000000
--- a/third_party/overlays/patches/crate2nix-skip-running-tests-when-cross-compiling.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b37dff98b7df177313f2823a77c19828398f1505 Mon Sep 17 00:00:00 2001
-From: Florian Klink <flokli@flokli.de>
-Date: Tue, 31 Oct 2023 14:18:06 +0200
-Subject: [PATCH] skip running tests when cross-compiling
-
----
- crate2nix/templates/nix/crate2nix/default.nix | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/crate2nix/templates/nix/crate2nix/default.nix b/crate2nix/templates/nix/crate2nix/default.nix
-index 2b8050c..e4fc2e9 100644
---- a/templates/nix/crate2nix/default.nix
-+++ b/templates/nix/crate2nix/default.nix
-@@ -165,10 +165,12 @@ rec {
-         passthru = (crate.passthru or { }) // {
-           inherit test;
-         };
--      } ''
--      echo tested by ${test}
--      ${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs}
--    '';
-+      }
-+      (lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
-+        echo tested by ${test}
-+      '' + ''
-+        ${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs}
-+      '');
- 
-   /* A restricted overridable version of builtRustCratesWithFeatures. */
-   buildRustCrateWithFeatures =
--- 
-2.42.0
-
diff --git a/third_party/overlays/patches/crate2nix-take-lndir-from-buildPackages.patch b/third_party/overlays/patches/crate2nix-take-lndir-from-buildPackages.patch
deleted file mode 100644
index c6436d32442f..000000000000
--- a/third_party/overlays/patches/crate2nix-take-lndir-from-buildPackages.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ea4ec75c6cae0c0aba21c3cf4616dfceb64bff7a Mon Sep 17 00:00:00 2001
-From: Florian Klink <flokli@flokli.de>
-Date: Tue, 31 Oct 2023 14:16:22 +0200
-Subject: [PATCH 1/2] take lndir from buildPackages
-
-This needs to be executed on the building host.
----
- crate2nix/templates/nix/crate2nix/default.nix | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/crate2nix/templates/nix/crate2nix/default.nix b/crate2nix/templates/nix/crate2nix/default.nix
-index 1b859fb..2b8050c 100644
---- a/templates/nix/crate2nix/default.nix
-+++ b/templates/nix/crate2nix/default.nix
-@@ -135,7 +135,7 @@ rec {
-           # recreate a file hierarchy as when running tests with cargo
- 
-           # the source for test data
--          ${pkgs.xorg.lndir}/bin/lndir ${crate.src}
-+          ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${crate.src}
- 
-           # build outputs
-           testRoot=target/debug
--- 
-2.42.0
-
diff --git a/third_party/overlays/tvl.nix b/third_party/overlays/tvl.nix
index 009af09cea78..0a136babc24c 100644
--- a/third_party/overlays/tvl.nix
+++ b/third_party/overlays/tvl.nix
@@ -16,7 +16,7 @@ depot.nix.readTree.drvTargets {
 
   # To match telega in emacs-overlay or wherever
   tdlib = super.tdlib.overrideAttrs (_: {
-    version = "1.8.21";
+    version = "1.8.22";
     src = self.fetchFromGitHub {
       owner = "tdlib";
       repo = "td";
@@ -79,13 +79,6 @@ depot.nix.readTree.drvTargets {
       # run tests in debug mode, not release mode
       # https://github.com/nix-community/crate2nix/pull/301
       ./patches/crate2nix-tests-debug.patch
-
-      # https://github.com/nix-community/crate2nix/pull/309
-      ./patches/crate2nix-take-lndir-from-buildPackages.patch
-      ./patches/crate2nix-skip-running-tests-when-cross-compiling.patch
-
-      # https://github.com/nix-community/crate2nix/pull/307
-      ./patches/crate2nix-fix-resolve-missing-target-features-to-null.patch
     ];
   });