Unverified Commit 4a71b0ac authored by Naïm Camille Favier's avatar Naïm Camille Favier Committed by GitHub
Browse files

build-support/agda: Keep `passthru` in `mkDerivation` (#465615)

parents b1a6c3fb 1edff9d8
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ let
    {
      pname,
      meta,
      passthru ? { },
      buildInputs ? [ ],
      libraryName ? pname,
      libraryFile ? "${libraryName}.agda-lib",
@@ -145,10 +146,14 @@ let
      meta = if meta.broken or false then meta // { hydraPlatforms = platforms.none; } else meta;

      # Retrieve all packages from the finished package set that have the current package as a dependency and build them
      passthru.tests = filterAttrs (
      passthru = passthru // {
        tests =
          passthru.tests or { }
          // filterAttrs (
            name: pkg: self.lib.isUnbrokenAgdaPackage pkg && elem pname (map (pkg: pkg.pname) pkg.buildInputs)
          ) self;
      };
    };
in
{
  mkDerivation = args: stdenv.mkDerivation (args // defaults args);