Skip to content

Commit

Permalink
nix: stylish-haskell for network packages
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Jan 17, 2022
1 parent f2425ff commit a3259d1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions default.nix
Expand Up @@ -46,6 +46,7 @@ let
styles = recurseIntoAttrs {
check-nixfmt = callPackage ./nix/check-nixfmt.nix { };
check-stylish = callPackage ./nix/check-stylish.nix { };
check-stylish-network = callPackage ./nix/check-stylish-network.nix { };
};
};

Expand Down
27 changes: 27 additions & 0 deletions nix/check-stylish-network.nix
@@ -0,0 +1,27 @@
{ runCommand, fd, lib, stylish-haskell }:

runCommand "check-stylish" {
meta.platforms = with lib.platforms; [ linux ];
buildInputs = [ fd stylish-haskell ];
src = ./..;
} ''
unpackPhase
cd $sourceRoot
fd -p io-sim -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
fd -p io-classes -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
fd -p strict-stm -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
fd -p strict-stm -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
fd -p typed-protocols* -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
fd -p network-mux -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
fd -p ouroboros-network* -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
fd -p cardano-client -e hs -E Setup.hs -X stylish-haskell -c .stylish-haskell-network.yaml -i
echo $? >> $out
''

2 changes: 1 addition & 1 deletion release.nix
Expand Up @@ -110,7 +110,7 @@ let
])) ++ (testsPaths [ "ouroboros-network" "cddl" ])
++ (checksPaths [ "ouroboros-network" "cddl" ])
++ (exesPaths [ "network-mux" "cardano-ping" ])
++ (stylePaths [ "check-nixfmt" "check-stylish" ])
++ (stylePaths [ "check-nixfmt" "check-stylish" "check-stylish-network" ])
++ onlyBuildOnDefaultSystem;

# Remove build jobs for which cross compiling does not make sense.
Expand Down

0 comments on commit a3259d1

Please sign in to comment.