mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
Replace runCommandNoCCLocal alias with runCommandLocal
This commit is contained in:
parent
bc87d91273
commit
d608bccddd
12 changed files with 29 additions and 29 deletions
|
@ -238,7 +238,7 @@ in
|
||||||
|
|
||||||
build.test =
|
build.test =
|
||||||
assert lib.assertMsg (cfg.runNvim -> cfg.buildNixvim) "`test.runNvim` requires `test.buildNixvim`.";
|
assert lib.assertMsg (cfg.runNvim -> cfg.buildNixvim) "`test.runNvim` requires `test.buildNixvim`.";
|
||||||
pkgs.runCommandNoCCLocal cfg.name
|
pkgs.runCommandLocal cfg.name
|
||||||
{
|
{
|
||||||
nativeBuildInputs = lib.optionals cfg.buildNixvim [
|
nativeBuildInputs = lib.optionals cfg.buildNixvim [
|
||||||
config.build.packageUnchecked
|
config.build.packageUnchecked
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
linkFarm,
|
linkFarm,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
mkTestDerivationFromNixvimModule,
|
mkTestDerivationFromNixvimModule,
|
||||||
makeNixvimWithModule,
|
makeNixvimWithModule,
|
||||||
}:
|
}:
|
||||||
|
@ -21,7 +21,7 @@ let
|
||||||
let
|
let
|
||||||
nvim = makeNixvimWithModule { inherit pkgs module; };
|
nvim = makeNixvimWithModule { inherit pkgs module; };
|
||||||
in
|
in
|
||||||
runCommandNoCCLocal "enable-except-in-tests-not-in-test"
|
runCommandLocal "enable-except-in-tests-not-in-test"
|
||||||
{ printConfig = "${nvim}/bin/nixvim-print-init"; }
|
{ printConfig = "${nvim}/bin/nixvim-print-init"; }
|
||||||
''
|
''
|
||||||
if ! "$printConfig" | grep 'require("image").setup'; then
|
if ! "$printConfig" | grep 'require("image").setup'; then
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
makeNixvimWithModule,
|
makeNixvimWithModule,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
firstStage = makeNixvimWithModule {
|
firstStage = makeNixvimWithModule {
|
||||||
|
@ -13,7 +13,7 @@ let
|
||||||
|
|
||||||
generated = secondStage.extend { extraConfigLua = "-- third stage"; };
|
generated = secondStage.extend { extraConfigLua = "-- third stage"; };
|
||||||
in
|
in
|
||||||
runCommandNoCCLocal "extend-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
|
runCommandLocal "extend-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
|
||||||
config=$($printConfig)
|
config=$($printConfig)
|
||||||
for stage in "first" "second" "third"; do
|
for stage in "first" "second" "third"; do
|
||||||
if ! "$printConfig" | grep -q -- "-- $stage stage"; then
|
if ! "$printConfig" | grep -q -- "-- $stage stage"; then
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
makeNixvimWithModule,
|
makeNixvimWithModule,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
defaultModule =
|
defaultModule =
|
||||||
|
@ -31,7 +31,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
runCommandNoCCLocal "special-arg-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
|
runCommandLocal "special-arg-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
|
||||||
config=$($printConfig)
|
config=$($printConfig)
|
||||||
if ! "$printConfig" | grep -- '-- regularArg=regularValue'; then
|
if ! "$printConfig" | grep -- '-- regularArg=regularValue'; then
|
||||||
echo "Missing regularArg in config"
|
echo "Missing regularArg in config"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
makeNixvimWithModule,
|
makeNixvimWithModule,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
extraFiles = {
|
extraFiles = {
|
||||||
|
@ -15,7 +15,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
runCommandNoCCLocal "extra-files-test"
|
runCommandLocal "extra-files-test"
|
||||||
{
|
{
|
||||||
root = build.config.build.extraFiles;
|
root = build.config.build.extraFiles;
|
||||||
files = builtins.attrNames extraFiles;
|
files = builtins.attrNames extraFiles;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
linkFarmFromDrvs,
|
linkFarmFromDrvs,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
mkTestDerivationFromNixvimModule,
|
mkTestDerivationFromNixvimModule,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -10,7 +10,7 @@ let
|
||||||
args: pkgs.testers.testBuildFailure (mkTestDerivationFromNixvimModule ({ inherit pkgs; } // args));
|
args: pkgs.testers.testBuildFailure (mkTestDerivationFromNixvimModule ({ inherit pkgs; } // args));
|
||||||
in
|
in
|
||||||
linkFarmFromDrvs "failing-tests" [
|
linkFarmFromDrvs "failing-tests" [
|
||||||
(runCommandNoCCLocal "fail-running-nvim"
|
(runCommandLocal "fail-running-nvim"
|
||||||
{
|
{
|
||||||
failed = mkFailingNixvimTest {
|
failed = mkFailingNixvimTest {
|
||||||
name = "prints-hello-world";
|
name = "prints-hello-world";
|
||||||
|
@ -27,7 +27,7 @@ linkFarmFromDrvs "failing-tests" [
|
||||||
touch $out
|
touch $out
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
(runCommandNoCCLocal "fail-on-warnings"
|
(runCommandLocal "fail-on-warnings"
|
||||||
{
|
{
|
||||||
failed = mkFailingNixvimTest {
|
failed = mkFailingNixvimTest {
|
||||||
name = "warns-hello-world";
|
name = "warns-hello-world";
|
||||||
|
@ -45,7 +45,7 @@ linkFarmFromDrvs "failing-tests" [
|
||||||
touch $out
|
touch $out
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
(runCommandNoCCLocal "fail-on-assertions"
|
(runCommandLocal "fail-on-assertions"
|
||||||
{
|
{
|
||||||
failed = mkFailingNixvimTest {
|
failed = mkFailingNixvimTest {
|
||||||
name = "asserts-hello-world";
|
name = "asserts-hello-world";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
pkgs,
|
pkgs,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -100,7 +100,7 @@ let
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
runCommandNoCCLocal "generated-sources-test"
|
runCommandLocal "generated-sources-test"
|
||||||
{
|
{
|
||||||
__structuredAttrs = true;
|
__structuredAttrs = true;
|
||||||
inherit errors;
|
inherit errors;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
helpers,
|
helpers,
|
||||||
lib,
|
lib,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
writeText,
|
writeText,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -493,9 +493,9 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if results == [ ] then
|
if results == [ ] then
|
||||||
runCommandNoCCLocal "lib-tests-success" { } "touch $out"
|
runCommandLocal "lib-tests-success" { } "touch $out"
|
||||||
else
|
else
|
||||||
runCommandNoCCLocal "lib-tests-failure"
|
runCommandLocal "lib-tests-failure"
|
||||||
{
|
{
|
||||||
results = lib.concatStringsSep "\n" (
|
results = lib.concatStringsSep "\n" (
|
||||||
builtins.map (result: ''
|
builtins.map (result: ''
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
nixvimConfiguration,
|
nixvimConfiguration,
|
||||||
stdenv,
|
stdenv,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
name ? "lsp-all-servers",
|
name ? "lsp-all-servers",
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -101,7 +101,7 @@ in
|
||||||
# This fails on darwin
|
# This fails on darwin
|
||||||
# See https://github.com/NixOS/nix/issues/4119
|
# See https://github.com/NixOS/nix/issues/4119
|
||||||
if stdenv.isDarwin then
|
if stdenv.isDarwin then
|
||||||
runCommandNoCCLocal name { } ''
|
runCommandLocal name { } ''
|
||||||
touch $out
|
touch $out
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
nixpkgsLib,
|
nixpkgsLib,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) attrNames filter length;
|
inherit (lib) attrNames filter length;
|
||||||
|
@ -10,7 +10,7 @@ let
|
||||||
duplicates = filter (name: nixpkgsList ? ${name}) (attrNames nixvimList);
|
duplicates = filter (name: nixpkgsList ? ${name}) (attrNames nixvimList);
|
||||||
count = length duplicates;
|
count = length duplicates;
|
||||||
in
|
in
|
||||||
runCommandNoCCLocal "maintainers-test" { inherit count duplicates; } ''
|
runCommandLocal "maintainers-test" { inherit count duplicates; } ''
|
||||||
if [ $count -gt 0 ]; then
|
if [ $count -gt 0 ]; then
|
||||||
echo "$count nixvim maintainers are also nixpkgs maintainers:"
|
echo "$count nixvim maintainers are also nixpkgs maintainers:"
|
||||||
for name in $duplicates; do
|
for name in $duplicates; do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
nixvimConfiguration,
|
nixvimConfiguration,
|
||||||
lib,
|
lib,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
|
@ -47,7 +47,7 @@ let
|
||||||
|| match ''pkgs[.].*'' (opt.defaultText.text or "") == null
|
|| match ''pkgs[.].*'' (opt.defaultText.text or "") == null
|
||||||
) drvOptions;
|
) drvOptions;
|
||||||
in
|
in
|
||||||
runCommandNoCCLocal "validate-package-options"
|
runCommandLocal "validate-package-options"
|
||||||
{
|
{
|
||||||
# Use structuredAttrs to avoid "Argument List Too Long" errors
|
# Use structuredAttrs to avoid "Argument List Too Long" errors
|
||||||
# and get proper bash array support.
|
# and get proper bash array support.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
nixvimConfiguration,
|
nixvimConfiguration,
|
||||||
linkFarmFromDrvs,
|
linkFarmFromDrvs,
|
||||||
runCommandNoCCLocal,
|
runCommandLocal,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
by-name = ../plugins/by-name;
|
by-name = ../plugins/by-name;
|
||||||
|
@ -54,7 +54,7 @@ let
|
||||||
in
|
in
|
||||||
linkFarmFromDrvs "plugins-by-name" [
|
linkFarmFromDrvs "plugins-by-name" [
|
||||||
# Ensures all files matching `plugins/by-name/*` are directories
|
# Ensures all files matching `plugins/by-name/*` are directories
|
||||||
(runCommandNoCCLocal "file-types"
|
(runCommandLocal "file-types"
|
||||||
{
|
{
|
||||||
__structuredAttrs = true;
|
__structuredAttrs = true;
|
||||||
inherit (children) regular symlink unknown;
|
inherit (children) regular symlink unknown;
|
||||||
|
@ -88,7 +88,7 @@ linkFarmFromDrvs "plugins-by-name" [
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check default.nix files exist for each directory
|
# Check default.nix files exist for each directory
|
||||||
(runCommandNoCCLocal "default-nix-exists"
|
(runCommandLocal "default-nix-exists"
|
||||||
{
|
{
|
||||||
__structuredAttrs = true;
|
__structuredAttrs = true;
|
||||||
missingPlugins = builtins.filter (
|
missingPlugins = builtins.filter (
|
||||||
|
@ -127,7 +127,7 @@ linkFarmFromDrvs "plugins-by-name" [
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ensures all plugin enable options are declared in a directory matching the plugin name
|
# Ensures all plugin enable options are declared in a directory matching the plugin name
|
||||||
(runCommandNoCCLocal "mismatched-plugin-names"
|
(runCommandLocal "mismatched-plugin-names"
|
||||||
{
|
{
|
||||||
__structuredAttrs = true;
|
__structuredAttrs = true;
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ linkFarmFromDrvs "plugins-by-name" [
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ensure all plugin enable option are declared under an expected namespace
|
# Ensure all plugin enable option are declared under an expected namespace
|
||||||
(runCommandNoCCLocal "unknown-plugin-namespaces"
|
(runCommandLocal "unknown-plugin-namespaces"
|
||||||
{
|
{
|
||||||
__structuredAttrs = true;
|
__structuredAttrs = true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue