about summary refs log tree commit diff
path: root/third_party/overlays/tvl.nix
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/overlays/tvl.nix')
-rw-r--r--third_party/overlays/tvl.nix153
1 files changed, 77 insertions, 76 deletions
diff --git a/third_party/overlays/tvl.nix b/third_party/overlays/tvl.nix
index 9bb88dc2be..b54e899b88 100644
--- a/third_party/overlays/tvl.nix
+++ b/third_party/overlays/tvl.nix
@@ -1,45 +1,46 @@
 # This overlay is used to make TVL-specific modifications in the
 # nixpkgs tree, where required.
-{ depot, ... }:
+{ lib, depot, localSystem, ... }:
 
 self: super:
-let
-  # Rollback Nix to a stable version (2.3) with backports for
-  # build-user problems applied.
-  nixSrc =
-    let
-      # branch 2.3-backport-await-users
-      rev = "4510dbc8a6802902cbab6444134659548fffb9b0";
-    in
-    self.fetchFromGitHub
-      {
-        owner = "tvlfyi";
-        repo = "nix";
-        inherit rev;
-        hash = "sha256:0vg2xzwc8q1sw20b26qbyd4flnws8668yhi1cg2h6z3jb3wamhr5";
-      } // { revCount = 0; shortRev = builtins.substring 0 7 rev; };
-in
-{
-  nix = (import "${nixSrc}/release.nix" {
-    nix = nixSrc;
-    nixpkgs = super.path;
-    systems = [ builtins.currentSystem ];
-  }).build."${builtins.currentSystem}";
-
-  clang-tools_11 = self.clang-tools.override {
-    llvmPackages = self.llvmPackages_11;
+depot.nix.readTree.drvTargets {
+  nix_2_3 = (super.nix_2_3.override {
+    # flaky tests, long painful build, see https://github.com/NixOS/nixpkgs/pull/266443
+    withAWS = false;
+  });
+  nix = self.nix_2_3 // {
+    # avoid duplicate pipeline step
+    meta = self.nix_2_3.meta or { } // {
+      ci = self.nix_2_3.meta.ci or { } // {
+        skip = true;
+      };
+    };
   };
+  nix_latest = super.nix.override ({
+    # flaky tests, long painful build, see https://github.com/NixOS/nixpkgs/pull/266443
+    withAWS = false;
+  });
+
+  # To match telega in emacs-overlay or wherever
+  tdlib = super.tdlib.overrideAttrs (_: {
+    version = "1.8.24";
+    src = self.fetchFromGitHub {
+      owner = "tdlib";
+      repo = "td";
+      rev = "d79bd4b69403868897496da39b773ab25c69f6af";
+      sha256 = "0bc5akzw12qwj45rzqkrhw65qlrn9q8pzmvc5aiqv4bvhkb1ghl0";
+    };
+  });
 
-  # stdenv which uses clang, lld and libc++; full is a slight exaggeration,
-  # we for example don't use LLVM's libunwind
-  fullLlvm11Stdenv = self.overrideCC self.stdenv
-    (self.llvmPackages_11.libcxxStdenv.cc.override {
-      inherit (self.llvmPackages_11) bintools;
-    });
+  home-manager = super.home-manager.overrideAttrs (_: {
+    src = depot.third_party.sources.home-manager;
+    version = "git-"
+      + builtins.substring 0 7 depot.third_party.sources.home-manager.rev;
+  });
 
   # Add our Emacs packages to the fixpoint
   emacsPackagesFor = emacs: (
-    (super.emacsPackagesFor emacs).overrideScope' (eself: esuper: {
+    (super.emacsPackagesFor emacs).overrideScope (eself: esuper: {
       tvlPackages = depot.tools.emacs-pkgs // depot.third_party.emacs;
 
       # Use the notmuch from nixpkgs instead of from the Emacs
@@ -47,9 +48,7 @@ in
       notmuch = super.notmuch.emacs;
 
       # Build EXWM with the depot sources instead.
-      exwm = esuper.exwm.overrideAttrs (_: {
-        src = depot.path.origSrc + "/third_party/exwm";
-      });
+      depotExwm = eself.callPackage depot.third_party.exwm.override { };
 
       # Workaround for magit checking the git version at load time
       magit = esuper.magit.overrideAttrs (_: {
@@ -57,21 +56,21 @@ in
           self.git
         ];
       });
-    })
-  );
 
