diff options
author | Profpatsch <mail@profpatsch.de> | 2021-01-11T08·55+0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2021-01-11T19·44+0000 |
commit | 6843016aae40859ddb00a9721aa78c301c353f8d (patch) | |
tree | efb41eba6f453f5fd996c90985bd97c2912127d5 /third_party/nixpkgs-exposed | |
parent | 923d90990ee829df71f45a26287be6c9c14bb47b (diff) |
chore(third_party): move nixkpgs-exposed to subdir to fix OWNERS r/2075
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 <rikingcoding@gmail.com> Reviewed-by: lukegb <lukegb@tvl.fyi>
Diffstat (limited to 'third_party/nixpkgs-exposed')
7 files changed, 483 insertions, 0 deletions
diff --git a/third_party/nixpkgs-exposed/.skip-subtree b/third_party/nixpkgs-exposed/.skip-subtree new file mode 100644 index 000000000000..aff471145e46 --- /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 000000000000..32f9ac249938 --- /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/exposed/default.nix b/third_party/nixpkgs-exposed/exposed/default.nix new file mode 100644 index 000000000000..8c666bbf59c8 --- /dev/null +++ b/third_party/nixpkgs-exposed/exposed/default.nix @@ -0,0 +1,185 @@ +# 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 + # of the repo. They become available under `pkgs.third_party.<name>` + inherit (nixpkgs) + age + autoconf + autoreconfHook + avrdude + avrlibc + bashInteractive + bat + buildBazelPackage + buildFHSUserEnv + buildGoModule + buildGoPackage + buildPackages + buildRustCrate + buildkite-agent + busybox + bzip2 + c-ares + cacert + cachix + cairo + cargo + cgit + clang_11 + cmake + coreutils + cudatoolkit + darwin + dfu-programmer + dfu-util + diffutils + docker-compose + dockerTools + emacs26 + emacs26-nox + emacsPackages + emacsPackagesGen + execline + fd + fetchFromGitHub + fetchgit + fetchurl + fetchzip + findutils + fira + fira-code + fira-mono + flamegraph + fontconfig + freetype + gettext + glibc + gmock + gnused + gnutar + google-cloud-sdk + graphviz + gzip + haskell + iana-etc + imagemagickBig + installShellFiles + jdk + jdk11 + jdk11_headless + jetbrains-mono + jq + kontemplate + lib + libredirect + linuxPackages + linuxPackages_5_9 + luajit + lutris + makeFontsConf + makeWrapper + mdbook + meson + mime-types + mkShell + moreutils + nano + nginx + ninja + nix + openssh + openssl + overrideCC + pandoc + parallel + pkgconfig + pkgsCross + postgresql + pounce + pulseaudio + python3 + python3Packages + quassel + remarshal + rink + ripgrep + rsync + runCommand + runCommandLocal + runCommandNoCC + rustPlatform + rustc + s6-portable-utils + sbcl + shellcheck + sqlite + stdenvNoCC + stern + symlinkJoin + systemd + tdlib + teensy-loader-cli + terraform_0_12 + texlive + thttpd + tree + tree-sitter + unzip + which + writers + writeShellScript + writeShellScriptBin + writeText + xorg + xz + zlib + zstd; + + # Inherit packages from the stable channel for things that are + # broken on unstable + inherit (stableNixpkgs) + awscli # TODO(grfn): Move back to unstable once it is fixed + ; + + # Required by //third_party/nix + inherit (nixpkgs) + aws-sdk-cpp + bison + boehmgc + boost # urgh + brotli + busybox-sandbox-shell + curl + docbook5 + docbook_xsl_ns + editline + flex + libseccomp + libsodium + libxml2 + libxslt + mercurial + perl + perlPackages + ; + + haskellPackages = (nixpkgs.haskellPackages.override { + overrides = (import ../haskell_overlay { pkgs = nixpkgs; }); + }); + + gradle_6 = (nixpkgs.gradleGen.override { + java = nixpkgs.jdk11; + jdk = nixpkgs.jdk11; + }).gradleGen rec { + name = "gradle-6.5.1"; + nativeVersion = "0.22-milestone-3"; + + src = builtins.fetchurl { + url = "https://services.gradle.org/distributions/${name}-bin.zip"; + sha256 = "0jmmipjh4fbsn92zpifa5cqg5ws2a4ha0s4jzqhrg4zs542x79sh"; + }; + }; +} diff --git a/third_party/nixpkgs-exposed/haskell_overlay/default.nix b/third_party/nixpkgs-exposed/haskell_overlay/default.nix new file mode 100644 index 000000000000..600d26541ec2 --- /dev/null +++ b/third_party/nixpkgs-exposed/haskell_overlay/default.nix @@ -0,0 +1,112 @@ +{ pkgs }: + +self: super: with pkgs.haskell.lib; rec { + aeson = doJailbreak super.aeson; + + attoparsec = doJailbreak super.attoparsec; + + cassava = doJailbreak super.cassava; + + fgl = overrideSrc (doJailbreak super.fgl) rec { + src = pkgs.fetchzip { + url = "mirror://hackage/fgl-${version}/fgl-${version}.tar.gz"; + sha256 = "0spyd56b2rmwp8n6h167rfjwy8lpcvar1p2rqhw9q580h2l9v61l"; + }; + version = "5.7.0.3"; + }; + + fgl-arbitrary = overrideSrc super.fgl-arbitrary rec { + src = pkgs.fetchzip { + url = "mirror://hackage/fgl-arbitrary-${version}/fgl-arbitrary-${version}.tar.gz"; + sha256 = "0bacdv51am13x5k64xvmxcs5gkdkh0gpmnh05wgd2vqg1n8r7fwb"; + }; + version = "0.2.0.6"; + }; + + generic-arbitrary = appendPatch + super.generic-arbitrary + [ ./patches/generic-arbitrary-export-garbitrary.patch ]; + + hgeometry = + appendPatch + (self.callHackageDirect { + pkg = "hgeometry"; + ver = "0.9.0.0"; + sha256 = "02hyvbqm57lr47w90vdgl71cfbd6lvwpqdid9fcnmxkdjbq4kv6b"; + } {}) [ ./patches/hgeometry-fix-haddock.patch ]; + + hgeometry-combinatorial = + self.callHackageDirect { + pkg = "hgeometry-combinatorial"; + ver = "0.9.0.0"; + sha256 = "12k41wd9fd1y3jd5djwcpwg2s1cva87wh14i0m1yn49zax9wl740"; + } {}; + + psqueues = doJailbreak super.psqueues; + + random = dontCheck (self.callHackageDirect { + pkg = "random"; + ver = "1.2.0"; + sha256 = "06s3mmqbsfwv09j2s45qnd66nrxfp9280gnl9ng8yh128pfr7bjh"; + } {}); + + # random <1.2 + test-framework = doJailbreak super.test-framework; + hashable = doJailbreak super.hashable; + + random-source = overrideSrc super.random-source rec { + src = pkgs.fetchzip { + url = "mirror://hackage/random-source-${version}/random-source-${version}.tar.gz"; + sha256 = "0yx0i4fv1xg535zd2isczfngsq5740wzl6w44168lxdmpw9fmsyz"; + }; + # downgraded as the latest version was causing a ghc crash: + # https://gitlab.haskell.org/ghc/ghc/-/issues/18537 + version = "0.3.0.8"; + }; + + semialign = self.callHackageDirect { + pkg = "semialign"; + ver = "1.1.0.1"; + sha256 = "1xs5dvz87gx6xnannw6bc70nzr8ffhk0j6n7n0p5dqair9sz77x4"; + } {}; + + splitmix = dontCheck (self.callHackageDirect { + pkg = "splitmix"; + ver = "0.1"; + sha256 = "1k7l07h2w4fhjdqiqvw48if0irx0ngv6niach265j7lbfxsm8qql"; + } {}); + + hedgehog = doJailbreak super.hedgehog; + + hspec-core = dontCheck super.hspec-core; + + QuickCheck = overrideSrc super.QuickCheck rec { + src = pkgs.fetchzip { + url = "mirror://hackage/QuickCheck-${version}/QuickCheck-${version}.tar.gz"; + sha256 = "0x9pnr9m81jlywj38w3530zw1g0xmfszmj9303m2fp58zpad96h0"; + }; + version = "2.14.1"; + }; + + test-framework-quickcheck2 = doJailbreak super.test-framework-quickcheck2; + + vector = overrideSrc (doJailbreak super.vector) rec { + src = pkgs.fetchzip { + url = "mirror://hackage/vector-${version}/vector-${version}.tar.gz"; + sha256 = "1312lpb1f4jzbmcjp7mdf9l9ykp1hscxdr66cl8zlcs8kbr13bm7"; + }; + version = "0.12.1.2"; + }; + + vinyl = overrideSrc (markUnbroken super.vinyl) + rec { + src = pkgs.fetchzip { + url = "mirror://hackage/vinyl-${version}/vinyl-${version}.tar.gz"; + sha256 = "190ffrmm76fh8fi9afkcda2vldf89y7dxj10434h28mbpq55kgsx"; + }; + version = "0.12.0"; + }; + + comonad-extras = appendPatch (markUnbroken super.comonad-extras) + [ ./patches/update-comonad-extras.patch ]; +} diff --git a/third_party/nixpkgs-exposed/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch b/third_party/nixpkgs-exposed/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch new file mode 100644 index 000000000000..f0c936bfca18 --- /dev/null +++ b/third_party/nixpkgs-exposed/haskell_overlay/patches/generic-arbitrary-export-garbitrary.patch @@ -0,0 +1,12 @@ +diff --git a/src/Test/QuickCheck/Arbitrary/Generic.hs b/src/Test/QuickCheck/Arbitrary/Generic.hs +index fed6ab3..91f59f1 100644 +--- a/src/Test/QuickCheck/Arbitrary/Generic.hs ++++ b/src/Test/QuickCheck/Arbitrary/Generic.hs +@@ -23,6 +23,7 @@ The generated 'arbitrary' method is equivalent to + + module Test.QuickCheck.Arbitrary.Generic + ( Arbitrary(..) ++ , GArbitrary + , genericArbitrary + , genericShrink + ) where diff --git a/third_party/nixpkgs-exposed/haskell_overlay/patches/hgeometry-fix-haddock.patch b/third_party/nixpkgs-exposed/haskell_overlay/patches/hgeometry-fix-haddock.patch new file mode 100644 index 000000000000..748c65b3e0db --- /dev/null +++ b/third_party/nixpkgs-exposed/haskell_overlay/patches/hgeometry-fix-haddock.patch @@ -0,0 +1,13 @@ +diff --git a/src/Data/Geometry/PlanarSubdivision/Merge.hs b/src/Data/Geometry/PlanarSubdivision/Merge.hs +index 1136114..3f4e7bb 100644 +--- a/src/Data/Geometry/PlanarSubdivision/Merge.hs ++++ b/src/Data/Geometry/PlanarSubdivision/Merge.hs +@@ -153,7 +153,7 @@ mergeWith' mergeFaces p1 p2 = PlanarSubdivision cs vd rd rf + -- we have to shift the number of the *Arcs*. Since every dart + -- consists of two arcs, we have to shift by numDarts / 2 + -- Furthermore, we take numFaces - 1 since we want the first +- -- *internal* face of p2 (the one with FaceId 1) to correspond with the first free ++ -- /internal/ face of p2 (the one with FaceId 1) to correspond with the first free + -- position (at index numFaces) + + cs = p1^.components <> p2'^.components diff --git a/third_party/nixpkgs-exposed/haskell_overlay/patches/update-comonad-extras.patch b/third_party/nixpkgs-exposed/haskell_overlay/patches/update-comonad-extras.patch new file mode 100644 index 000000000000..2a419f320297 --- /dev/null +++ b/third_party/nixpkgs-exposed/haskell_overlay/patches/update-comonad-extras.patch @@ -0,0 +1,154 @@ +diff --git a/.travis.yml b/.travis.yml +index 1a9ac7a..81c69e9 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -1,43 +1,4 @@ +-env: +- - GHCVER=7.0.1 CABALVER=1.16 +- - GHCVER=7.0.4 CABALVER=1.16 +- - GHCVER=7.2.2 CABALVER=1.16 +- - GHCVER=7.4.2 CABALVER=1.16 +- - GHCVER=7.6.3 CABALVER=1.16 +- - GHCVER=7.8.4 CABALVER=1.18 +- - GHCVER=7.10.1 CABALVER=1.22 +- - GHCVER=head CABALVER=1.22 +- +-matrix: +- allow_failures: +- - env: GHCVER=7.0.1 CABALVER=1.16 +- - env: GHCVER=7.0.4 CABALVER=1.16 +- - env: GHCVER=7.2.2 CABALVER=1.16 +- - env: GHCVER=head CABALVER=1.22 +- +-before_install: +- - travis_retry sudo add-apt-repository -y ppa:hvr/ghc +- - travis_retry sudo apt-get update +- - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER +- - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH +- - cabal --version +- +-install: +- - travis_retry cabal update +- - cabal install --enable-tests --only-dependencies +- +-script: +- - cabal configure -v2 --enable-tests +- - cabal build +- - cabal sdist +- - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ; +- cd dist/; +- if [ -f "$SRC_TGZ" ]; then +- cabal install "$SRC_TGZ"; +- else +- echo "expected '$SRC_TGZ' not found"; +- exit 1; +- fi ++language: haskell + + notifications: + irc: +diff --git a/comonad-extras.cabal b/comonad-extras.cabal +index 2e449c1..77a2f0d 100644 +--- a/comonad-extras.cabal ++++ b/comonad-extras.cabal +@@ -1,6 +1,6 @@ +-name: comonad-extras + category: Control, Comonads +-version: 4.0.1 ++name: comonad-extras ++version: 5.0 + license: BSD3 + cabal-version: >= 1.6 + license-file: LICENSE +@@ -34,11 +34,11 @@ library + build-depends: + array >= 0.3 && < 0.6, + base >= 4 && < 5, +- containers >= 0.4 && < 0.7, +- comonad >= 4 && < 6, ++ containers >= 0.6 && < 0.7, ++ comonad >= 5 && < 6, + distributive >= 0.3.2 && < 1, +- semigroupoids >= 4 && < 6, +- transformers >= 0.2 && < 0.6 ++ semigroupoids >= 5 && < 6, ++ transformers >= 0.5 && < 0.6 + + exposed-modules: + Control.Comonad.Store.Zipper +diff --git a/src/Control/Comonad/Store/Pointer.hs b/src/Control/Comonad/Store/Pointer.hs +index 5e41f4e..d99b50f 100644 +--- a/src/Control/Comonad/Store/Pointer.hs ++++ b/src/Control/Comonad/Store/Pointer.hs +@@ -44,9 +44,6 @@ module Control.Comonad.Store.Pointer + , module Control.Comonad.Store.Class + ) where + +-#if !defined(__GLASGOW_HASKELL__) || __GLASGOW_HASKELL__ < 710 +-import Control.Applicative +-#endif + import Control.Comonad + import Control.Comonad.Hoist.Class + import Control.Comonad.Trans.Class +@@ -56,32 +53,10 @@ import Control.Comonad.Env.Class + import Data.Functor.Identity + import Data.Functor.Extend + import Data.Array +- +-#if __GLASGOW_HASKELL__ ++#ifdef __GLASGOW_HASKELL__ + import Data.Typeable + #endif + +-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 708 +-instance (Typeable i, Typeable1 w) => Typeable1 (PointerT i w) where +- typeOf1 diwa = mkTyConApp storeTTyCon [typeOf (i diwa), typeOf1 (w diwa)] +- where +- i :: PointerT i w a -> i +- i = undefined +- w :: PointerT i w a -> w a +- w = undefined +- +-instance (Typeable i, Typeable1 w, Typeable a) => Typeable (PointerT i w a) where +- typeOf = typeOfDefault +- +-storeTTyCon :: TyCon +-#if __GLASGOW_HASKELL__ < 704 +-storeTTyCon = mkTyCon "Control.Comonad.Trans.Store.Pointer.PointerT" +-#else +-storeTTyCon = mkTyCon3 "comonad-extras" "Control.Comonad.Trans.Store.Pointer" "PointerT" +-#endif +-{-# NOINLINE storeTTyCon #-} +-#endif +- + type Pointer i = PointerT i Identity + + pointer :: Array i a -> i -> Pointer i a +@@ -91,7 +66,7 @@ runPointer :: Pointer i a -> (Array i a, i) + runPointer (PointerT (Identity f) i) = (f, i) + + data PointerT i w a = PointerT (w (Array i a)) i +-#if __GLASGOW_HASKELL__ >= 708 ++#ifdef __GLASGOW_HASKELL__ + deriving Typeable + #endif + +@@ -133,4 +108,3 @@ instance (ComonadTraced m w, Ix i) => ComonadTraced m (PointerT i w) where + + instance (ComonadEnv m w, Ix i) => ComonadEnv m (PointerT i w) where + ask = ask . lower +- +diff --git a/src/Control/Comonad/Store/Zipper.hs b/src/Control/Comonad/Store/Zipper.hs +index 6dab6fd..decc378 100644 +--- a/src/Control/Comonad/Store/Zipper.hs ++++ b/src/Control/Comonad/Store/Zipper.hs +@@ -15,9 +15,6 @@ + module Control.Comonad.Store.Zipper + ( Zipper, zipper, zipper1, unzipper, size) where + +-#if !defined(__GLASGOW_HASKELL__) || __GLASGOW_HASKELL__ < 710 +-import Control.Applicative +-#endif + import Control.Comonad (Comonad(..)) + import Data.Functor.Extend + import Data.Foldable |