mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Format .nix files
... with nixfmt (rfc style)
This commit is contained in:
parent
ba6425a7d0
commit
96e550efc5
266 changed files with 7460 additions and 5138 deletions
|
@ -4,7 +4,9 @@
|
|||
imports = [ ./common.nix ];
|
||||
|
||||
nodes.machine = {
|
||||
users.users.alice = { isNormalUser = true; };
|
||||
users.users.alice = {
|
||||
isNormalUser = true;
|
||||
};
|
||||
nix.settings.trusted-users = [ "alice" ];
|
||||
};
|
||||
|
||||
|
@ -15,4 +17,4 @@
|
|||
su --login --command "run-test-suite" alice >&2
|
||||
""")
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
imports = [ ./common.nix ];
|
||||
|
||||
nodes.machine = {
|
||||
users.users.alice = { isNormalUser = true; };
|
||||
users.users.alice = {
|
||||
isNormalUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
let
|
||||
# FIXME (roberth) reference issue
|
||||
inputDerivation = pkg: (pkg.overrideAttrs (o: {
|
||||
disallowedReferences = [ ];
|
||||
})).inputDerivation;
|
||||
inputDerivation =
|
||||
pkg:
|
||||
(pkg.overrideAttrs (o: {
|
||||
disallowedReferences = [ ];
|
||||
})).inputDerivation;
|
||||
|
||||
in
|
||||
{
|
||||
|
@ -12,59 +14,63 @@ in
|
|||
# we skip it to save time.
|
||||
skipTypeCheck = true;
|
||||
|
||||
nodes.machine = { config, pkgs, ... }: {
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
virtualisation.writableStore = true;
|
||||
system.extraDependencies = [
|
||||
(inputDerivation config.nix.package)
|
||||
];
|
||||
virtualisation.writableStore = true;
|
||||
system.extraDependencies = [
|
||||
(inputDerivation config.nix.package)
|
||||
];
|
||||
|
||||
nix.settings.substituters = lib.mkForce [];
|
||||
nix.settings.substituters = lib.mkForce [ ];
|
||||
|
||||
environment.systemPackages = let
|
||||
run-test-suite = pkgs.writeShellApplication {
|
||||
name = "run-test-suite";
|
||||
runtimeInputs = [
|
||||
pkgs.meson
|
||||
pkgs.ninja
|
||||
pkgs.jq
|
||||
environment.systemPackages =
|
||||
let
|
||||
run-test-suite = pkgs.writeShellApplication {
|
||||
name = "run-test-suite";
|
||||
runtimeInputs = [
|
||||
pkgs.meson
|
||||
pkgs.ninja
|
||||
pkgs.jq
|
||||
pkgs.git
|
||||
|
||||
# Want to avoid `/run/current-system/sw/bin/bash` because we
|
||||
# want a store path. Likewise for coreutils.
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
];
|
||||
text = ''
|
||||
set -x
|
||||
|
||||
cat /proc/sys/fs/file-max
|
||||
ulimit -Hn
|
||||
ulimit -Sn
|
||||
|
||||
cd ~
|
||||
|
||||
cp -r ${pkgs.nixComponents.nix-functional-tests.src} nix
|
||||
chmod -R +w nix
|
||||
|
||||
chmod u+w nix/.version
|
||||
echo ${pkgs.nixComponents.version} > nix/.version
|
||||
|
||||
export isTestOnNixOS=1
|
||||
|
||||
export NIX_REMOTE_=daemon
|
||||
export NIX_REMOTE=daemon
|
||||
|
||||
export NIX_STORE=${builtins.storeDir}
|
||||
|
||||
meson setup nix/tests/functional build
|
||||
cd build
|
||||
meson test -j1 --print-errorlogs
|
||||
'';
|
||||
};
|
||||
in
|
||||
[
|
||||
run-test-suite
|
||||
pkgs.git
|
||||
|
||||
# Want to avoid `/run/current-system/sw/bin/bash` because we
|
||||
# want a store path. Likewise for coreutils.
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
];
|
||||
text = ''
|
||||
set -x
|
||||
|
||||
cat /proc/sys/fs/file-max
|
||||
ulimit -Hn
|
||||
ulimit -Sn
|
||||
|
||||
cd ~
|
||||
|
||||
cp -r ${pkgs.nixComponents.nix-functional-tests.src} nix
|
||||
chmod -R +w nix
|
||||
|
||||
chmod u+w nix/.version
|
||||
echo ${pkgs.nixComponents.version} > nix/.version
|
||||
|
||||
export isTestOnNixOS=1
|
||||
|
||||
export NIX_REMOTE_=daemon
|
||||
export NIX_REMOTE=daemon
|
||||
|
||||
export NIX_STORE=${builtins.storeDir}
|
||||
|
||||
meson setup nix/tests/functional build
|
||||
cd build
|
||||
meson test -j1 --print-errorlogs
|
||||
'';
|
||||
};
|
||||
in [
|
||||
run-test-suite
|
||||
pkgs.git
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
imports = [ ./common.nix ];
|
||||
|
||||
nodes.machine = {
|
||||
users.users.alice = { isNormalUser = true; };
|
||||
users.users.alice = {
|
||||
isNormalUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue