diff options
Diffstat (limited to 'nixpkgs/pkgs/test')
-rw-r--r-- | nixpkgs/pkgs/test/cross/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/cuda/cuda-samples/extension.nix | 10 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/cuda/cuda-samples/generic.nix | 51 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/texlive/default.nix | 41 |
4 files changed, 59 insertions, 47 deletions
diff --git a/nixpkgs/pkgs/test/cross/default.nix b/nixpkgs/pkgs/test/cross/default.nix index 124f6eec10ae..71d7d5f75ef0 100644 --- a/nixpkgs/pkgs/test/cross/default.nix +++ b/nixpkgs/pkgs/test/cross/default.nix @@ -152,6 +152,10 @@ let # lots of interesting corner cases. Only expected to work for # x86_64-linux buildPlatform. pkgs.pkgsMusl.pkgsCross.gnu64.hello + + # Two web browsers -- exercises almost the entire packageset + pkgs.pkgsCross.aarch64-multiplatform.qt5.qutebrowser + pkgs.pkgsCross.aarch64-multiplatform.firefox ]; in { diff --git a/nixpkgs/pkgs/test/cuda/cuda-samples/extension.nix b/nixpkgs/pkgs/test/cuda/cuda-samples/extension.nix index 05861ee5e0eb..664349416b71 100644 --- a/nixpkgs/pkgs/test/cuda/cuda-samples/extension.nix +++ b/nixpkgs/pkgs/test/cuda/cuda-samples/extension.nix @@ -11,13 +11,15 @@ final: prev: let "11.4" = "082dkk5y34wyvjgj2p5j1d00rk8xaxb9z0mhvz16bd469r1bw2qk"; "11.5" = "sha256-AKRZbke0K59lakhTi8dX2cR2aBuWPZkiQxyKaZTvHrI="; "11.6" = "sha256-AsLNmAplfuQbXg9zt09tXAuFJ524EtTYsQuUlV1tPkE="; - "11.7" = throw "The tag 11.7 of cuda-samples does not exist"; + # The tag 11.7 of cuda-samples does not exist "11.8" = "sha256-7+1P8+wqTKUGbCUBXGMDO9PkxYr2+PLDx9W2hXtXbuc="; "12.0" = "sha256-Lj2kbdVFrJo5xPYPMiE4BS7Z8gpU5JLKXVJhZABUe/g="; - }.${prev.cudaVersion}; + "12.1" = "sha256-xE0luOMq46zVsIEWwK4xjLs7NorcTIi9gbfZPVjIlqo="; + "12.2" = "sha256-pOy0qfDjA/Nr0T9PNKKefK/63gQnJV2MQsN2g3S2yng="; + }; -in { +in prev.lib.attrsets.optionalAttrs (builtins.hasAttr prev.cudaVersion sha256) { cuda-samples = final.callPackage ./generic.nix { - inherit sha256; + sha256 = sha256.${prev.cudaVersion}; }; } diff --git a/nixpkgs/pkgs/test/cuda/cuda-samples/generic.nix b/nixpkgs/pkgs/test/cuda/cuda-samples/generic.nix index 267eca10d8e8..e690f32959f2 100644 --- a/nixpkgs/pkgs/test/cuda/cuda-samples/generic.nix +++ b/nixpkgs/pkgs/test/cuda/cuda-samples/generic.nix @@ -1,31 +1,46 @@ -{ lib -, cudaPackages +{ autoAddOpenGLRunpathHook +, backendStdenv +, cmake +, cudatoolkit +, cudaVersion , fetchFromGitHub , fetchpatch -, addOpenGLRunpath -, cudatoolkit +, freeimage +, glfw3 +, lib , pkg-config , sha256 -, glfw3 -, freeimage }: -cudaPackages.backendStdenv.mkDerivation rec { +backendStdenv.mkDerivation (finalAttrs: { pname = "cuda-samples"; - version = lib.versions.majorMinor cudatoolkit.version; + version = cudaVersion; src = fetchFromGitHub { owner = "NVIDIA"; - repo = pname; - rev = "v${version}"; + repo = finalAttrs.pname; + rev = "v${finalAttrs.version}"; inherit sha256; }; - nativeBuildInputs = [ pkg-config addOpenGLRunpath glfw3 freeimage ]; + nativeBuildInputs = [ + pkg-config + autoAddOpenGLRunpathHook + glfw3 + freeimage + ] + # CMake has to run as a native, build-time dependency for libNVVM samples. + ++ lib.lists.optionals (lib.strings.versionAtLeast finalAttrs.version "12.2") [ + cmake + ]; + + # CMake is not the primary build tool -- that's still make. + # As such, we disable CMake's build system. + dontUseCmakeConfigure = true; buildInputs = [ cudatoolkit ]; # See https://github.com/NVIDIA/cuda-samples/issues/75. - patches = lib.optionals (version == "11.3") [ + patches = lib.optionals (finalAttrs.version == "11.3") [ (fetchpatch { url = "https://github.com/NVIDIA/cuda-samples/commit/5c3ec60faeb7a3c4ad9372c99114d7bb922fda8d.patch"; sha256 = "sha256-0XxdmNK9MPpHwv8+qECJTvXGlFxc+fIbta4ynYprfpU="; @@ -41,21 +56,15 @@ cudaPackages.backendStdenv.mkDerivation rec { installPhase = '' runHook preInstall - install -Dm755 -t $out/bin bin/${cudaPackages.backendStdenv.hostPlatform.parsed.cpu.name}/${cudaPackages.backendStdenv.hostPlatform.parsed.kernel.name}/release/* + install -Dm755 -t $out/bin bin/${backendStdenv.hostPlatform.parsed.cpu.name}/${backendStdenv.hostPlatform.parsed.kernel.name}/release/* runHook postInstall ''; - postFixup = '' - for exe in $out/bin/*; do - addOpenGLRunpath $exe - done - ''; - meta = { description = "Samples for CUDA Developers which demonstrates features in CUDA Toolkit"; # CUDA itself is proprietary, but these sample apps are not. license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ obsidian-systems-maintenance ]; + maintainers = with lib.maintainers; [ obsidian-systems-maintenance ] ++ lib.teams.cuda.members; }; -} +}) diff --git a/nixpkgs/pkgs/test/texlive/default.nix b/nixpkgs/pkgs/test/texlive/default.nix index 708134668826..12fdd5c45f8b 100644 --- a/nixpkgs/pkgs/test/texlive/default.nix +++ b/nixpkgs/pkgs/test/texlive/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildEnv, runCommand, fetchurl, file, texlive, writeShellScript, writeText }: +{ lib, stdenv, buildEnv, runCommand, fetchurl, file, texlive, writeShellScript, writeText, texliveInfraOnly, texliveSmall, texliveMedium, texliveFull }: rec { @@ -6,7 +6,7 @@ rec { { name , format , text - , texLive ? texlive.combined.scheme-small + , texLive ? texliveSmall , options ? "-interaction=errorstopmode" , preTest ? "" , postTest ? "" @@ -43,7 +43,7 @@ rec { lualatex = mkTeXTest { name = "opentype-fonts-lualatex"; format = "lualatex"; - texLive = texlive.combine { inherit (texlive) scheme-small libertinus-fonts; }; + texLive = texliveSmall.withPackages (ps: [ ps.libertinus-fonts ]); text = '' \documentclass{article} \usepackage{fontspec} @@ -61,7 +61,7 @@ rec { chktex = runCommand "texlive-test-chktex" { nativeBuildInputs = [ - (texlive.combine { inherit (texlive) scheme-infraonly chktex; }) + (texlive.withPackages (ps: [ ps.chktex ])) ]; input = builtins.toFile "chktex-sample.tex" '' \documentclass{article} @@ -77,7 +77,7 @@ rec { dvipng = lib.recurseIntoAttrs { # https://github.com/NixOS/nixpkgs/issues/75605 basic = runCommand "texlive-test-dvipng-basic" { - nativeBuildInputs = [ file texlive.combined.scheme-medium ]; + nativeBuildInputs = [ file texliveMedium ]; input = fetchurl { name = "test_dvipng.tex"; url = "http://git.savannah.nongnu.org/cgit/dvipng.git/plain/test_dvipng.tex?id=b872753590a18605260078f56cbd6f28d39dc035"; @@ -99,7 +99,7 @@ rec { # test dvipng's limited capability to render postscript specials via GS ghostscript = runCommand "texlive-test-ghostscript" { - nativeBuildInputs = [ file (texlive.combine { inherit (texlive) scheme-small dvipng; }) ]; + nativeBuildInputs = [ file (texliveSmall.withPackages (ps: [ ps.dvipng ])) ]; input = builtins.toFile "postscript-sample.tex" '' \documentclass{minimal} \begin{document} @@ -140,7 +140,7 @@ rec { # https://github.com/NixOS/nixpkgs/issues/75070 dvisvgm = runCommand "texlive-test-dvisvgm" { - nativeBuildInputs = [ file texlive.combined.scheme-medium ]; + nativeBuildInputs = [ file texliveMedium ]; input = builtins.toFile "dvisvgm-sample.tex" '' \documentclass{article} \begin{document} @@ -166,10 +166,7 @@ rec { texdoc = runCommand "texlive-test-texdoc" { nativeBuildInputs = [ - (texlive.combine { - inherit (texlive) scheme-infraonly luatex texdoc; - pkgFilter = pkg: lib.elem pkg.tlType [ "run" "bin" "doc" ]; - }) + (texlive.withPackages (ps: with ps; [ luatex ps.texdoc ps.texdoc.texdoc ])) ]; } '' texdoc --version @@ -214,7 +211,7 @@ rec { }; # check that all languages are available, including synonyms - allLanguages = let hyphenBase = lib.head texlive.hyphen-base.pkgs; texLive = texlive.combined.scheme-full; in + allLanguages = let hyphenBase = texlive.pkgs.hyphen-base; texLive = texliveFull; in lib.recurseIntoAttrs { # language.def etex = mkTeXTest { @@ -289,9 +286,9 @@ rec { # test that language files are generated as expected hyphen-base = runCommand "texlive-test-hyphen-base" { - hyphenBase = lib.head texlive.hyphen-base.pkgs; - schemeFull = texlive.combined.scheme-full; - schemeInfraOnly = texlive.combined.scheme-infraonly; + hyphenBase = texlive.pkgs.hyphen-base; + schemeFull = texliveFull; + schemeInfraOnly = texliveInfraOnly; } '' mkdir -p "$out"/{scheme-infraonly,scheme-full} @@ -322,8 +319,8 @@ rec { # test that fmtutil.cnf is fully regenerated on scheme-full fmtutilCnf = runCommand "texlive-test-fmtutil.cnf" { - kpathsea = lib.head texlive.kpathsea.pkgs; - schemeFull = texlive.combined.scheme-full; + kpathsea = texlive.pkgs.kpathsea.tex; + schemeFull = texliveFull; } '' mkdir -p "$out" @@ -335,7 +332,7 @@ rec { # verify that the restricted mode gets enabled when # needed (detected by checking if it disallows --gscmd) repstopdf = runCommand "texlive-test-repstopdf" { - nativeBuildInputs = [ (texlive.combine { inherit (texlive) scheme-infraonly epstopdf; }) ]; + nativeBuildInputs = [ (texlive.withPackages (ps: [ ps.epstopdf ])) ]; } '' ! (epstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden >/dev/null (repstopdf --gscmd echo /dev/null 2>&1 || true) | grep forbidden >/dev/null @@ -345,7 +342,7 @@ rec { # verify that the restricted mode gets enabled when # needed (detected by checking if it disallows --gscmd) rpdfcrop = runCommand "texlive-test-rpdfcrop" { - nativeBuildInputs = [ (texlive.combine { inherit (texlive) scheme-infraonly pdfcrop; }) ]; + nativeBuildInputs = [ (texlive.withPackages (ps: [ ps.pdfcrop ])) ]; } '' ! (pdfcrop --gscmd echo $(command -v pdfcrop) 2>&1 || true) | grep 'restricted mode' >/dev/null (rpdfcrop --gscmd echo $(command -v pdfcrop) 2>&1 || true) | grep 'restricted mode' >/dev/null @@ -460,7 +457,7 @@ rec { runCommand "texlive-test-binaries" { inherit binaries contextTestTex latexTestTex texTestTex; - texliveScheme = texlive.combined.scheme-full; + texliveScheme = texliveFull; } '' loadables="$(command -v bash)" @@ -623,7 +620,7 @@ rec { (savedLicensesAttrNames scheme) != (correctLicensesAttrNames scheme); incorrectSchemes = lib.filterAttrs (n: hasLicenseMismatch) - texlive.combined; + (texlive.combined // texlive.schemes); prettyPrint = name: scheme: '' license info for ${name} is incorrect! Note that order is enforced. @@ -647,7 +644,7 @@ rec { # ease of testing fixedHashes = with lib; let fods = lib.concatMap - (p: lib.optional (p ? tex) p.tex + (p: lib.optional (p ? tex && isDerivation p.tex) p.tex ++ lib.optional (p ? texdoc) p.texdoc ++ lib.optional (p ? texsource) p.texsource ++ lib.optional (p ? tlpkg) p.tlpkg) |