-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #800 from socallinuxexpo/djacu/remove-flake-parts
[READY] nix.treewide: remove flake-parts
- Loading branch information
Showing
88 changed files
with
1,706 additions
and
831 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
inputs: | ||
let | ||
inherit (inputs.nixpkgs) | ||
lib | ||
; | ||
|
||
inherit (lib.attrsets) | ||
genAttrs | ||
; | ||
|
||
inherit (lib.sources) | ||
cleanSource | ||
; | ||
in | ||
genAttrs | ||
[ | ||
"x86_64-linux" | ||
"aarch64-linux" | ||
] | ||
( | ||
system: | ||
let | ||
pkgs = inputs.self.legacyPackages.${system}; | ||
in | ||
{ | ||
core = pkgs.testers.runNixOSTest (import ./core.nix { inherit inputs; }); | ||
loghost = pkgs.testers.runNixOSTest ./loghost.nix; | ||
|
||
pytest-facts = | ||
let | ||
testPython = ( | ||
pkgs.python3.withPackages ( | ||
pythonPackages: with pythonPackages; [ | ||
pylint | ||
pytest | ||
jinja2 | ||
] | ||
) | ||
); | ||
in | ||
(pkgs.runCommand "pytest-facts" { } '' | ||
cp -r --no-preserve=mode ${cleanSource inputs.self}/* . | ||
cd facts | ||
${testPython}/bin/pylint --persistent n *.py | ||
${testPython}/bin/pytest -vv -p no:cacheprovider | ||
touch $out | ||
''); | ||
|
||
duplicates-facts = ( | ||
pkgs.runCommand "duplicates-facts" { buildInputs = [ pkgs.fish ]; } '' | ||
cp -r --no-preserve=mode ${cleanSource inputs.self}/* . | ||
cd facts | ||
fish test_duplicates.fish | ||
touch $out | ||
'' | ||
); | ||
|
||
perl-switches = ( | ||
pkgs.runCommand "perl-switches" | ||
{ | ||
buildInputs = [ | ||
pkgs.gnumake | ||
pkgs.perl | ||
]; | ||
} | ||
'' | ||
cp -r --no-preserve=mode ${cleanSource inputs.self}/* . | ||
cd switch-configuration | ||
make .lint | ||
make .build-switch-configs | ||
touch $out | ||
'' | ||
); | ||
|
||
openwrt-golden = | ||
pkgs.runCommand "openwrt-golden" | ||
{ | ||
buildInputs = [ | ||
pkgs.diffutils | ||
pkgs.gomplate | ||
]; | ||
} | ||
'' | ||
cp -r --no-preserve=mode ${cleanSource inputs.self}/* . | ||
cd tests/unit/openwrt | ||
mkdir -p $out/tmp/ar71xx | ||
${pkgs.bash}/bin/bash test.sh -t ar71xx -o $out | ||
''; | ||
|
||
formatting = inputs.self.formatterModule.${system}.config.build.check inputs.self; | ||
|
||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
inputs: | ||
inputs.nixpkgs.lib.genAttrs | ||
[ | ||
"x86_64-linux" | ||
"aarch64-linux" | ||
] | ||
( | ||
system: | ||
let | ||
pkgs = inputs.self.legacyPackages.${system}; | ||
|
||
scalePython = [ | ||
(pkgs.python3.withPackages ( | ||
ps: with ps; [ | ||
pytest | ||
pylint | ||
ipdb | ||
] | ||
)) | ||
]; | ||
|
||
global = with pkgs; [ | ||
bash | ||
curl | ||
fish | ||
git | ||
jq | ||
kermit | ||
screen | ||
glibcLocales | ||
]; | ||
|
||
openwrtSub = with pkgs; [ | ||
expect | ||
gomplate | ||
magic-wormhole | ||
tftp-hpa | ||
nettools | ||
unixtools.ping | ||
iperf3 | ||
ncurses | ||
ncurses.dev | ||
pkg-config | ||
gcc | ||
stdenv | ||
scale-network.serverspec | ||
]; | ||
|
||
networkSub = with pkgs; [ | ||
perl | ||
ghostscript | ||
]; | ||
in | ||
{ | ||
scalePython = pkgs.mkShellNoCC { | ||
packages = scalePython; | ||
}; | ||
|
||
global = pkgs.mkShellNoCC { | ||
packages = global; | ||
}; | ||
|
||
openwrtSub = pkgs.mkShellNoCC { | ||
packages = openwrtSub; | ||
}; | ||
|
||
networkSub = pkgs.mkShellNoCC { | ||
packages = networkSub; | ||
}; | ||
|
||
default = pkgs.mkShellNoCC { | ||
packages = (scalePython ++ global ++ openwrtSub ++ networkSub); | ||
}; | ||
} | ||
) |
Oops, something went wrong.