1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/pkgs/test/default.nix

59 lines
2.5 KiB
Nix
Raw Normal View History

2018-05-11 02:08:26 +01:00
{ pkgs, callPackage }:
with pkgs;
{
cc-wrapper = callPackage ./cc-wrapper { };
cc-wrapper-gcc = callPackage ./cc-wrapper { stdenv = gccStdenv; };
cc-wrapper-gcc7 = callPackage ./cc-wrapper { stdenv = gcc7Stdenv; };
cc-wrapper-gcc8 = callPackage ./cc-wrapper { stdenv = gcc8Stdenv; };
cc-wrapper-gcc9 = callPackage ./cc-wrapper { stdenv = gcc9Stdenv; };
2018-05-11 02:08:26 +01:00
cc-wrapper-clang = callPackage ./cc-wrapper { stdenv = llvmPackages.stdenv; };
cc-wrapper-libcxx = callPackage ./cc-wrapper { stdenv = llvmPackages.libcxxStdenv; };
cc-wrapper-clang-5 = callPackage ./cc-wrapper { stdenv = llvmPackages_5.stdenv; };
cc-wrapper-libcxx-5 = callPackage ./cc-wrapper { stdenv = llvmPackages_5.libcxxStdenv; };
cc-wrapper-clang-6 = callPackage ./cc-wrapper { stdenv = llvmPackages_6.stdenv; };
cc-wrapper-libcxx-6 = callPackage ./cc-wrapper { stdenv = llvmPackages_6.libcxxStdenv; };
2018-09-18 21:33:32 +01:00
cc-wrapper-clang-7 = callPackage ./cc-wrapper { stdenv = llvmPackages_7.stdenv; };
cc-wrapper-libcxx-7 = callPackage ./cc-wrapper { stdenv = llvmPackages_7.libcxxStdenv; };
cc-wrapper-clang-8 = callPackage ./cc-wrapper { stdenv = llvmPackages_8.stdenv; };
cc-wrapper-libcxx-8 = callPackage ./cc-wrapper { stdenv = llvmPackages_8.libcxxStdenv; };
cc-wrapper-clang-9 = callPackage ./cc-wrapper { stdenv = llvmPackages_9.stdenv; };
cc-wrapper-libcxx-9 = callPackage ./cc-wrapper { stdenv = llvmPackages_9.libcxxStdenv; };
2018-05-11 02:08:26 +01:00
stdenv-inputs = callPackage ./stdenv-inputs { };
haskell = callPackage ./haskell { };
2018-05-11 02:08:26 +01:00
cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; };
cc-multilib-clang = callPackage ./cc-wrapper/multilib.nix { stdenv = clangMultiStdenv; };
install-shell-files = callPackage ./install-shell-files {};
2018-10-03 10:54:42 +01:00
kernel-config = callPackage ./kernel.nix {};
ld-library-path = callPackage ./ld-library-path {};
2018-05-11 02:08:26 +01:00
macOSSierraShared = callPackage ./macos-sierra-shared {};
2018-07-21 03:43:55 +01:00
cross = callPackage ./cross {};
2020-10-17 08:43:33 +01:00
rustCustomSysroot = callPackage ./rust-sysroot {};
buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { };
importCargoLock = callPackage ../build-support/rust/test/import-cargo-lock { };
2020-10-17 08:43:33 +01:00
vim = callPackage ./vim {};
nixos-functions = callPackage ./nixos-functions {};
patch-shebangs = callPackage ./patch-shebangs {};
2018-11-27 02:58:17 +00:00
2020-04-11 00:47:44 +01:00
texlive = callPackage ./texlive {};
cuda = callPackage ./cuda { };
2021-05-14 16:27:25 +01:00
trivial = callPackage ../build-support/trivial-builders/test.nix {};
trivial-builders: refactor writeTextFile to be overridable This fixes #126344, specifically with the goal of enabling overriding the checkPhase argument. See `design notes` at the end for details. This allows among other things, enabling bash extension for the `checkPhase`. Previously using such bash extensions was prohibited by the `writeShellScript` code because there was no way to enable the extension in the checker. As an example: ```nix (writeShellScript "foo" '' shopt -s extglob echo @(foo|bar) '').overrideAttrs (old: { checkPhase = '' # use subshell to preserve outer environment ( export BASHOPTS shopt -s extglob ${old.checkPhase} ) ''; }) ``` This commit also adds tests for this feature to `pkgs/tests/default.nix`, under `trivial-overriding`. The test code is located at `pkgs/build-support/trivial-builders/test-overriding.nix`. Design notes: ------------- Per discussion with @sternenseemann, the original approach of just wrapping `writeTextFile` in `makeOverridable` had the issue that combined with `callPackage` in the following form, would shadow the `.override` attribute of the `writeTextFile`: ```nix with import <nixpkgs>; callPackage ({writeShellScript}: writeShellScript "foo" "echo foo") ``` A better approach can be seen in this commit, where `checkPhase` is moved from an argument of `writeTextFile`, which is substituted into `buildCommand`, into an `mkDerivation` argument, which is substituted from the environment and `eval`-ed. (see the source) This way we can simple use `.overideAttrs` as usual, and this also makes `checkPhase` a bit more conformant to `mkDerivation` naming, with respect to phases generally being overridable attrs. Co-authored-by: sterni <sternenseemann@systemli.org> Co-authored-by: Naïm Favier <n@monade.li>
2021-06-14 14:06:23 +01:00
trivial-overriding = callPackage ../build-support/trivial-builders/test-overriding.nix {};
2021-05-14 16:27:25 +01:00
2018-11-27 02:58:17 +00:00
writers = callPackage ../build-support/writers/test.nix {};
2018-05-11 02:08:26 +01:00
}