mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-27 02:52:02 +03:00
17 lines
269 B
Nix
17 lines
269 B
Nix
{ lib
|
|
, nixpkgs-fmt
|
|
, runCommand
|
|
}:
|
|
|
|
let
|
|
cleaned = lib.cleanSource ./..;
|
|
nixOnly = lib.sourceFilesBySuffices cleaned [ ".nix" ];
|
|
in
|
|
runCommand "nixpkgs-fmt"
|
|
{
|
|
nativeBuildInputs = [ nixpkgs-fmt ];
|
|
} ''
|
|
nixpkgs-fmt --check ${nixOnly}
|
|
touch $out # it worked!
|
|
''
|