From aaaadbbcdc8234a5cdafa9591b823acddb3897da Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 23 Mar 2021 23:46:00 +0200 Subject: [PATCH] chore: Remove //overrides from depot This mechanism wasn't actually used for anything other than a minor external compatibility thing for buildGo.nix, which can also be solved with a function parameter. This breaks //fun/gemma because it means that the elmPackages used to build it are no longer reachable from depot. We'll sort this out later. Change-Id: I1bf2240435e869cdc4e99bdd1a138fdd2e76f96e Reviewed-on: https://cl.tvl.fyi/c/depot/+/2646 Tested-by: BuildkiteCI Reviewed-by: sterni --- default.nix | 7 +------ fun/gemma/default.nix | 7 ++++--- overrides/default.nix | 13 ------------- overrides/elmPackages/default.nix | 10 ---------- 4 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 overrides/default.nix delete mode 100644 overrides/elmPackages/default.nix diff --git a/default.nix b/default.nix index b95e73ff3..dd0af9c9b 100644 --- a/default.nix +++ b/default.nix @@ -71,6 +71,7 @@ let (node.meta.targets or [])) else []; in fix(self: { + __readTree = []; config = config self; # Elevate 'lib' from nixpkgs @@ -100,10 +101,4 @@ in fix(self: { # Add local packages as structured by readTree // (localPkgs (readTree' self.config)) - -# Load overrides into the top-level. -# -# This can be used to move things from third_party into the top-level, too (such -# as `lib`). -// (readTree' { depot = self; pkgs = self.third_party; }) ./overrides ) diff --git a/fun/gemma/default.nix b/fun/gemma/default.nix index 55612106d..a47365924 100644 --- a/fun/gemma/default.nix +++ b/fun/gemma/default.nix @@ -1,13 +1,12 @@ { depot, ... }: let - inherit (depot) elmPackages; inherit (depot.third_party) cacert iana-etc libredirect stdenv runCommandNoCC writeText; frontend = stdenv.mkDerivation { name = "gemma-frontend.html"; src = ./frontend; - buildInputs = [ cacert iana-etc elmPackages.elm ]; + buildInputs = [ cacert iana-etc ]; # elmPackages.elm # The individual Elm packages this requires are not packaged and I # can't be bothered to do that now, so lets open the escape hatch: @@ -47,4 +46,6 @@ in depot.nix.buildLisp.program { ./src/gemma.lisp injectFrontend ]; -} +# depot does not currently have Gemma's frontend dependencies, thus +# the build is disabled. +} // { meta.ci = false; } diff --git a/overrides/default.nix b/overrides/default.nix deleted file mode 100644 index 8bc49dec4..000000000 --- a/overrides/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -# This file is used to move things from nested attribute sets to the -# top-level. -{ depot, ... }: - -{ - buildGo = depot.nix.buildGo; # TODO(tazjin): remove this - - # These packages must be exposed for compatibility with buildGo. - # - # Despite buildGo being tracked in this tree, I want it to be possible - # for external users to import it with the default nixpkgs layout. - inherit (depot.third_party) go ripgrep; -} diff --git a/overrides/elmPackages/default.nix b/overrides/elmPackages/default.nix deleted file mode 100644 index 3df44420a..000000000 --- a/overrides/elmPackages/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -# Gemma needs an older version of Elm to be built. Updating it to -# the newer version is a lot of effort. -{ pkgs, ... }: - -(import (pkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nixpkgs"; - rev = "14f9ee66e63077539252f8b4550049381a082518"; - sha256 = "1wn7nmb1cqfk2j91l3rwc6yhimfkzxprb8wknw5wi57yhq9m6lv1"; -}) {}).elmPackages