1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-08-15 15:00:28 +03:00

treewide: runCommandNoCC -> runCommand

*sighs*
This commit is contained in:
Samuel Dionne-Riel 2022-09-26 23:42:22 -04:00
parent 09e388c422
commit 1754276528
41 changed files with 75 additions and 75 deletions

View File

@ -1,7 +1,7 @@
{ lib, runCommandNoCC, mobile-nixos }:
{ lib, runCommand, mobile-nixos }:
let
assets = runCommandNoCC "boot-error-assets" {} ''
assets = runCommand "boot-error-assets" {} ''
mkdir -p $out
cp ${../../artwork/sad.svg} $out/sad.svg
'';

View File

@ -1,4 +1,4 @@
{ lib, runCommandNoCC, mobile-nixos }:
{ lib, runCommand, mobile-nixos }:
mobile-nixos.mkLVGUIApp {
name = "boot-recovery-menu.mrb";

View File

@ -1,7 +1,7 @@
{ lib, runCommandNoCC, mobile-nixos }:
{ lib, runCommand, mobile-nixos }:
let
assets = runCommandNoCC "boot-splash-assets" {} ''
assets = runCommand "boot-splash-assets" {} ''
mkdir -p $out
cp ${../../artwork/logo/logo.white.svg} $out/logo.svg
'';

View File

@ -1,10 +1,10 @@
{ lib
, runCommandNoCC
, runCommand
, firmwareLinuxNonfree
}:
# The minimum set of firmware files required for the device.
runCommandNoCC "asus-dumo-firmware" {
runCommand "asus-dumo-firmware" {
src = firmwareLinuxNonfree;
} ''
for firmware in \

View File

@ -1,4 +1,4 @@
{ lib, runCommandNoCC, fetchFromGitHub, fetchurl }:
{ lib, runCommand, fetchFromGitHub, fetchurl }:
let
# This is a known good dump of the files as present on a running LineageOS system.
@ -15,7 +15,7 @@ let
sha256 = "16g5qgvxc3j2ra76hs4ff7h97i7wvk26kg0wbdb6l6qj0i7vml1h";
};
in
runCommandNoCC "asus-z00t-firmware" {
runCommand "asus-z00t-firmware" {
inherit src cfg;
meta.license = [
# We make no claims that it can be redistributed.

View File

@ -1,5 +1,5 @@
{ lib
, runCommandNoCC
, runCommand
, fetchurl
, fetchgit
, unzip
@ -13,7 +13,7 @@ let
url = "https://dl.google.com/dl/android/aosp/marlin-${buildID}-factory-bef66533.zip";
sha256 = "bef6653301371b66bd7fca968cf52013c0bf6862f0c7a70a275b0f0d45ab3888";
};
in runCommandNoCC "google-marlin-firmware" {
in runCommand "google-marlin-firmware" {
nativeBuildInputs = [ unzip e2fsprogs simg2img ];
meta.license = [
# We make no claims that it can be redistributed.

View File

@ -1,5 +1,5 @@
{ lib
, runCommandNoCC
, runCommand
, fetchFromGitHub
, fetchurl
, modem ? builtins.throw ''
@ -35,7 +35,7 @@ let
inherit sha256;
};
in
runCommandNoCC "motorola-addison-firmware" {
runCommand "motorola-addison-firmware" {
inherit modem cfg dict nv;
meta.license = [
# We make no claims that it can be redistributed.

View File

@ -1,5 +1,5 @@
{ lib
, runCommandNoCC
, runCommand
, fetchFromGitHub
, fetchurl
, modem ? builtins.throw ''
@ -35,7 +35,7 @@ let
inherit sha256;
};
in
runCommandNoCC "motorola-potter-firmware" {
runCommand "motorola-potter-firmware" {
inherit modem cfg dict nv;
meta.license = [
# We make no claims that it can be redistributed.

View File

@ -1,5 +1,5 @@
{ lib
, runCommandNoCC
, runCommand
, fetchurl
, fetchgit
, unzip
@ -15,7 +15,7 @@ let
url = "https://archive.org/download/xt-2045-3-rav-retus-10-qpjs-30.131-61-8-subsidy-default-regulatory-default-cfc.xml/${factoryZip}";
sha256 = "0fjrwpazd7p9nlrmbl616n86hsnv1a57piyxsifsnwb3hm90jqhr";
};
in runCommandNoCC "motorola-rav-firmware-${buildTag}" {
in runCommand "motorola-rav-firmware-${buildTag}" {
nativeBuildInputs = [ unzip e2fsprogs simg2img android-partition-tools ];
meta.license = [
# We make no claims that it can be redistributed.

View File

@ -1,5 +1,5 @@
{ lib
, runCommandNoCC
, runCommand
, fetchFromGitHub
, fetchurl
, modem ? builtins.throw ''
@ -27,7 +27,7 @@ let
sha256 = "1pcq64r4ag6rcgkbq3j2b43xzia9ccwbdgkgslw6pfqq8bmvcwxy";
};
in
runCommandNoCC "oneplus-oneplus3-firmware" {
runCommand "oneplus-oneplus3-firmware" {
inherit modem cfg;
meta.license = [
# We make no claims that it can be redistributed.

View File

@ -1,10 +1,10 @@
{ lib
, runCommandNoCC
, runCommand
, fetchgit
}:
# The minimum set of firmware files required for the device.
runCommandNoCC "pine64-pinephone-firmware" {
runCommand "pine64-pinephone-firmware" {
src = fetchgit {
url = "https://megous.com/git/linux-firmware";
rev = "6e8e591e17e207644dfe747e51026967bb1edab5";

View File

@ -1,10 +1,10 @@
{ lib
, runCommandNoCC
, runCommand
, fetchFromGitHub
}:
# The minimum set of firmware files required for the device.
runCommandNoCC "pine64-pinetab-firmware" {
runCommand "pine64-pinetab-firmware" {
src = fetchFromGitHub {
owner = "anarsoul";
repo = "rtl8723bt-firmware";

View File

@ -1,5 +1,5 @@
{ lib
, runCommandNoCC
, runCommand
, fetchurl
}:
@ -39,7 +39,7 @@ let
}).overrideAttrs(_: { inherit path; });
in
runCommandNoCC "samsung-a5y17lte-firmware" {
runCommand "samsung-a5y17lte-firmware" {
meta.license = [
# We make no claims that it can be redistributed.
lib.licenses.unfree

View File

@ -1,7 +1,7 @@
{ pkgs
, stdenv
, glibcLocales
, runCommandNoCC
, runCommand
, symlinkJoin
, ruby
}:
@ -19,7 +19,7 @@ let
};
in
runCommandNoCC "mobile-nixos-docs-devices" {
runCommand "mobile-nixos-docs-devices" {
nativeBuildInputs = [
ruby
glibcLocales

View File

@ -1,7 +1,7 @@
{ pkgs
, glibcLocales
, nixosOptionsDoc
, runCommandNoCC
, runCommand
, ruby
}:
@ -33,7 +33,7 @@ let
optionsJSON = (nixosOptionsDoc { options = dummyEval.options; }).optionsJSON;
in
runCommandNoCC "mobile-nixos-docs-options" {
runCommand "mobile-nixos-docs-options" {
nativeBuildInputs = [
ruby
glibcLocales

View File

@ -12,7 +12,7 @@ let
# rendering might not be as expected depending on what renders it.
# The SVGs in that directory are used as an authoring format files, not files
# to be used as they are. They need to be pre-rendered.
wallpapers = pkgs.runCommandNoCC "wallpapers" {} ''
wallpapers = pkgs.runCommand "wallpapers" {} ''
mkdir -p $out/
cp ${../../artwork/wallpapers}/*.png $out/
'';
@ -146,7 +146,7 @@ in
environment.etc."xdg/xfce4" = {
# TODO: DPI/size settings, so that a DPI can be derived from the device info.
source = pkgs.runCommandNoCC "xfce4-defaults" {} ''
source = pkgs.runCommand "xfce4-defaults" {} ''
cp -r ${./xdg/xfce4} $out
wallpaper="${wallpapers}/mobile-nixos-19.09.png"
substituteInPlace $out/xfconf/xfce-perchannel-xml/xfce4-desktop.xml \
@ -178,7 +178,7 @@ in
in
[
awesome
(runCommandNoCC "awesome-actions" {} ''
(runCommand "awesome-actions" {} ''
mkdir -vp $out/share/applications/
(cd $out/share/applications/
cat > awesome-close.desktop <<EOF
@ -224,7 +224,7 @@ in
'';
};
environment.etc."xdg/autostart/onboard-autostart.desktop" = {
source = pkgs.runCommandNoCC "onboard-autostart.desktop" {} ''
source = pkgs.runCommand "onboard-autostart.desktop" {} ''
cat "${pkgs.onboard}/etc/xdg/autostart/onboard-autostart.desktop" > $out
echo "X-XFCE-Autostart-Override=true" >> $out
substituteInPlace $out \

View File

@ -5,7 +5,7 @@
{ pkgs, lib, ... }:
let
emptyV4lRules = pkgs.runCommandNoCC "empty-v4l-rules" {} ''
emptyV4lRules = pkgs.runCommand "empty-v4l-rules" {} ''
mkdir -p $out/lib/udev/rules.d
touch $out/lib/udev/rules.d/60-persistent-v4l.rules
'';

View File

@ -5,7 +5,7 @@
{ pkgs, lib, ... }:
let
emptyV4lRules = pkgs.runCommandNoCC "empty-v4l-rules" {} ''
emptyV4lRules = pkgs.runCommand "empty-v4l-rules" {} ''
mkdir -p $out/lib/udev/rules.d
touch $out/lib/udev/rules.d/60-persistent-v4l.rules
'';

View File

@ -49,7 +49,7 @@ in
# Replaces the rootfs with a generated empty disk.
# Ideally we'd have `lib.mkDelete` here, but that doesn't exist.
rootfs = lib.mkForce {
raw = pkgs.runCommandNoCC "empty" {
raw = pkgs.runCommand "empty" {
filename = "empty.img";
partitionType = "0FC63DAF-8483-4772-8E79-3D69D8477DE4";
length = 1024;

View File

@ -32,7 +32,7 @@ let
booti $kernel_addr_r
'';
scr = pkgs.runCommandNoCC "uboot-script" {} ''
scr = pkgs.runCommand "uboot-script" {} ''
mkdir -p $out
${ubootTools}/bin/mkimage \
-A arm64 \

View File

@ -3,7 +3,7 @@
let
inherit (pkgs) imageBuilder;
makeNull = size: pkgs.runCommandNoCC "filesystems-test" {
makeNull = size: pkgs.runCommand "filesystems-test" {
filename = "null.img";
filesystemType = "FAT32"; # meh, good enough
} ''

View File

@ -3,7 +3,7 @@
let
inherit (pkgs) imageBuilder;
makeNull = size: pkgs.runCommandNoCC "filesystems-test" {
makeNull = size: pkgs.runCommand "filesystems-test" {
filename = "null.img";
filesystemType = "FAT32"; # meh, good enough
} ''

View File

@ -29,7 +29,7 @@ let
ln -s ${fs}/${fs.filename} $out/
'') fileSystem;
in
pkgs.runCommandNoCC "filesystems-test" {} ''
pkgs.runCommand "filesystems-test" {} ''
mkdir -p $out/
${concatStringsSep "\n" cmds}
''

View File

@ -32,7 +32,7 @@ let
ln -s ${fs}/${fs.filename} $out/
'') fileSystem;
in
pkgs.runCommandNoCC "filesystems-test" {} ''
pkgs.runCommand "filesystems-test" {} ''
mkdir -p $out/
${concatStringsSep "\n" cmds}
''

View File

@ -8,7 +8,7 @@ let
config.nixpkgs.crossSystem != null &&
config.nixpkgs.localSystem.system != null &&
config.nixpkgs.crossSystem.system != config.nixpkgs.localSystem.system;
nullPackage = pkgs.runCommandNoCC "null" {} ''
nullPackage = pkgs.runCommand "null" {} ''
mkdir -p $out
'';
in

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
minimalX11Config = pkgs.runCommandNoCC "minimalX11Config" {
minimalX11Config = pkgs.runCommand "minimalX11Config" {
allowedReferences = [ "out" ];
} ''
(PS4=" $ "; set -x

View File

@ -122,8 +122,8 @@ in
object =
let
nullModules = pkgs.callPackage (
{ runCommandNoCC, ... }:
runCommandNoCC "null-modules" { } ''
{ runCommand, ... }:
runCommand "null-modules" { } ''
mkdir -p $out/lib/modules
''
) {};
@ -145,7 +145,7 @@ in
stdenv = pkgs.stdenv;
# callPackage so that override / overrideAttrs exist.
kernel = pkgs.callPackage (
{ runCommandNoCC, ... }: runCommandNoCC "null-kernel" {
{ runCommand, ... }: runCommand "null-kernel" {
passthru = rec {
# minimum supported version~ish
# The exact version doesn't matter much, as long as it

View File

@ -6,7 +6,7 @@ let
busybox
makeInitrd
mkExtraUtils
runCommandNoCC
runCommand
writeText
;
inherit (lib)
@ -115,7 +115,7 @@ let
extraUdevRules = writeText "99-extra.rules" config.mobile.boot.stage-1.extraUdevRules;
udevRules = runCommandNoCC "udev-rules" {
udevRules = runCommand "udev-rules" {
allowedReferences = [ extraUtils ];
preferLocalBuild = true;
} ''
@ -165,7 +165,7 @@ let
]
++ optionals (stage-1 ? extraUtils) stage-1.extraUtils
++ [{
package = runCommandNoCC "empty" {} "mkdir -p $out";
package = runCommand "empty" {} "mkdir -p $out";
extraCommand =
let
inherit udev;
@ -207,7 +207,7 @@ let
};
# ncdu -f result/initrd.ncdu
initrd-meta = pkgs.runCommandNoCC "initrd-${device_name}-meta" {
initrd-meta = pkgs.runCommand "initrd-${device_name}-meta" {
nativeBuildInputs = with pkgs.buildPackages; [
ncdu
cpio
@ -355,7 +355,7 @@ in
boot.initrd.supportedFilesystems = lib.mkOverride 10 [];
system.build.initialRamdiskSecretAppender =
pkgs.runCommandNoCC "noopRamdiskSecretAppender" {} "touch $out"
pkgs.runCommand "noopRamdiskSecretAppender" {} "touch $out"
;
mobile.outputs = {
@ -370,7 +370,7 @@ in
# default NixOS outputs. Do not refer to this in Mobile NixOS.
system.build.initialRamdisk =
if config.mobile.rootfs.shared.enabled
then pkgs.runCommandNoCC "nullInitialRamdisk" {} "touch $out"
then pkgs.runCommand "nullInitialRamdisk" {} "touch $out"
else initrd
;

View File

@ -9,7 +9,7 @@ let
inherit (config.mobile.boot.stage-1) kernel;
# A bit dirty, but actually works for what we want.
fdt-forward = pkgs.runCommandNoCC "fdt-forward-for-initrd" {} ''
fdt-forward = pkgs.runCommand "fdt-forward-for-initrd" {} ''
mkdir -p $out/bin
# /bin/sh is busybox in the initrd, assuredly.
echo "#!/bin/sh" > $out/bin/fdt-forward

View File

@ -5,7 +5,7 @@ let
deviceName = config.mobile.device.name;
dtbMapping = pkgs.runCommandNoCC "dtb-mapping.json" {} ''
dtbMapping = pkgs.runCommand "dtb-mapping.json" {} ''
(
PS4=" $ "; set -x
${pkgs.buildPackages.mobile-nixos.map-dtbs}/bin/map-dtbs $(find ${config.hardware.deviceTree.package} -name '*.dtb' | sort) > $out

View File

@ -13,7 +13,7 @@ let
inherit (lib) optionalString;
inherit (pkgs) buildPackages;
in
pkgs.runCommandNoCC name {
pkgs.runCommand name {
nativeBuildInputs = with buildPackages; [
mkbootimg
dtbTool

View File

@ -30,7 +30,7 @@ let
# either of fastboot or the outputs.
# This is because this output should have no refs. A simple tarball of this
# output should be usable even on systems without Nix.
android-fastboot-images = pkgs.runCommandNoCC "android-fastboot-images-${device.name}" {} ''
android-fastboot-images = pkgs.runCommand "android-fastboot-images-${device.name}" {} ''
mkdir -p $out
cp -v ${rootfs}/${rootfs.filename} $out/system.img
cp -v ${android-bootimg} $out/boot.img

View File

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchurl
, runCommandNoCC
, runCommand
, initrd
, system
, imageBuilder
@ -55,7 +55,7 @@ let
};
# The image file containing the kernel and initrd.
kpart = runCommandNoCC "kpart-${device_name}" {
kpart = runCommand "kpart-${device_name}" {
nativeBuildInputs = [
dtc
ubootTools
@ -114,7 +114,7 @@ in
# Takes the built image, and do some light editing using `cgpt`.
# This uses some depthcharge-specific fields to make the image bootable.
# FIXME : integrate into the makeGPT call with postBuild or something
disk-image = runCommandNoCC "depthcharge-${device_name}" { nativeBuildInputs = [ vboot_reference ]; } ''
disk-image = runCommand "depthcharge-${device_name}" { nativeBuildInputs = [ vboot_reference ]; } ''
# Copy the generated image...
# Note that while it's GPT, it's lacking some depthcharge magic attributes
cp ${image}/${name}.img ./

View File

@ -4,7 +4,7 @@ let
enabled = config.mobile.system.type == "u-boot";
inherit (config.mobile.outputs) recovery stage-0;
inherit (pkgs) buildPackages imageBuilder runCommandNoCC;
inherit (pkgs) buildPackages imageBuilder runCommand;
inherit (lib) mkIf mkOption types;
cfg = config.mobile.quirks.u-boot;
inherit (cfg) soc;
@ -90,7 +90,7 @@ let
booti ''${kernel_addr_r} ''${ramdisk_addr_r}:''${ramdisk_size} ''${fdt_addr_r};
'';
bootscr = runCommandNoCC "${deviceName}-boot.scr" {
bootscr = runCommand "${deviceName}-boot.scr" {
nativeBuildInputs = [
buildPackages.ubootTools
];

View File

@ -5,7 +5,7 @@ let
inherit (lib) mkEnableOption mkIf mkOption types;
inherit (pkgs.stdenv) hostPlatform;
inherit (pkgs) imageBuilder runCommandNoCC;
inherit (pkgs) imageBuilder runCommand;
inherit (config.mobile.outputs) recovery stage-0;
cfg = config.mobile.quirks.uefi;
deviceName = config.mobile.device.name;
@ -22,7 +22,7 @@ let
kernelParamsFile = pkgs.writeText "${deviceName}-boot.cmd" config.boot.kernelParams;
efiKernel = pkgs.runCommandNoCC "${deviceName}-efiKernel" {
efiKernel = pkgs.runCommand "${deviceName}-efiKernel" {
nativeBuildInputs = [
pkgs.stdenv.cc.bintools.bintools_bin
];

View File

@ -1,4 +1,4 @@
{ runCommandNoCC, writeText, zip, mobile-nixos }:
{ runCommand, writeText, zip, mobile-nixos }:
let
inherit (mobile-nixos) android-flashable-zip-binaries;
@ -9,7 +9,7 @@ in
let
update-script = writeText "update-script.rb" script;
in
runCommandNoCC name {
runCommand name {
nativeBuildInputs = [
zip
];

View File

@ -1,4 +1,4 @@
{ stdenv, lib, runCommandNoCC, runtimeShell, busybox, hello, hello-mruby, pkgsBuildBuild, mruby, mrbgems, mobile-nixos }:
{ stdenv, lib, runCommand, runtimeShell, busybox, hello, hello-mruby, pkgsBuildBuild, mruby, mrbgems, mobile-nixos }:
let
static = stdenv.hostPlatform.isStatic;
@ -15,7 +15,7 @@ let
if stdenv.buildPlatform == stdenv.hostPlatform then ""
else "${pkgsBuildBuild.qemu}/bin/${emulators.${system}}"
;
mkTest = what: script: runCommandNoCC "cross-canary-${what}-${stdenv.system}" {} ''
mkTest = what: script: runCommand "cross-canary-${what}-${stdenv.system}" {} ''
assert_static() {
if ! ${file}/bin/file "$1" | grep -q 'statically linked'; then
printf "Assertion failed: '%s' is not a static binary\n" "$1"

View File

@ -1,6 +1,6 @@
{ runCommandNoCC, runtimeShell, lib, dtc, ubootTools }:
{ runCommand, runtimeShell, lib, dtc, ubootTools }:
runCommandNoCC "fdt-forward" {} ''
runCommand "fdt-forward" {} ''
mkdir -p $out/bin
echo "#!${runtimeShell}" > $out/bin/fdt-forward
cat "${./fdt-forward.sh}" >> $out/bin/fdt-forward

View File

@ -1,4 +1,4 @@
{ runCommandNoCC
{ runCommand
, overpass
, roboto
, font-awesome_4
@ -8,7 +8,7 @@
let
artwork = ../../../artwork;
in
runCommandNoCC "gui-assets" {
runCommand "gui-assets" {
nativeBuildInputs = [
nodePackages.svgo
];

View File

@ -1,4 +1,4 @@
{ runCommandNoCC
{ runCommand
, lib
, mruby
, mobile-nixos
@ -38,7 +38,7 @@ let
"xdg.rb"
]);
app = runCommandNoCC name {
app = runCommand name {
inherit src;
nativeBuildInputs = [
mruby

View File

@ -1,6 +1,6 @@
{ runCommandNoCC, runtimeShell, lib, dtc }:
{ runCommand, runtimeShell, lib, dtc }:
runCommandNoCC "map-dtbs" {} ''
runCommand "map-dtbs" {} ''
mkdir -p $out/bin
echo "#!${runtimeShell}" > $out/bin/map-dtbs
cat "${./map-dtbs.sh}" >> $out/bin/map-dtbs