about summary refs log tree commit diff
path: root/third_party/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-22T17·55+0100
committerVincent Ambo <tazjin@google.com>2020-05-22T18·02+0100
commitfe7fb8eff4ab07be0e669d28a928a5519c77492e (patch)
tree74e0cd0affc492efaceefb65792e96accdea8a26 /third_party/default.nix
parentf459332f32233ec963615789ae88efa10cc7f208 (diff)
fix(third_party): Pick Emacs from stable NixOS channel r/811
Emacs is currently subtly broken on nixos-unstable, but I don't care
about debugging that.

To work around it, this reintroduces the NixOS stable channel (20.03)
but as a separate attribute set from which attributes like Emacs can be
picked into //third_party.
Diffstat (limited to 'third_party/default.nix')
-rw-r--r--third_party/default.nix23
1 files changed, 17 insertions, 6 deletions
diff --git a/third_party/default.nix b/third_party/default.nix
index 2280af9b8f..8f019b3281 100644
--- a/third_party/default.nix
+++ b/third_party/default.nix
@@ -16,8 +16,16 @@ let
     config.allowBroken = true;
   };
 
+  # Tracking nixos-20.03 as of 2020-05-22
+  stableCommit = "48723f48ab92381f0afd50143f38e45cf3080405";
+  stableNixpkgsSrc = fetchTarball {
+    url = "https://github.com/NixOS/nixpkgs-channels/archive/${commit}.tar.gz";
+    sha256 = "0nkk492aa7pr0d30vv1aw192wc16wpa1j02925pldc09s9m9i0r3";
+  };
+  stableNixpkgs = import stableNixpkgsSrc {};
+
   exposed = {
-    # Inherit the packages from nixpkgs that should be available inside
+    # Inherit the packages from nixos-usntable that should be available inside
     # of the repo. They become available under `pkgs.third_party.<name>`
     inherit (nixpkgs)
       age
@@ -41,10 +49,6 @@ let
       cudatoolkit
       darwin
       dockerTools
-      emacs26
-      emacs26-nox
-      emacsPackages
-      emacsPackagesGen
       fetchFromGitHub
       fetchurl
       fetchzip
@@ -119,6 +123,13 @@ let
       zlib
       zstd;
 
+    # Inherit packages that should come from a stable channel
+    inherit (stableNixpkgs)
+      emacs26
+      emacs26-nox
+      emacsPackages
+      emacsPackagesGen;
+
     # Required by //third_party/nix
     inherit (nixpkgs)
       aws-sdk-cpp
@@ -147,7 +158,7 @@ in exposed // {
 
   # Provide the source code of nixpkgs, but do not provide an imported
   # version of it.
-  inherit nixpkgsSrc;
+  inherit nixpkgsSrc stableNixpkgsSrc;
 
   # Packages to be overridden
   originals = {