Merge pull request #316763 from tie/texlive-output

texlivePackages: fix symlimk creation condition
This commit is contained in:
Dmitry Kalinkin 2024-06-04 13:38:20 -04:00 committed by GitHub
commit 3e2dc76af1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -83,12 +83,13 @@ Release 23.11 ships with a new interface that will eventually replace `texlive.c
```nix
stdenvNoCC.mkDerivation rec {
src = texlive.pkgs.iwona;
dontUnpack = true;
inherit (src) pname version;
installPhase = ''
runHook preInstall
install -Dm644 fonts/opentype/nowacki/iwona/*.otf -t $out/share/fonts/opentype
install -Dm644 $src/fonts/opentype/nowacki/iwona/*.otf -t $out/share/fonts/opentype
runHook postInstall
'';
}

View File

@ -4,11 +4,12 @@ stdenvNoCC.mkDerivation rec {
inherit (src) pname version;
src = texlive.pkgs.iwona;
dontUnpack = true;
installPhase = ''
runHook preInstall
install -Dm644 fonts/opentype/nowacki/iwona/*.otf -t $out/share/fonts/opentype
install -Dm644 $src/fonts/opentype/nowacki/iwona/*.otf -t $out/share/fonts/opentype
runHook postInstall
'';

View File

@ -233,7 +233,7 @@ let
# if the container is missing (that is, outputs == [ ]), create a file, to prevent passing the package to .withPackages
''
for outputName in ''${!outputs[@]} ; do
if [[ -z ''${outputDrvs[$outputName]} ]] ; then
if [[ -n ''${outputDrvs[$outputName]} ]] ; then
ln -s "''${outputDrvs[$outputName]}" "''${outputs[$outputName]}"
else
touch "''${outputs[$outputName]}"