diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-07-23 09:26:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-07-23 09:26:00 +0000 |
commit | ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d (patch) | |
tree | 504b28a058661f6c1cbb7d3f580020e50367ca7f /nixpkgs/pkgs/test | |
parent | 55cc63c079f49e81d695a25bc2f5b3902f2bd290 (diff) | |
parent | b09661d41fb93562fd53f31574dbf781b130ac44 (diff) | |
download | nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.gz nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.bz2 nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.lz nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.xz nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.zst nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.zip |
Merge commit 'b09661d41fb93562fd53f31574dbf781b130ac44'
Diffstat (limited to 'nixpkgs/pkgs/test')
-rw-r--r-- | nixpkgs/pkgs/test/haskell/default.nix | 1 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/haskell/documentationTarball/default.nix | 6 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/haskell/setBuildTarget/default.nix | 7 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/haskell/shellFor/default.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/haskell/writers/default.nix | 26 | ||||
-rw-r--r-- | nixpkgs/pkgs/test/texlive/default.nix | 45 |
6 files changed, 87 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/test/haskell/default.nix b/nixpkgs/pkgs/test/haskell/default.nix index eb389f4051f8..03e4f3461558 100644 --- a/nixpkgs/pkgs/test/haskell/default.nix +++ b/nixpkgs/pkgs/test/haskell/default.nix @@ -4,4 +4,5 @@ lib.recurseIntoAttrs { shellFor = callPackage ./shellFor { }; documentationTarball = callPackage ./documentationTarball { }; setBuildTarget = callPackage ./setBuildTarget { }; + writers = callPackage ./writers { }; } diff --git a/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix b/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix index aec3dc41f268..e3214fb49fed 100644 --- a/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix +++ b/nixpkgs/pkgs/test/haskell/documentationTarball/default.nix @@ -4,7 +4,11 @@ let drv = haskellPackages.vector; docs = pkgs.haskell.lib.documentationTarball drv; -in pkgs.runCommand "test haskell.lib.documentationTarball" { } '' +in pkgs.runCommand "test haskell.lib.documentationTarball" { + meta = { + inherit (docs.meta) platforms; + }; +} '' tar xvzf "${docs}/${drv.name}-docs.tar.gz" # Check for Haddock html diff --git a/nixpkgs/pkgs/test/haskell/setBuildTarget/default.nix b/nixpkgs/pkgs/test/haskell/setBuildTarget/default.nix index b1335e2a74cf..5a8391d08861 100644 --- a/nixpkgs/pkgs/test/haskell/setBuildTarget/default.nix +++ b/nixpkgs/pkgs/test/haskell/setBuildTarget/default.nix @@ -30,7 +30,12 @@ let fi ''; -in pkgs.runCommand "test haskell.lib.setBuildTarget" {} '' +in +pkgs.runCommand "test haskell.lib.setBuildTarget" { + meta = { + inherit (drv.meta) platforms; + }; +} '' ${test "foo" "bar"} ${test "bar" "foo"} touch "$out" diff --git a/nixpkgs/pkgs/test/haskell/shellFor/default.nix b/nixpkgs/pkgs/test/haskell/shellFor/default.nix index 37ad2e90d89e..04f5e0453619 100644 --- a/nixpkgs/pkgs/test/haskell/shellFor/default.nix +++ b/nixpkgs/pkgs/test/haskell/shellFor/default.nix @@ -29,5 +29,8 @@ additionalMaintainers = with lib.maintainers; [ cdepillabout ]; allMaintainers = oldMaintainers ++ additionalMaintainers; in - oldMeta // { maintainers = allMaintainers; }; + oldMeta // { + maintainers = allMaintainers; + inherit (cabal-install.meta) platforms; + }; }) diff --git a/nixpkgs/pkgs/test/haskell/writers/default.nix b/nixpkgs/pkgs/test/haskell/writers/default.nix new file mode 100644 index 000000000000..f05fda4bc736 --- /dev/null +++ b/nixpkgs/pkgs/test/haskell/writers/default.nix @@ -0,0 +1,26 @@ +# Wrap only the haskell-related tests from tests.writers +# in their own derivation for Hydra CI in the haskell-updates +# jobset. Can presumably removed as soon as tests.writers is +# always green on darwin as well: +# https://github.com/NixOS/nixpkgs/issues/126182 +{ runCommand, tests }: + +let + inherit (tests.writers) + writeTest + bin + simple + path + ; +in + +runCommand "test-haskell-writers" { + meta = { + inherit (tests.writers.meta) platforms; + }; +} '' + ${writeTest "success" "test-haskell-bin-writer" "${bin.haskell}/bin/${bin.haskell.name}"} + ${writeTest "success" "test-haskell-simple-writer" simple.haskell} + ${writeTest "success" "test-haskell-path-writer" path.haskell} + touch $out +'' diff --git a/nixpkgs/pkgs/test/texlive/default.nix b/nixpkgs/pkgs/test/texlive/default.nix index 86c0a7f795b7..2444334f5268 100644 --- a/nixpkgs/pkgs/test/texlive/default.nix +++ b/nixpkgs/pkgs/test/texlive/default.nix @@ -119,4 +119,49 @@ texdoc --debug --list texdoc | tee "$out" grep texdoc.pdf "$out" ''; + + # test that language files are generated as expected + hyphen-base = runCommandNoCC "texlive-test-hyphen-base" { + hyphenBase = lib.head texlive.hyphen-base.pkgs; + schemeFull = texlive.combined.scheme-full; + schemeInfraOnly = texlive.combined.scheme-infraonly; + } '' + mkdir -p "$out"/{scheme-infraonly,scheme-full} + + # create language files with no hyphenation patterns + cat "$hyphenBase"/tex/generic/config/language.us >language.dat + cat "$hyphenBase"/tex/generic/config/language.us.def >language.def + cat "$hyphenBase"/tex/generic/config/language.us.lua >language.dat.lua + + cat >>language.dat.lua <<EOF + } + EOF + + cat >>language.def <<EOF + %%% No changes may be made beyond this point. + + \uselanguage {USenglish} %%% This MUST be the last line of the file. + EOF + + for fname in language.{dat,def,dat.lua} ; do + diff --ignore-matching-lines='^\(%\|--\) Generated by ' -u \ + {"$hyphenBase","$schemeFull"/share/texmf}/tex/generic/config/"$fname" \ + | tee "$out/scheme-full/$fname.patch" + diff --ignore-matching-lines='^\(%\|--\) Generated by ' -u \ + {,"$schemeInfraOnly"/share/texmf/tex/generic/config/}"$fname" \ + | tee "$out/scheme-infraonly/$fname.patch" + done + ''; + + # test that fmtutil.cnf is fully regenerated on scheme-full + fmtutilCnf = runCommandNoCC "texlive-test-fmtutil.cnf" { + kpathsea = lib.head texlive.kpathsea.pkgs; + schemeFull = texlive.combined.scheme-full; + } '' + mkdir -p "$out" + + diff --ignore-matching-lines='^# Generated by ' -u \ + {"$kpathsea","$schemeFull"/share/texmf}/web2c/fmtutil.cnf \ + | tee "$out/fmtutil.cnf.patch" + ''; } |