-  # Upgrade to match telega in emacs-overlay
-  # TODO(tazjin): ugrade tdlib (+ telega?!) in nixpkgs
-  tdlib = assert super.tdlib.version == "1.8.3";
-    super.tdlib.overrideAttrs (old: {
-      version = "1.8.4";
-      src = self.fetchFromGitHub {
-        owner = "tdlib";
-        repo = "td";
-        rev = "7eabd8ca60de025e45e99d4e5edd39f4ebd9467e";
-        sha256 = "1chs0ibghjj275v9arsn3k68ppblpm7ysqk0za9kya5vdnldlld5";
+      # Pin xelb to a newer one until the new maintainers do a release.
+      xelb = eself.trivialBuild {
+        pname = "xelb";
+        version = "0.19-dev"; # invented version, last actual release was 0.18
+
+        src = self.fetchFromGitHub {
+          owner = "emacs-exwm";
+          repo = "xelb";
+          rev = "86089eba2de6c818bfa2fac075cb7ad876262798";
+          sha256 = "1mmlrd2zpcwiv8gh10y7lrpflnbmsycdascrxjr3bfcwa8yx7901";
+        };
       };
-    });
+    })
+  );
 
   # dottime support for notmuch
   notmuch = super.notmuch.overrideAttrs (old: {
@@ -82,14 +81,7 @@ in
 
   # nix-serve does not work with nix 2.4
   # https://github.com/edolstra/nix-serve/issues/28
-  nix-serve = super.nix-serve.override { nix = super.nix_2_3; };
-
-  # Workaround for srcOnly with separateDebugInfo until
-  # https://github.com/NixOS/nixpkgs/pull/179170 is merged.
-  srcOnly = args: (super.srcOnly args).overrideAttrs (_: {
-    outputs = [ "out" ];
-    separateDebugInfo = false;
-  });
+  nix-serve = super.nix-serve.override { nix = self.nix_2_3; };
 
   # Avoid builds of mkShell derivations in CI.
   mkShell = super.lib.makeOverridable (args: (super.mkShell args).overrideAttrs (_: {
@@ -98,25 +90,34 @@ in
     };
   }));
 
-  # upgrade home-manager until the service-generation fix has landed upstream
-  # https://github.com/nix-community/home-manager/issues/2846
-  home-manager = super.home-manager.overrideAttrs (old: rec {
-    version = assert super.home-manager.version == "2021-12-25"; "2022-04-08";
-    src = self.fetchFromGitHub {
-      owner = "nix-community";
-      repo = "home-manager";
-      rev = "f911ebbec927e8e9b582f2e32e2b35f730074cfc";
-      sha256 = "07qa2qkbjczj3d0m03jpw85hfj35cbjm48xhifz3viy4khjw88vl";
-    };
+  # https://github.com/googleapis/google-cloud-go/pull/9665
+  cbtemulator = super.cbtemulator.overrideAttrs (old: {
+    patches = old.patches or [ ] ++ [
+      ./patches/cbtemulator-uds.patch
+    ];
   });
 
-  python38 = super.python38.override {
-    packageOverrides = pySelf: pySuper: {
-      backports-zoneinfo = pySuper.backports-zoneinfo.overridePythonAttrs (_: {
-        # Outdated test-data, see https://github.com/pganssle/zoneinfo/pull/115
-        # Can be dropped when https://github.com/NixOS/nixpkgs/pull/170450 lands.
-        doCheck = false;
-      });
-    };
-  };
+  crate2nix = super.crate2nix.overrideAttrs (old: {
+    patches = old.patches or [ ] ++ [
+      # https://github.com/nix-community/crate2nix/pull/301
+      ./patches/crate2nix-tests-debug.patch
+    ];
+  });
+
+  evans = super.evans.overrideAttrs (old: {
+    patches = old.patches or [ ] ++ [
+      # add support for unix domain sockets
+      # https://github.com/ktr0731/evans/pull/680
+      ./patches/evans-add-support-for-unix-domain-sockets.patch
+    ];
+  });
+
+  # Imports a patch that fixes usage of this package on versions
+  # >=1.9. The patch has been proposed upstream, but so far with no
+  # reactions from the maintainer:
+  #
+  # https://github.com/tpm2-software/tpm2-pkcs11/pull/849
+  tpm2-pkcs11 = super.tpm2-pkcs11.overrideAttrs (old: {
+    patches = (old.patches or [ ]) ++ [ ./patches/tpm2-pkcs11-190-dbupgrade.patch ];
+  });
 }