various: fix eval

runCommandNoCC has been renamed to runCommand and the former has
recently been turned into a throw.
This commit is contained in:
Wolfgang Walther
2025-10-28 18:10:55 +01:00
parent 6691c568b0
commit c319ac6571
11 changed files with 16 additions and 17 deletions

View File

@@ -235,7 +235,7 @@ runCommand "test.pdf" { nativeBuildInputs = [ latex_with_foiltex ]; } ''
The font cache for LuaLaTeX is written to `$HOME`. The font cache for LuaLaTeX is written to `$HOME`.
Therefore, it is necessary to set `$HOME` to a writable path, e.g. [before using LuaLaTeX in nix derivations](https://github.com/NixOS/nixpkgs/issues/180639): Therefore, it is necessary to set `$HOME` to a writable path, e.g. [before using LuaLaTeX in nix derivations](https://github.com/NixOS/nixpkgs/issues/180639):
```nix ```nix
runCommandNoCC "lualatex-hello-world" { buildInputs = [ texliveFull ]; } '' runCommand "lualatex-hello-world" { buildInputs = [ texliveFull ]; } ''
mkdir $out mkdir $out
echo '\documentclass{article} \begin{document} Hello world \end{document}' > main.tex echo '\documentclass{article} \begin{document} Hello world \end{document}' > main.tex
env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex

View File

@@ -126,7 +126,7 @@ in
DNS.1 = ${config.networking.fqdn} DNS.1 = ${config.networking.fqdn}
''; '';
csrData = csrData =
pkgs.runCommandNoCC "csr-and-key" pkgs.runCommand "csr-and-key"
{ {
buildInputs = [ pkgs.openssl ]; buildInputs = [ pkgs.openssl ];
} }

View File

@@ -4,7 +4,7 @@ let
serverDomain = certs.domain; serverDomain = certs.domain;
# copy certs to store to work around mount namespacing # copy certs to store to work around mount namespacing
certsPath = pkgs.runCommandNoCC "snakeoil-certs" { } '' certsPath = pkgs.runCommand "snakeoil-certs" { } ''
mkdir $out mkdir $out
cp ${certs."${serverDomain}".cert} $out/snakeoil.crt cp ${certs."${serverDomain}".cert} $out/snakeoil.crt
cp ${certs."${serverDomain}".key} $out/snakeoil.key cp ${certs."${serverDomain}".key} $out/snakeoil.key

View File

@@ -8,7 +8,7 @@ let
}; };
# copy certs to store to work around mount namespacing # copy certs to store to work around mount namespacing
certsPath = pkgs.runCommandNoCC "snakeoil-certs" { } '' certsPath = pkgs.runCommand "snakeoil-certs" { } ''
mkdir $out mkdir $out
cp ${certs."${serverDomain}".cert} $out/snakeoil.crt cp ${certs."${serverDomain}".cert} $out/snakeoil.crt
cp ${certs."${serverDomain}".key} $out/snakeoil.key cp ${certs."${serverDomain}".key} $out/snakeoil.key

View File

@@ -3,7 +3,7 @@
feature, feature,
}: }:
pkgs.runCommandNoCC "${feature}-not-present" { } '' pkgs.runCommand "${feature}-not-present" { } ''
if [[ -e /${feature}-files ]]; then if [[ -e /${feature}-files ]]; then
echo "No ${feature} in requiredSystemFeatures, but /${feature}-files was mounted anyway" echo "No ${feature} in requiredSystemFeatures, but /${feature}-files was mounted anyway"
exit 1 exit 1

View File

@@ -3,7 +3,7 @@
feature, feature,
}: }:
pkgs.runCommandNoCC "${feature}-present" { requiredSystemFeatures = [ feature ]; } '' pkgs.runCommand "${feature}-present" { requiredSystemFeatures = [ feature ]; } ''
if [[ ! -e /${feature}-files ]]; then if [[ ! -e /${feature}-files ]]; then
echo "The host declares ${feature} support, but doesn't expose /${feature}-files" >&2 echo "The host declares ${feature} support, but doesn't expose /${feature}-files" >&2
exit 1 exit 1

View File

@@ -2,7 +2,6 @@
pkgs ? import <nixpkgs> { }, pkgs ? import <nixpkgs> { },
}: }:
pkgs.runCommandNoCC "nix-required-mounts-structured-attrs-no-features" { __structuredAttrs = true; } pkgs.runCommand "nix-required-mounts-structured-attrs-no-features" { __structuredAttrs = true; } ''
''
touch $out touch $out
'' ''

View File

@@ -3,7 +3,7 @@
feature, feature,
}: }:
pkgs.runCommandNoCC "${feature}-present-structured" pkgs.runCommand "${feature}-present-structured"
{ {
__structuredAttrs = true; __structuredAttrs = true;
requiredSystemFeatures = [ feature ]; requiredSystemFeatures = [ feature ];

View File

@@ -1,5 +1,5 @@
{ runCommandNoCC, doctoc }: { runCommand, doctoc }:
runCommandNoCC "doctoc-test-generates-valid-markdown.md" { nativeBuildInputs = [ doctoc ]; } '' runCommand "doctoc-test-generates-valid-markdown.md" { nativeBuildInputs = [ doctoc ]; } ''
cp ${./input.md} ./target.md && chmod +w ./target.md cp ${./input.md} ./target.md && chmod +w ./target.md
doctoc ./target.md doctoc ./target.md

View File

@@ -2,7 +2,7 @@
lib, lib,
file, file,
hare, hare,
runCommandNoCC, runCommand,
writeText, writeText,
}: }:
let let
@@ -13,7 +13,7 @@ let
export fn main() void = void; export fn main() void = void;
''; '';
in in
runCommandNoCC "${hare.pname}-cross-compilation-test" runCommand "${hare.pname}-cross-compilation-test"
{ {
nativeBuildInputs = [ nativeBuildInputs = [
hare hare

View File

@@ -1,6 +1,6 @@
{ {
hare, hare,
runCommandNoCC, runCommand,
writeText, writeText,
}: }:
let let
@@ -18,7 +18,7 @@ let
}; };
''; '';
in in
runCommandNoCC "mime-module-test" { nativeBuildInputs = [ hare ]; } '' runCommand "mime-module-test" { nativeBuildInputs = [ hare ]; } ''
HARECACHE="$(mktemp -d)" HARECACHE="$(mktemp -d)"
export HARECACHE export HARECACHE
readonly binout="test-bin" readonly binout="test-bin"