treewide: format all inactive Nix files

After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
This commit is contained in:
Silvan Mosberger
2024-12-10 20:26:33 +01:00
parent b32a094368
commit 4f0dadbf38
21293 changed files with 701276 additions and 428232 deletions
+24 -15
View File
@@ -1,17 +1,24 @@
{ lib
, pkgsBuildHost
, ...
{
lib,
pkgsBuildHost,
...
}:
let
removeKnownVulnerabilities = pkg: pkg.overrideAttrs (old: {
meta = (old.meta or { }) // { knownVulnerabilities = [ ]; };
});
removeKnownVulnerabilities =
pkg:
pkg.overrideAttrs (old: {
meta = (old.meta or { }) // {
knownVulnerabilities = [ ];
};
});
# We are removing `meta.knownVulnerabilities` from `python27`,
# and setting it in `resholve` itself.
python27' = (removeKnownVulnerabilities pkgsBuildHost.python27).override {
self = python27';
pkgsBuildHost = pkgsBuildHost // { python27 = python27'; };
pkgsBuildHost = pkgsBuildHost // {
python27 = python27';
};
# strip down that python version as much as possible
openssl = null;
bzip2 = null;
@@ -35,14 +42,16 @@ rec {
# not exposed in all-packages
resholveBuildTimeOnly = removeKnownVulnerabilities resholve;
# resholve itself
resholve = (callPackage ./resholve.nix {
inherit (source) rSrc version;
inherit (deps.oil) oildev;
inherit (deps) configargparse;
inherit resholve-utils;
# used only in tests
resholve = resholveBuildTimeOnly;
});
resholve = (
callPackage ./resholve.nix {
inherit (source) rSrc version;
inherit (deps.oil) oildev;
inherit (deps) configargparse;
inherit resholve-utils;
# used only in tests
resholve = resholveBuildTimeOnly;
}
);
# funcs to validate and phrase invocations of resholve
# and use those invocations to build packages
resholve-utils = callPackage ./resholve-utils.nix {
+7 -6
View File
@@ -1,9 +1,10 @@
{ lib
, callPackage
, fetchFromGitHub
, python27
, fetchPypi
, ...
{
lib,
callPackage,
fetchFromGitHub,
python27,
fetchPypi,
...
}:
/*
+25 -15
View File
@@ -1,15 +1,16 @@
{ lib
, stdenv
, python27
, callPackage
, fetchFromGitHub
, makeWrapper
, re2c
, # oil deps
glibcLocales
, file
, six
, typing
{
lib,
stdenv,
python27,
callPackage,
fetchFromGitHub,
makeWrapper,
re2c,
# oil deps
glibcLocales,
file,
six,
typing,
}:
rec {
@@ -67,9 +68,16 @@ rec {
"--without-readline"
];
nativeBuildInputs = [ re2c file makeWrapper ];
nativeBuildInputs = [
re2c
file
makeWrapper
];
propagatedBuildInputs = [ six typing ];
propagatedBuildInputs = [
six
typing
];
doCheck = true;
@@ -85,7 +93,9 @@ rec {
'';
# See earlier note on glibcLocales TODO: verify needed?
LOCALE_ARCHIVE = lib.optionalString (stdenv.buildPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
LOCALE_ARCHIVE = lib.optionalString (
stdenv.buildPlatform.libc == "glibc"
) "${glibcLocales}/lib/locale/locale-archive";
# not exhaustive; sample what resholve uses as a sanity check
pythonImportsCheck = [
+210 -133
View File
@@ -1,7 +1,14 @@
{ lib, stdenv, resholve, binlore, writeTextFile }:
{
lib,
stdenv,
resholve,
binlore,
writeTextFile,
}:
rec {
/* These functions break up the work of partially validating the
/*
These functions break up the work of partially validating the
'solutions' attrset and massaging it into env/cli args.
Note: some of the left-most args do not *have* to be passed as
@@ -13,84 +20,128 @@ rec {
colons = l: builtins.concatStringsSep ":" l;
semicolons = l: builtins.concatStringsSep ";" l;
/* Throw a fit with dotted attr path context */
nope = path: msg:
throw "${builtins.concatStringsSep "." path}: ${msg}";
# Throw a fit with dotted attr path context
nope = path: msg: throw "${builtins.concatStringsSep "." path}: ${msg}";
/* Special-case directive value representations by type */
phraseDirective = solution: env: name: val:
if builtins.isInt val then builtins.toString val
else if builtins.isString val then name
else if true == val then name
else if false == val then "" # omit!
else if null == val then "" # omit!
else if builtins.isList val then "${name}:${semicolons (map lib.escapeShellArg val)}"
else nope [ solution env name ] "unexpected type: ${builtins.typeOf val}";
# Special-case directive value representations by type
phraseDirective =
solution: env: name: val:
if builtins.isInt val then
builtins.toString val
else if builtins.isString val then
name
else if true == val then
name
else if false == val then
"" # omit!
else if null == val then
"" # omit!
else if builtins.isList val then
"${name}:${semicolons (map lib.escapeShellArg val)}"
else
nope [ solution env name ] "unexpected type: ${builtins.typeOf val}";
/* Build fake/fix/keep directives from Nix types */
phraseDirectives = solution: env: val:
# Build fake/fix/keep directives from Nix types
phraseDirectives =
solution: env: val:
lib.mapAttrsToList (phraseDirective solution env) val;
/* Custom ~search-path routine to handle relative path strings */
relSafeBinPath = input:
if lib.isDerivation input then ((lib.getOutput "bin" input) + "/bin")
else if builtins.isString input then input
else throw "unexpected type for input: ${builtins.typeOf input}";
# Custom ~search-path routine to handle relative path strings
relSafeBinPath =
input:
if lib.isDerivation input then
((lib.getOutput "bin" input) + "/bin")
else if builtins.isString input then
input
else
throw "unexpected type for input: ${builtins.typeOf input}";
/* Special-case value representation by type/name */
phraseEnvVal = solution: env: val:
if env == "inputs" then (colons (map relSafeBinPath val))
else if builtins.isString val then val
else if builtins.isList val then spaces val
else if builtins.isAttrs val then spaces (phraseDirectives solution env val)
else nope [ solution env ] "unexpected type: ${builtins.typeOf val}";
# Special-case value representation by type/name
phraseEnvVal =
solution: env: val:
if env == "inputs" then
(colons (map relSafeBinPath val))
else if builtins.isString val then
val
else if builtins.isList val then
spaces val
else if builtins.isAttrs val then
spaces (phraseDirectives solution env val)
else
nope [ solution env ] "unexpected type: ${builtins.typeOf val}";
/* Shell-format each env value */
shellEnv = solution: env: value:
# Shell-format each env value
shellEnv =
solution: env: value:
lib.escapeShellArg (phraseEnvVal solution env value);
/* Build a single ENV=val pair */
phraseEnv = solution: env: value:
# Build a single ENV=val pair
phraseEnv =
solution: env: value:
"RESHOLVE_${lib.toUpper env}=${shellEnv solution env value}";
/* Discard attrs:
- claimed by phraseArgs
- only needed for binlore.collect
/*
Discard attrs:
- claimed by phraseArgs
- only needed for binlore.collect
*/
removeUnneededArgs = value:
removeAttrs value [ "scripts" "flags" "unresholved" ];
removeUnneededArgs =
value:
removeAttrs value [
"scripts"
"flags"
"unresholved"
];
/* Verify required arguments are present */
validateSolution = { scripts, inputs, interpreter, ... }: true;
# Verify required arguments are present
validateSolution =
{
scripts,
inputs,
interpreter,
...
}:
true;
/* Pull out specific solution keys to build ENV=val pairs */
phraseEnvs = solution: value:
spaces (lib.mapAttrsToList (phraseEnv solution) (removeUnneededArgs value));
# Pull out specific solution keys to build ENV=val pairs
phraseEnvs =
solution: value: spaces (lib.mapAttrsToList (phraseEnv solution) (removeUnneededArgs value));
/* Pull out specific solution keys to build CLI argstring */
phraseArgs = { flags ? [ ], scripts, ... }:
# Pull out specific solution keys to build CLI argstring
phraseArgs =
{
flags ? [ ],
scripts,
...
}:
spaces (flags ++ scripts);
phraseBinloreArgs = value:
phraseBinloreArgs =
value:
let
hasUnresholved = builtins.hasAttr "unresholved" value;
in {
drvs = value.inputs ++
lib.optionals hasUnresholved [ value.unresholved ];
in
{
drvs = value.inputs ++ lib.optionals hasUnresholved [ value.unresholved ];
strip = if hasUnresholved then [ value.unresholved ] else [ ];
};
/* Build a single resholve invocation */
phraseInvocation = solution: value:
# Build a single resholve invocation
phraseInvocation =
solution: value:
if validateSolution value then
# we pass resholve a directory
"RESHOLVE_LORE=${binlore.collect (phraseBinloreArgs value) } ${phraseEnvs solution value} ${resholve}/bin/resholve --overwrite ${phraseArgs value}"
else throw "invalid solution"; # shouldn't trigger for now
# we pass resholve a directory
"RESHOLVE_LORE=${binlore.collect (phraseBinloreArgs value)} ${phraseEnvs solution value} ${resholve}/bin/resholve --overwrite ${phraseArgs value}"
else
throw "invalid solution"; # shouldn't trigger for now
injectUnresholved = solutions: unresholved: (builtins.mapAttrs (name: value: value // { inherit unresholved; } ) solutions);
injectUnresholved =
solutions: unresholved:
(builtins.mapAttrs (name: value: value // { inherit unresholved; }) solutions);
/* Build resholve invocation for each solution. */
phraseCommands = solutions: unresholved:
# Build resholve invocation for each solution.
phraseCommands =
solutions: unresholved:
builtins.concatStringsSep "\n" (
lib.mapAttrsToList phraseInvocation (injectUnresholved solutions unresholved)
);
@@ -100,112 +151,138 @@ rec {
and invocation. Extra context makes it clearer what the
Nix API is doing, makes nix-shell debugging easier, etc.
*/
phraseContext = { invokable, prep ? ''cd "$out"'' }: ''
(
${prep}
PS4=$'\x1f'"\033[33m[resholve context]\033[0m "
set -x
: invoking resholve with PWD=$PWD
${invokable}
)
'';
phraseContextForPWD = invokable: phraseContext { inherit invokable; prep = ""; };
phraseContext =
{
invokable,
prep ? ''cd "$out"'',
}:
''
(
${prep}
PS4=$'\x1f'"\033[33m[resholve context]\033[0m "
set -x
: invoking resholve with PWD=$PWD
${invokable}
)
'';
phraseContextForPWD =
invokable:
phraseContext {
inherit invokable;
prep = "";
};
phraseContextForOut = invokable: phraseContext { inherit invokable; };
phraseSolution = name: solution: (phraseContextForOut (phraseInvocation name solution));
phraseSolutions = solutions: unresholved:
phraseContextForOut (phraseCommands solutions unresholved);
phraseSolutions =
solutions: unresholved: phraseContextForOut (phraseCommands solutions unresholved);
writeScript = name: partialSolution: text:
writeScript =
name: partialSolution: text:
writeTextFile {
inherit name text;
executable = true;
checkPhase = ''
${(phraseContextForPWD (
phraseInvocation name (
partialSolution // {
scripts = [ "${placeholder "out"}" ];
}
)
)
)}
'' + lib.optionalString (partialSolution.interpreter != "none") ''
${partialSolution.interpreter} -n $out
'';
checkPhase =
''
${
(phraseContextForPWD (
phraseInvocation name (
partialSolution
// {
scripts = [ "${placeholder "out"}" ];
}
)
))
}
''
+ lib.optionalString (partialSolution.interpreter != "none") ''
${partialSolution.interpreter} -n $out
'';
};
writeScriptBin = name: partialSolution: text:
writeScriptBin =
name: partialSolution: text:
writeTextFile rec {
inherit name text;
executable = true;
destination = "/bin/${name}";
checkPhase = ''
${phraseContextForOut (
checkPhase =
''
${phraseContextForOut (
phraseInvocation name (
partialSolution // {
partialSolution
// {
scripts = [ "bin/${name}" ];
}
)
)
}
'' + lib.optionalString (partialSolution.interpreter != "none") ''
${partialSolution.interpreter} -n $out/bin/${name}
'';
)}
''
+ lib.optionalString (partialSolution.interpreter != "none") ''
${partialSolution.interpreter} -n $out/bin/${name}
'';
};
mkDerivation = { pname
, src
, version
, passthru ? { }
, solutions
, ...
mkDerivation =
{
pname,
src,
version,
passthru ? { },
solutions,
...
}@attrs:
let
inherit stdenv;
/*
Knock out our special solutions arg, but otherwise
just build what the caller is giving us. We'll
actually resholve it separately below (after we
generate binlore for it).
Knock out our special solutions arg, but otherwise
just build what the caller is giving us. We'll
actually resholve it separately below (after we
generate binlore for it).
*/
unresholved = (stdenv.mkDerivation ((removeAttrs attrs [ "solutions" ])
// {
inherit version src;
pname = "${pname}-unresholved";
}));
unresholved = (
stdenv.mkDerivation (
(removeAttrs attrs [ "solutions" ])
// {
inherit version src;
pname = "${pname}-unresholved";
}
)
);
in
/*
resholve in a separate derivation; some concerns:
- we aren't keeping many of the user's args, so they
can't readily set LOGLEVEL and such...
- not sure how this affects multiple outputs
resholve in a separate derivation; some concerns:
- we aren't keeping many of the user's args, so they
can't readily set LOGLEVEL and such...
- not sure how this affects multiple outputs
*/
lib.extendDerivation true passthru (stdenv.mkDerivation {
src = unresholved;
inherit version pname;
buildInputs = [ resholve ];
disallowedReferences = [ resholve ];
lib.extendDerivation true passthru (
stdenv.mkDerivation {
src = unresholved;
inherit version pname;
buildInputs = [ resholve ];
disallowedReferences = [ resholve ];
# retain a reference to the base
passthru = unresholved.passthru // {
unresholved = unresholved;
# fallback attr for update bot to query our src
originalSrc = unresholved.src;
};
# retain a reference to the base
passthru = unresholved.passthru // {
unresholved = unresholved;
# fallback attr for update bot to query our src
originalSrc = unresholved.src;
};
# do these imply that we should use NoCC or something?
dontConfigure = true;
dontBuild = true;
# do these imply that we should use NoCC or something?
dontConfigure = true;
dontBuild = true;
installPhase = ''
cp -R $src $out
'';
installPhase = ''
cp -R $src $out
'';
# enable below for verbose debug info if needed
# supports default python.logging levels
# LOGLEVEL="INFO";
preFixup = phraseSolutions solutions unresholved;
# enable below for verbose debug info if needed
# supports default python.logging levels
# LOGLEVEL="INFO";
preFixup = phraseSolutions solutions unresholved;
# don't break the metadata...
meta = unresholved.meta;
});
# don't break the metadata...
meta = unresholved.meta;
}
);
}
+37 -21
View File
@@ -1,16 +1,17 @@
{ lib
, callPackage
, python27
, fetchFromGitHub
, installShellFiles
, rSrc
, version
, oildev
, configargparse
, gawk
, binlore
, resholve
, resholve-utils
{
lib,
callPackage,
python27,
fetchFromGitHub,
installShellFiles,
rSrc,
version,
oildev,
configargparse,
gawk,
binlore,
resholve,
resholve-utils,
}:
let
@@ -25,7 +26,8 @@ let
};
};
in python27.pkgs.buildPythonApplication {
in
python27.pkgs.buildPythonApplication {
pname = "resholve";
inherit version;
src = rSrc;
@@ -59,8 +61,20 @@ in python27.pkgs.buildPythonApplication {
'';
passthru = {
inherit (resholve-utils) mkDerivation phraseSolution writeScript writeScriptBin;
tests = callPackage ./test.nix { inherit rSrc binlore python27 resholve; };
inherit (resholve-utils)
mkDerivation
phraseSolution
writeScript
writeScriptBin
;
tests = callPackage ./test.nix {
inherit
rSrc
binlore
python27
resholve
;
};
};
meta = with lib; {
@@ -70,10 +84,12 @@ in python27.pkgs.buildPythonApplication {
license = with licenses; [ mit ];
maintainers = with maintainers; [ abathur ];
platforms = platforms.all;
knownVulnerabilities = [ ''
resholve depends on python27 (EOL). While it's safe to
run on trusted input in the build sandbox, you should
avoid running it on untrusted input.
'' ];
knownVulnerabilities = [
''
resholve depends on python27 (EOL). While it's safe to
run on trusted input in the build sandbox, you should
avoid running it on untrusted input.
''
];
};
}
+3 -2
View File
@@ -1,5 +1,6 @@
{ fetchFromGitHub
, ...
{
fetchFromGitHub,
...
}:
rec {
+213 -150
View File
@@ -1,67 +1,83 @@
{ lib
, stdenv
, callPackage
, resholve
, shunit2
, coreutils
, gnused
, gnugrep
, findutils
, jq
, bash
, bats
, libressl
, openssl
, python27
, file
, gettext
, rSrc
, runDemo ? false
, binlore
, sqlite
, unixtools
, gawk
, rlwrap
, gnutar
, bc
# override testing
, esh
, getconf
, libarchive
, locale
, mount
, ncurses
, nixos-install-tools
, nixos-rebuild
, procps
, ps
# known consumers
, aaxtomp3
, arch-install-scripts
, bashup-events32
, dgoss
, git-ftp
, ix
, lesspipe
, locate-dominating-file
, mons
, msmtp
, nix-direnv
, pdf2odt
, pdfmm
, rancid
, s0ix-selftest-tool
, unix-privesc-check
, wgnord
, wsl-vpnkit
, xdg-utils
, yadm
, zxfer
{
lib,
stdenv,
callPackage,
resholve,
shunit2,
coreutils,
gnused,
gnugrep,
findutils,
jq,
bash,
bats,
libressl,
openssl,
python27,
file,
gettext,
rSrc,
runDemo ? false,
binlore,
sqlite,
unixtools,
gawk,
rlwrap,
gnutar,
bc,
# override testing
esh,
getconf,
libarchive,
locale,
mount,
ncurses,
nixos-install-tools,
nixos-rebuild,
procps,
ps,
# known consumers
aaxtomp3,
arch-install-scripts,
bashup-events32,
dgoss,
git-ftp,
ix,
lesspipe,
locate-dominating-file,
mons,
msmtp,
nix-direnv,
pdf2odt,
pdfmm,
rancid,
s0ix-selftest-tool,
unix-privesc-check,
wgnord,
wsl-vpnkit,
xdg-utils,
yadm,
zxfer,
}:
let
default_packages = [ bash file findutils gettext ];
parsed_packages = [ coreutils sqlite unixtools.script gnused gawk findutils rlwrap gnutar bc ];
default_packages = [
bash
file
findutils
gettext
];
parsed_packages = [
coreutils
sqlite
unixtools.script
gnused
gawk
findutils
rlwrap
gnutar
bc
];
in
rec {
module1 = resholve.mkDerivation {
@@ -80,9 +96,16 @@ rec {
solutions = {
libressl = {
# submodule to demonstrate
scripts = [ "bin/libressl.sh" "submodule/helper.sh" ];
scripts = [
"bin/libressl.sh"
"submodule/helper.sh"
];
interpreter = "none";
inputs = [ jq module2 libressl.bin ];
inputs = [
jq
module2
libressl.bin
];
};
};
@@ -107,9 +130,17 @@ rec {
fix = {
aliases = true;
};
scripts = [ "bin/openssl.sh" "libexec/invokeme" ];
scripts = [
"bin/openssl.sh"
"libexec/invokeme"
];
interpreter = "none";
inputs = [ shunit2 openssl.bin "libexec" "libexec/invokeme" ];
inputs = [
shunit2
openssl.bin
"libexec"
"libexec/invokeme"
];
execer = [
/*
This is the same verdict binlore will
@@ -144,7 +175,10 @@ rec {
interpreter = "${bash}/bin/bash";
inputs = [ module1 ];
fake = {
external = [ "jq" "openssl" ];
external = [
"jq"
"openssl"
];
};
}}
'';
@@ -163,7 +197,10 @@ rec {
doCheck = true;
buildInputs = [ resholve ];
nativeCheckInputs = [ coreutils bats ];
nativeCheckInputs = [
coreutils
bats
];
# LOGLEVEL="DEBUG";
# default path
@@ -173,95 +210,116 @@ rec {
PKG_FINDUTILS = "${lib.makeBinPath [ findutils ]}";
PKG_GETTEXT = "${lib.makeBinPath [ gettext ]}";
PKG_COREUTILS = "${lib.makeBinPath [ coreutils ]}";
RESHOLVE_LORE = "${binlore.collect { drvs = default_packages ++ [ coreutils ] ++ parsed_packages; } }";
RESHOLVE_LORE = "${binlore.collect {
drvs = default_packages ++ [ coreutils ] ++ parsed_packages;
}}";
PKG_PARSED = "${lib.makeBinPath parsed_packages}";
# explicit interpreter for demo suite; maybe some better way...
INTERP = "${bash}/bin/bash";
checkPhase = ''
patchShebangs .
mkdir empty_lore
touch empty_lore/{execers,wrappers}
export EMPTY_LORE=$PWD/empty_lore
printf "\033[33m============================= resholve test suite ===================================\033[0m\n" > test.ansi
if ./test.sh &>> test.ansi; then
cat test.ansi
else
cat test.ansi && exit 1
fi
'' + lib.optionalString runDemo ''
printf "\033[33m============================= resholve demo ===================================\033[0m\n" > demo.ansi
if ./demo &>> demo.ansi; then
cat demo.ansi
else
cat demo.ansi && exit 1
fi
'';
checkPhase =
''
patchShebangs .
mkdir empty_lore
touch empty_lore/{execers,wrappers}
export EMPTY_LORE=$PWD/empty_lore
printf "\033[33m============================= resholve test suite ===================================\033[0m\n" > test.ansi
if ./test.sh &>> test.ansi; then
cat test.ansi
else
cat test.ansi && exit 1
fi
''
+ lib.optionalString runDemo ''
printf "\033[33m============================= resholve demo ===================================\033[0m\n" > demo.ansi
if ./demo &>> demo.ansi; then
cat demo.ansi
else
cat demo.ansi && exit 1
fi
'';
};
# Caution: ci.nix asserts the equality of both of these w/ diff
resholvedScript = resholve.writeScript "resholved-script" {
inputs = [ file ];
interpreter = "${bash}/bin/bash";
} ''
echo "Hello"
file .
'';
resholvedScriptBin = resholve.writeScriptBin "resholved-script-bin" {
inputs = [ file ];
interpreter = "${bash}/bin/bash";
} ''
echo "Hello"
file .
'';
resholvedScriptBinNone = resholve.writeScriptBin "resholved-script-bin" {
inputs = [ file ];
interpreter = "none";
} ''
echo "Hello"
file .
'';
resholvedScript =
resholve.writeScript "resholved-script"
{
inputs = [ file ];
interpreter = "${bash}/bin/bash";
}
''
echo "Hello"
file .
'';
resholvedScriptBin =
resholve.writeScriptBin "resholved-script-bin"
{
inputs = [ file ];
interpreter = "${bash}/bin/bash";
}
''
echo "Hello"
file .
'';
resholvedScriptBinNone =
resholve.writeScriptBin "resholved-script-bin"
{
inputs = [ file ];
interpreter = "none";
}
''
echo "Hello"
file .
'';
# spot-check lore overrides
loreOverrides = resholve.writeScriptBin "verify-overrides" {
inputs = [
coreutils
esh
getconf
libarchive
locale
mount
ncurses
procps
ps
] ++ lib.optionals stdenv.hostPlatform.isLinux [
nixos-install-tools
nixos-rebuild
];
interpreter = "none";
execer = [
"cannot:${esh}/bin/esh"
];
fix = {
mount = true;
};
} (''
env b2sum fake args
b2sum fake args
esh fake args
getconf fake args
bsdtar fake args
locale fake args
mount fake args
reset fake args
tput fake args
tset fake args
ps fake args
top fake args
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
nixos-generate-config fake args
nixos-rebuild fake args
'');
loreOverrides =
resholve.writeScriptBin "verify-overrides"
{
inputs =
[
coreutils
esh
getconf
libarchive
locale
mount
ncurses
procps
ps
]
++ lib.optionals stdenv.hostPlatform.isLinux [
nixos-install-tools
nixos-rebuild
];
interpreter = "none";
execer = [
"cannot:${esh}/bin/esh"
];
fix = {
mount = true;
};
}
(
''
env b2sum fake args
b2sum fake args
esh fake args
getconf fake args
bsdtar fake args
locale fake args
mount fake args
reset fake args
tput fake args
tset fake args
ps fake args
top fake args
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
nixos-generate-config fake args
nixos-rebuild fake args
''
);
# ensure known consumers in nixpkgs keep working
inherit aaxtomp3;
@@ -279,7 +337,8 @@ rec {
inherit shunit2;
inherit xdg-utils;
inherit yadm;
} // lib.optionalAttrs stdenv.hostPlatform.isLinux {
}
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
inherit arch-install-scripts;
inherit dgoss;
inherit rancid;
@@ -287,6 +346,10 @@ rec {
inherit wgnord;
inherit wsl-vpnkit;
inherit zxfer;
} // lib.optionalAttrs (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64)) {
inherit s0ix-selftest-tool;
}
//
lib.optionalAttrs
(stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64))
{
inherit s0ix-selftest-tool;
}