diff options
author | Vladimír Čunát <v@cunat.cz> | 2021-10-19 19:24:43 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2021-10-19 19:24:43 +0200 |
commit | 01df3cd7dda0b22c056f15e22a690edb1040345a (patch) | |
tree | 84f42f005fcc9c0ec71398325584387a06fe44b7 /pkgs/build-support | |
parent | 3bd85fa720ceb2f1f0204e5b0410831f4b9f9254 (diff) | |
parent | ef64a9a4fce0f2e482899de68323c27751ba97a3 (diff) |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/agda/default.nix | 5 | ||||
-rw-r--r-- | pkgs/build-support/agda/lib.nix | 5 | ||||
-rw-r--r-- | pkgs/build-support/build-dotnet-module/default.nix | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index 5df02fbd5c17d..9fe9aa4579871 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -79,7 +79,12 @@ let find -not \( -path ${everythingFile} -or -path ${lib.interfaceFile everythingFile} \) -and \( ${concatMapStringsSep " -or " (p: "-name '*.${p}'") (extensions ++ extraExtensions)} \) -exec cp -p --parents -t "$out" {} + runHook postInstall ''; + meta = if meta.broken or false then meta // { hydraPlatforms = lib.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 = with builtins; + lib.filterAttrs (name: pkg: self.lib.isUnbrokenAgdaPackage pkg && elem pname (map (pkg: pkg.pname) pkg.buildInputs)) self; }; in { diff --git a/pkgs/build-support/agda/lib.nix b/pkgs/build-support/agda/lib.nix index 976151a8283c6..80a0974192bb3 100644 --- a/pkgs/build-support/agda/lib.nix +++ b/pkgs/build-support/agda/lib.nix @@ -7,4 +7,9 @@ * interfaceFile "src/Everything.lagda.tex" == "src/Everything.agdai" */ interfaceFile = agdaFile: lib.head (builtins.match ''(.*\.)l?agda(\.(md|org|rst|tex))?'' agdaFile) + "agdai"; + + /* Takes an arbitrary derivation and says whether it is an agda library package + * that is not marked as broken. + */ + isUnbrokenAgdaPackage = pkg: pkg.isAgdaDerivation or false && !pkg.meta.broken; } diff --git a/pkgs/build-support/build-dotnet-module/default.nix b/pkgs/build-support/build-dotnet-module/default.nix index 0c1a1f686e7e4..0161c101e5bf2 100644 --- a/pkgs/build-support/build-dotnet-module/default.nix +++ b/pkgs/build-support/build-dotnet-module/default.nix @@ -32,7 +32,7 @@ # The dotnet SDK to use. , dotnet-sdk ? dotnetCorePackages.sdk_5_0 # The dotnet runtime to use. -, dotnet-runtime ? dotnetCorePackages.net_5_0 +, dotnet-runtime ? dotnetCorePackages.runtime_5_0 , ... } @ args: assert projectFile == null -> throw "Defining the `projectFile` attribute is required. This is usually an `.csproj`, or `.sln` file."; |