1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

treewide: runCommandNoCC -> runCommand

This has been synonymous for ~5y.
This commit is contained in:
Robert Hensing 2021-08-15 17:12:23 +02:00
parent 1359293549
commit fbafeb7ad5
36 changed files with 58 additions and 59 deletions

View file

@ -61,9 +61,9 @@ let
missingGithubIds = lib.concatLists (lib.mapAttrsToList checkMaintainer lib.maintainers);
success = pkgs.runCommandNoCC "checked-maintainers-success" {} ">$out";
success = pkgs.runCommand "checked-maintainers-success" {} ">$out";
failure = pkgs.runCommandNoCC "checked-maintainers-failure" {
failure = pkgs.runCommand "checked-maintainers-failure" {
nativeBuildInputs = [ pkgs.curl pkgs.jq ];
outputHash = "sha256:${lib.fakeSha256}";
outputHAlgo = "sha256";

View file

@ -3,7 +3,7 @@
pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; }
}:
pkgs.runCommandNoCC "nixpkgs-lib-tests" {
pkgs.runCommand "nixpkgs-lib-tests" {
buildInputs = [
pkgs.nix
(import ./check-eval.nix)

View file

@ -3,7 +3,7 @@ pkgs: with pkgs.lib;
rec {
# Copy configuration files to avoid having the entire sources in the system closure
copyFile = filePath: pkgs.runCommandNoCC (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} ''
copyFile = filePath: pkgs.runCommand (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} ''
cp ${filePath} $out
'';

View file

@ -42,7 +42,7 @@ let
# nslcd normally reads configuration from /etc/nslcd.conf.
# this file might contain secrets. We append those at runtime,
# so redirect its location to something more temporary.
nslcdWrapped = runCommandNoCC "nslcd-wrapped" { nativeBuildInputs = [ makeWrapper ]; } ''
nslcdWrapped = runCommand "nslcd-wrapped" { nativeBuildInputs = [ makeWrapper ]; } ''
mkdir -p $out/bin
makeWrapper ${nss_pam_ldapd}/sbin/nslcd $out/bin/nslcd \
--set LD_PRELOAD "${pkgs.libredirect}/lib/libredirect.so" \

View file

@ -190,7 +190,7 @@ in
protocols.source = pkgs.iana-etc + "/etc/protocols";
# /etc/hosts: Hostname-to-IP mappings.
hosts.source = pkgs.runCommandNoCC "hosts" {} ''
hosts.source = pkgs.runCommand "hosts" {} ''
cat ${escapeShellArgs cfg.hostFiles} > $out
'';

View file

@ -102,7 +102,7 @@ let
mkWrapperDrv = {
original, name, set ? {}
}:
pkgs.runCommandNoCC "${name}-wrapper" {
pkgs.runCommand "${name}-wrapper" {
buildInputs = [ pkgs.makeWrapper ];
} (with lib; ''
makeWrapper "${original}" "$out/bin/${name}" \

View file

@ -10,7 +10,7 @@ let
jsonType = (pkgs.formats.json {}).type;
configFile = pkgs.runCommandNoCC "matrix-appservice-irc.yml" {
configFile = pkgs.runCommand "matrix-appservice-irc.yml" {
# Because this program will be run at build time, we need `nativeBuildInputs`
nativeBuildInputs = [ (pkgs.python3.withPackages (ps: [ ps.pyyaml ps.jsonschema ])) ];
preferLocalBuild = true;

View file

@ -84,7 +84,7 @@ in
(rev: archs:
lib.attrsets.mapAttrsToList
(arch: image:
pkgs.runCommandNoCC "buildsrht-images" { } ''
pkgs.runCommand "buildsrht-images" { } ''
mkdir -p $out/${distro}/${rev}/${arch}
ln -s ${image}/*.qcow2 $out/${distro}/${rev}/${arch}/root.img.qcow2
'')
@ -97,7 +97,7 @@ in
"${pkgs.sourcehut.buildsrht}/lib/images"
];
};
image_dir = pkgs.runCommandNoCC "builds.sr.ht-worker-images" { } ''
image_dir = pkgs.runCommand "builds.sr.ht-worker-images" { } ''
mkdir -p $out/images
cp -Lr ${image_dir_pre}/* $out/images
'';

View file

@ -63,7 +63,7 @@ let
};
};
toYAML = name: attrs: pkgs.runCommandNoCC name {
toYAML = name: attrs: pkgs.runCommand name {
preferLocalBuild = true;
json = builtins.toFile "${name}.json" (builtins.toJSON attrs);
nativeBuildInputs = [ pkgs.remarshal ];

View file

@ -39,7 +39,7 @@ let
};
# Additional /etc/hosts entries for peers with an associated hostname
cjdnsExtraHosts = pkgs.runCommandNoCC "cjdns-hosts" {} ''
cjdnsExtraHosts = pkgs.runCommand "cjdns-hosts" {} ''
exec >$out
${concatStringsSep "\n" (mapAttrsToList (k: v:
optionalString (v.hostname != "")

View file

@ -281,7 +281,7 @@ in
createLocalPostgreSQL = databaseActuallyCreateLocally && cfg.database.type == "postgresql";
createLocalMySQL = databaseActuallyCreateLocally && cfg.database.type == "mysql";
mySqlCaKeystore = pkgs.runCommandNoCC "mysql-ca-keystore" {} ''
mySqlCaKeystore = pkgs.runCommand "mysql-ca-keystore" {} ''
${pkgs.jre}/bin/keytool -importcert -trustcacerts -alias MySQLCACert -file ${cfg.database.caCert} -keystore $out -storepass notsosecretpassword -noprompt
'';
@ -553,7 +553,7 @@ in
jbossCliScript = pkgs.writeText "jboss-cli-script" (mkJbossScript keycloakConfig');
keycloakConfig = pkgs.runCommandNoCC "keycloak-config" {
keycloakConfig = pkgs.runCommand "keycloak-config" {
nativeBuildInputs = [ cfg.package ];
} ''
export JBOSS_BASE_DIR="$(pwd -P)";

View file

@ -6,7 +6,7 @@ let
cfg = config.services.node-red;
defaultUser = "node-red";
finalPackage = if cfg.withNpmAndGcc then node-red_withNpmAndGcc else cfg.package;
node-red_withNpmAndGcc = pkgs.runCommandNoCC "node-red" {
node-red_withNpmAndGcc = pkgs.runCommand "node-red" {
nativeBuildInputs = [ pkgs.makeWrapper ];
}
''

View file

@ -9,7 +9,7 @@ let
podmanPackage = (pkgs.podman.override { inherit (cfg) extraPackages; });
# Provides a fake "docker" binary mapping to podman
dockerCompat = pkgs.runCommandNoCC "${podmanPackage.pname}-docker-compat-${podmanPackage.version}" {
dockerCompat = pkgs.runCommand "${podmanPackage.pname}-docker-compat-${podmanPackage.version}" {
outputs = [ "out" "man" ];
inherit (podmanPackage) meta;
} ''

View file

@ -1,6 +1,6 @@
import ./make-test-python.nix ({ lib, pkgs, ... }:
let
gpgKeyring = (pkgs.runCommandNoCC "gpg-keyring" { buildInputs = [ pkgs.gnupg ]; } ''
gpgKeyring = (pkgs.runCommand "gpg-keyring" { buildInputs = [ pkgs.gnupg ]; } ''
mkdir -p $out
export GNUPGHOME=$out
cat > foo <<EOF

View file

@ -162,7 +162,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
pleroma_ctl user new jamy jamy@nixos.test --password 'jamy-password' --moderator --admin -y
'';
tls-cert = pkgs.runCommandNoCC "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
tls-cert = pkgs.runCommand "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=pleroma.nixos.test' -days 36500
mkdir -p $out
cp key.pem cert.pem $out

View file

@ -43,7 +43,7 @@ let
return EXIT_SUCCESS;
}
'';
in pkgs.runCommandNoCC "mpitest" {} ''
in pkgs.runCommand "mpitest" {} ''
mkdir -p $out/bin
${pkgs.openmpi}/bin/mpicc ${mpitestC} -o $out/bin/mpitest
'';

View file

@ -33,7 +33,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
};
};
cert = pkgs.runCommandNoCC "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
cert = pkgs.runCommand "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=dns.example.local'
mkdir -p $out
cp key.pem cert.pem $out

View file

@ -1,5 +1,5 @@
let
cert = pkgs: pkgs.runCommandNoCC "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
cert = pkgs: pkgs.runCommand "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=example.com/CN=uploads.example.com/CN=conference.example.com' -days 36500
mkdir -p $out
cp key.pem cert.pem $out

View file

@ -1,4 +1,4 @@
{ appimageTools, fetchurl, lib, runCommandNoCC, stdenv, gsettings-desktop-schemas, gtk3, zlib }:
{ appimageTools, fetchurl, lib, runCommand, stdenv, gsettings-desktop-schemas, gtk3, zlib }:
let
name = "${pname}-${version}";
@ -12,7 +12,7 @@ let
inherit name;
src = appimage;
};
patched = runCommandNoCC "minetime-patchelf" {} ''
patched = runCommand "minetime-patchelf" {} ''
cp -av ${extracted} $out
x=$out/resources/app.asar.unpacked/services/scheduling/dist/MinetimeSchedulingService

View file

@ -3,7 +3,7 @@
, fetchFromGitea
, fetchurl
, fetchpatch
, runCommandNoCC
, runCommand
, fcft
, freetype
, pixman
@ -54,7 +54,7 @@ let
'';
};
stimuliFile = runCommandNoCC "pgo-stimulus-file" { } ''
stimuliFile = runCommand "pgo-stimulus-file" { } ''
${stimulusGenerator} \
--rows=67 --cols=135 \
--scroll --scroll-region \

View file

@ -1,4 +1,4 @@
{ runCommandNoCC, lib, makeWrapper, wayfirePlugins }:
{ runCommand, lib, makeWrapper, wayfirePlugins }:
let
inherit (lib) escapeShellArg makeBinPath;
@ -17,7 +17,7 @@ let
plugins = choosePlugins wayfirePlugins;
in
runCommandNoCC "${application.name}-wrapped" {
runCommand "${application.name}-wrapped" {
nativeBuildInputs = [ makeWrapper ];
passthru = application.passthru // {

View file

@ -1,6 +1,6 @@
# Builder for Agda packages.
{ stdenv, lib, self, Agda, runCommandNoCC, makeWrapper, writeText, ghcWithPackages, nixosTests }:
{ stdenv, lib, self, Agda, runCommand, makeWrapper, writeText, ghcWithPackages, nixosTests }:
with lib.strings;
@ -15,7 +15,7 @@ let
'';
pname = "agdaWithPackages";
version = Agda.version;
in runCommandNoCC "${pname}-${version}" {
in runCommand "${pname}-${version}" {
inherit pname version;
nativeBuildInputs = [ makeWrapper ];
passthru = {

View file

@ -463,7 +463,7 @@ rec {
layeredStoreSymlink =
let
target = pkgs.writeTextDir "dir/target" "Content doesn't matter.";
symlink = pkgs.runCommandNoCC "symlink" {} "ln -s ${target} $out";
symlink = pkgs.runCommand "symlink" {} "ln -s ${target} $out";
in
pkgs.dockerTools.buildLayeredImage {
name = "layeredstoresymlink";

View file

@ -1,5 +1,5 @@
{ runCommandNoCC }:
{ runCommand }:
runCommandNoCC "nuget-to-nix" { preferLocalBuild = true; } ''
runCommand "nuget-to-nix" { preferLocalBuild = true; } ''
install -D -m755 ${./nuget-to-nix.sh} $out/bin/nuget-to-nix
''

View file

@ -1,8 +1,8 @@
{ lib, runCommandNoCC, powerline }:
{ lib, runCommand, powerline }:
let
inherit (powerline) version;
in runCommandNoCC "powerline-symbols-${version}" {
in runCommand "powerline-symbols-${version}" {
meta = {
inherit (powerline.meta) license;
priority = (powerline.meta.priority or 0) + 1;

View file

@ -7,7 +7,6 @@
, fetchgit
, makeWrapper
, runCommand
, runCommandNoCC
, llvmPackages_5
, glibc
, ncurses
@ -85,7 +84,7 @@ let
# https://github.com/root-project/cling/blob/v0.7/lib/Interpreter/CIFactory.cpp#L107:L111
# Note: it would be nice to just put the compiler in Cling's PATH and let it do this by itself, but
# unfortunately passing -nostdinc/-nostdinc++ disables Cling's autodetection logic.
compilerIncludeFlags = runCommandNoCC "compiler-include-flags.txt" {} ''
compilerIncludeFlags = runCommand "compiler-include-flags.txt" {} ''
export LC_ALL=C
${stdenv.cc}/bin/c++ -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,''${' -e '/^ \/.*++/p' -e '}' > tmp
sed -e 's/^/-isystem /' -i tmp

View file

@ -1,4 +1,4 @@
{ interpreter, writeText, runCommandNoCC }:
{ interpreter, writeText, runCommand }:
let
@ -19,7 +19,7 @@ let
print(s)
'';
in runCommandNoCC "${interpreter.name}-site-prefix-mypy-test" {} ''
in runCommand "${interpreter.name}-site-prefix-mypy-test" {} ''
${pythonEnv}/bin/mypy ${pythonScript}
touch $out
''

View file

@ -1,5 +1,5 @@
{ lib, stdenv
, runCommandNoCC
, runCommand
, fetchurl
, fetchpatch
, perl
@ -172,7 +172,7 @@ stdenv.mkDerivation rec {
# (We pick just that one because using the other headers from `sdk` is not
# compatible with our C++ standard library. This header is already in
# the standard library on aarch64)
runCommandNoCC "${pname}_headers" {} ''
runCommand "${pname}_headers" {} ''
install -Dm444 "${lib.getDev apple_sdk.sdk}"/include/libproc.h "$out"/include/libproc.h
''
) ++ lib.optionals stdenv.isLinux [

View file

@ -27,7 +27,7 @@ let
(lib.generators.toINI { } pyProject.tool.poetry.plugins);
# A python package that contains simple .egg-info and .pth files for an editable installation
editablePackage = python.pkgs.toPythonModule (pkgs.runCommandNoCC "${name}-editable"
editablePackage = python.pkgs.toPythonModule (pkgs.runCommand "${name}-editable"
{ } ''
mkdir -p "$out/${python.sitePackages}"
cd "$out/${python.sitePackages}"

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fetchzip, makeWrapper, runCommandNoCC, makeDesktopItem
{ lib, stdenv, fetchurl, fetchzip, makeWrapper, runCommand, makeDesktopItem
, xonotic-data, copyDesktopItems
, # required for both
unzip, libjpeg, zlib, libvorbis, curl
@ -130,7 +130,7 @@ in rec {
passthru.version = version;
};
xonotic = runCommandNoCC "xonotic${variant}-${version}" {
xonotic = runCommand "xonotic${variant}-${version}" {
inherit xonotic-unwrapped;
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
desktopItems = [ desktopItem ];

View file

@ -38,7 +38,7 @@ rec {
};
in valueType;
generate = name: value: pkgs.runCommandNoCC name {
generate = name: value: pkgs.runCommand name {
nativeBuildInputs = [ pkgs.jq ];
value = builtins.toJSON value;
passAsFile = [ "value" ];
@ -121,7 +121,7 @@ rec {
};
in valueType;
generate = name: value: pkgs.runCommandNoCC name {
generate = name: value: pkgs.runCommand name {
nativeBuildInputs = [ pkgs.remarshal ];
value = builtins.toJSON value;
passAsFile = [ "value" ];

View file

@ -14,7 +14,7 @@ let
}) [ def ]);
in formatSet.generate "test-format-file" config;
runBuildTest = name: { drv, expected }: pkgs.runCommandNoCC name {} ''
runBuildTest = name: { drv, expected }: pkgs.runCommand name {} ''
if diff -u '${builtins.toFile "expected" expected}' '${drv}'; then
touch "$out"
else

View file

@ -50,7 +50,7 @@ in
repo = "ngx_brotli";
rev = "25f86f0bac1101b6512135eac5f93c49c63609e3";
sha256 = "02hfvfa6milj40qc2ikpb9f95sxqvxk4hly3x74kqhysbdi06hhv";
}; in pkgs.runCommandNoCC "ngx_brotli-src" {} ''
}; in pkgs.runCommand "ngx_brotli-src" {} ''
cp -a ${gitsrc} $out
substituteInPlace $out/filter/config \
--replace '$ngx_addon_dir/deps/brotli/c' ${lib.getDev pkgs.brotli}

View file

@ -1,4 +1,4 @@
{ stdenv, makeWrapper, runCommandNoCC, lib, nixosTests, writeShellScript
{ stdenv, makeWrapper, runCommand, lib, nixosTests, writeShellScript
, fetchFromGitHub, bundlerEnv, callPackage
, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk
@ -78,7 +78,7 @@ let
'';
});
rake = runCommandNoCC "discourse-rake" {
rake = runCommand "discourse-rake" {
nativeBuildInputs = [ makeWrapper ];
} ''
mkdir -p $out/bin

View file

@ -1,7 +1,7 @@
{ lib, runCommandNoCC, fetchurl, file, texlive, writeShellScript }:
{ lib, runCommand, fetchurl, file, texlive, writeShellScript }:
{
chktex = runCommandNoCC "texlive-test-chktex" {
chktex = runCommand "texlive-test-chktex" {
nativeBuildInputs = [
(with texlive; combine { inherit scheme-infraonly chktex; })
];
@ -18,7 +18,7 @@
dvipng = lib.recurseIntoAttrs {
# https://github.com/NixOS/nixpkgs/issues/75605
basic = runCommandNoCC "texlive-test-dvipng-basic" {
basic = runCommand "texlive-test-dvipng-basic" {
nativeBuildInputs = [ file texlive.combined.scheme-medium ];
input = fetchurl {
name = "test_dvipng.tex";
@ -40,7 +40,7 @@
'';
# test dvipng's limited capability to render postscript specials via GS
ghostscript = runCommandNoCC "texlive-test-ghostscript" {
ghostscript = runCommand "texlive-test-ghostscript" {
nativeBuildInputs = [ file (with texlive; combine { inherit scheme-small dvipng; }) ];
input = builtins.toFile "postscript-sample.tex" ''
\documentclass{minimal}
@ -81,7 +81,7 @@
};
# https://github.com/NixOS/nixpkgs/issues/75070
dvisvgm = runCommandNoCC "texlive-test-dvisvgm" {
dvisvgm = runCommand "texlive-test-dvisvgm" {
nativeBuildInputs = [ file texlive.combined.scheme-medium ];
input = builtins.toFile "dvisvgm-sample.tex" ''
\documentclass{article}
@ -106,7 +106,7 @@
mv document*.svg "$out"/
'';
texdoc = runCommandNoCC "texlive-test-texdoc" {
texdoc = runCommand "texlive-test-texdoc" {
nativeBuildInputs = [
(with texlive; combine {
inherit scheme-infraonly luatex texdoc;
@ -121,7 +121,7 @@
'';
# test that language files are generated as expected
hyphen-base = runCommandNoCC "texlive-test-hyphen-base" {
hyphen-base = runCommand "texlive-test-hyphen-base" {
hyphenBase = lib.head texlive.hyphen-base.pkgs;
schemeFull = texlive.combined.scheme-full;
schemeInfraOnly = texlive.combined.scheme-infraonly;
@ -154,7 +154,7 @@
'';
# test that fmtutil.cnf is fully regenerated on scheme-full
fmtutilCnf = runCommandNoCC "texlive-test-fmtutil.cnf" {
fmtutilCnf = runCommand "texlive-test-fmtutil.cnf" {
kpathsea = lib.head texlive.kpathsea.pkgs;
schemeFull = texlive.combined.scheme-full;
} ''

View file

@ -1,6 +1,6 @@
{ runCommandNoCC, openssh }:
{ runCommand, openssh }:
runCommandNoCC "ssh-copy-id-${openssh.version}" {
runCommand "ssh-copy-id-${openssh.version}" {
meta = openssh.meta // {
description = "A tool to copy SSH public keys to a remote machine";
priority = (openssh.meta.priority or 0) - 1;