mirror of
https://github.com/lloeki/apply.git
synced 2025-12-06 09:24:38 +01:00
Initial version of testing + Nix flake
This commit is contained in:
parent
68af0ac537
commit
d7586c4071
6 changed files with 1628 additions and 40 deletions
52
flake.nix
Normal file
52
flake.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
description = "Simple zero-dependency tool to provision *nix machines";
|
||||
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
rec {
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
dash
|
||||
gnumake
|
||||
shellcheck
|
||||
];
|
||||
};
|
||||
|
||||
checks = let
|
||||
commonDeps = with pkgs; [ gnumake shellcheck ];
|
||||
|
||||
in {
|
||||
bash = pkgs.runCommand "lint" {
|
||||
src = ./.;
|
||||
nativeBuildInputs = commonDeps ++ (with pkgs; [ bash ]);
|
||||
} ''
|
||||
export SHELL="${pkgs.bash}/bin/bash"
|
||||
make -C "$src" test-bash
|
||||
touch "$out"
|
||||
'';
|
||||
|
||||
dash = pkgs.runCommand "lint" {
|
||||
src = ./.;
|
||||
nativeBuildInputs = commonDeps ++ (with pkgs; [ dash ]);
|
||||
} ''
|
||||
export SHELL="${pkgs.dash}/bin/dash"
|
||||
make -C "$src" test-dash
|
||||
touch "$out"
|
||||
'';
|
||||
|
||||
busybox = pkgs.runCommand "lint" {
|
||||
src = ./.;
|
||||
nativeBuildInputs = commonDeps ++ (with pkgs; [ busybox ]);
|
||||
} ''
|
||||
export SHELL="${pkgs.busybox}/bin/ash"
|
||||
make -C "$src" test-ash
|
||||
touch "$out"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue