From 6843016aae40859ddb00a9721aa78c301c353f8d Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 11 Jan 2021 09:55:47 +0100 Subject: [PATCH] chore(third_party): move nixkpgs-exposed to subdir to fix OWNERS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The owners plugin should in theory be able to match on subdirs (at least according to its documentation, but it doesn’t and nobody has any idea how to debug it. We already know that subdirectories work just fine, so let’s go the path of least resistance because frankly, I couldn’t care any less. The haskell overlay also moves to the subdir, this way both can be changed in the same go by the same people. Change-Id: I7d98f48afa649ad2c58e38e674e1c4df09039c1c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2347 Tested-by: BuildkiteCI Reviewed-by: kanepyork Reviewed-by: lukegb --- third_party/OWNERS | 9 --------- third_party/default.nix | 2 +- third_party/nixpkgs-exposed/.skip-subtree | 1 + third_party/nixpkgs-exposed/OWNERS | 6 ++++++ .../exposed/default.nix} | 5 ++++- .../{ => nixpkgs-exposed}/haskell_overlay/default.nix | 2 +- .../patches/generic-arbitrary-export-garbitrary.patch | 0 .../haskell_overlay/patches/hgeometry-fix-haddock.patch | 0 .../haskell_overlay/patches/update-comonad-extras.patch | 0 9 files changed, 13 insertions(+), 12 deletions(-) delete mode 100644 third_party/OWNERS create mode 100644 third_party/nixpkgs-exposed/.skip-subtree create mode 100644 third_party/nixpkgs-exposed/OWNERS rename third_party/{nixpkgs-exposed.nix => nixpkgs-exposed/exposed/default.nix} (93%) rename third_party/{ => nixpkgs-exposed}/haskell_overlay/default.nix (98%) rename third_party/{ => nixpkgs-exposed}/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch (100%) rename third_party/{ => nixpkgs-exposed}/haskell_overlay/patches/hgeometry-fix-haddock.patch (100%) rename third_party/{ => nixpkgs-exposed}/haskell_overlay/patches/update-comonad-extras.patch (100%) diff --git a/third_party/OWNERS b/third_party/OWNERS deleted file mode 100644 index ac22fcb4b..000000000 --- a/third_party/OWNERS +++ /dev/null @@ -1,9 +0,0 @@ -inherited: true - -matchers: - # The nixpkgs whitelist needs to be changed every time we reference - # a new attribute, so every commiter should be able to change it, - # otherwise we create undue blockers on superowners. - - exact: nixpkgs-exposed.nix - owners: - - Profpatsch diff --git a/third_party/default.nix b/third_party/default.nix index 6d70fa072..7638d98d6 100644 --- a/third_party/default.nix +++ b/third_party/default.nix @@ -29,7 +29,7 @@ let }; stableNixpkgs = import stableNixpkgsSrc {}; - exposed = import ./nixpkgs-exposed.nix { inherit nixpkgs stableNixpkgs; }; + exposed = import ./nixpkgs-exposed/exposed { inherit nixpkgs stableNixpkgs; }; in exposed.lib.fix(self: exposed // { callPackage = nixpkgs.lib.callPackageWith self; diff --git a/third_party/nixpkgs-exposed/.skip-subtree b/third_party/nixpkgs-exposed/.skip-subtree new file mode 100644 index 000000000..aff471145 --- /dev/null +++ b/third_party/nixpkgs-exposed/.skip-subtree @@ -0,0 +1 @@ +This subtree is responsible for setting up the read tree arguments in the first place. diff --git a/third_party/nixpkgs-exposed/OWNERS b/third_party/nixpkgs-exposed/OWNERS new file mode 100644 index 000000000..32f9ac249 --- /dev/null +++ b/third_party/nixpkgs-exposed/OWNERS @@ -0,0 +1,6 @@ +# The nixpkgs whitelist needs to be changed every time we reference +# a new attribute, so every commiter should be able to change it, +# otherwise we create undue blockers on superowners. +inherited: true +owners: + - Profpatsch diff --git a/third_party/nixpkgs-exposed.nix b/third_party/nixpkgs-exposed/exposed/default.nix similarity index 93% rename from third_party/nixpkgs-exposed.nix rename to third_party/nixpkgs-exposed/exposed/default.nix index 07887ea96..8c666bbf5 100644 --- a/third_party/nixpkgs-exposed.nix +++ b/third_party/nixpkgs-exposed/exposed/default.nix @@ -1,3 +1,6 @@ +# This file has to be in yet another subdir +# because of how readTree interprets .skip-subtree +# see https://b.tvl.fyi/issues/89 { nixpkgs, stableNixpkgs }: { # Inherit the packages from nixos-unstable that should be available inside @@ -164,7 +167,7 @@ ; haskellPackages = (nixpkgs.haskellPackages.override { - overrides = (import ./haskell_overlay { pkgs = nixpkgs; }); + overrides = (import ../haskell_overlay { pkgs = nixpkgs; }); }); gradle_6 = (nixpkgs.gradleGen.override { diff --git a/third_party/haskell_overlay/default.nix b/third_party/nixpkgs-exposed/haskell_overlay/default.nix similarity index 98% rename from third_party/haskell_overlay/default.nix rename to third_party/nixpkgs-exposed/haskell_overlay/default.nix index c1d257808..600d26541 100644 --- a/third_party/haskell_overlay/default.nix +++ b/third_party/nixpkgs-exposed/haskell_overlay/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? import ./nixpkgs.nix {}, ... }: +{ pkgs }: self: super: with pkgs.haskell.lib; rec { aeson = doJailbreak super.aeson; diff --git a/third_party/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch b/third_party/nixpkgs-exposed/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch similarity index 100% rename from third_party/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch rename to third_party/nixpkgs-exposed/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch diff --git a/third_party/haskell_overlay/patches/hgeometry-fix-haddock.patch b/third_party/nixpkgs-exposed/haskell_overlay/patches/hgeometry-fix-haddock.patch similarity index 100% rename from third_party/haskell_overlay/patches/hgeometry-fix-haddock.patch rename to third_party/nixpkgs-exposed/haskell_overlay/patches/hgeometry-fix-haddock.patch diff --git a/third_party/haskell_overlay/patches/update-comonad-extras.patch b/third_party/nixpkgs-exposed/haskell_overlay/patches/update-comonad-extras.patch similarity index 100% rename from third_party/haskell_overlay/patches/update-comonad-extras.patch rename to third_party/nixpkgs-exposed/haskell_overlay/patches/update-comonad-extras.patch