Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger.git
tag: 7e1fb14c916e58709aa36c4b4fe0265ba537e0f0
--sha256: sha256-nR60TiNlCaeutZNI083hdjM3HqglM9sGWqf6MFKaK1I=
tag: 0c0368ea767e0dcbe187d44a9ab2d8a16d826984
--sha256: sha256-8gt+Y5eVmK7S/j784eXywRXkm2YR4fJyI5vz4a5Uv9g=
subdir:
eras/allegra/impl
eras/alonzo/impl
Expand Down
6 changes: 2 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@
} // leiosDemo.devShells;
inherit hydraJobs;
legacyPackages = pkgs;
packages =
hydraJobs.native.haskell96.exesNoAsserts.ouroboros-consensus-cardano // {
leios-mvd-test = pkgs.testers.nixosTest (import ./nix/leios-mvd/test.nix { inherit inputs pkgs; });
};
formatter = hydraJobs.native.formattingLinting.run;
packages = hydraJobs.native.haskell96.exesNoAsserts.ouroboros-consensus-cardano;
}
);
}
43 changes: 36 additions & 7 deletions nix/formatting-linting.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ pkgs:

let
inherit (pkgs) lib;

runFormatting = tool: script: pkgs.writeShellApplication {
name = "run-${lib.getName tool}";
runtimeInputs = [ pkgs.bash pkgs.fd tool ];
text = ''bash ${script}'';
};

checkFormatting = tool: script: pkgs.runCommand
"check-${lib.getName tool}"
{
Expand All @@ -24,7 +31,8 @@ let
echo $EXIT_CODE > $out
fi
'';
formattingLinting = {

checks = {
fourmolu = checkFormatting pkgs.fourmolu ../scripts/ci/run-fourmolu.sh;
cabal-gild = checkFormatting pkgs.cabal-gild ../scripts/ci/run-cabal-gild.sh;
nixpkgs-fmt = checkFormatting pkgs.nixpkgs-fmt ../scripts/ci/run-nixpkgs-fmt.sh;
Expand All @@ -42,11 +50,32 @@ let
touch $out
'';
};
in
formattingLinting // {
all = pkgs.releaseTools.aggregate {
name = "consensus-formatting";
meta.description = "Run all formatters and linters";
constituents = lib.collect lib.isDerivation formattingLinting;

runs = {
fourmolu = runFormatting pkgs.fourmolu ../scripts/ci/run-fourmolu.sh;
cabal-gild = runFormatting pkgs.cabal-gild ../scripts/ci/run-cabal-gild.sh;
nixpkgs-fmt = runFormatting pkgs.nixpkgs-fmt ../scripts/ci/run-nixpkgs-fmt.sh;
dos2unix = runFormatting pkgs.dos2unix ../scripts/ci/run-dos2unix.sh;
hlint = pkgs.writeShellApplication {
name = "hlint";
runtimeInputs = [ pkgs.hlint ];
text = ''hlint -j .'';
};
};

checkAll = pkgs.releaseTools.aggregate {
name = "consensus-formatting-check";
meta.description = "Check all formatters and linters";
constituents = lib.collect lib.isDerivation checks;
};

runAll = pkgs.writeShellApplication {
name = "consensus-formatting-run";
text = ''for prog in ${with builtins; toString (map lib.getExe (attrValues runs))}; do $prog; done'';
};

in
checks // {
all = checkAll;
run = runAll;
}
50 changes: 0 additions & 50 deletions nix/leios-mvd/README.md

This file was deleted.

188 changes: 0 additions & 188 deletions nix/leios-mvd/genesis/genesis.alonzo.json

This file was deleted.

42 changes: 0 additions & 42 deletions nix/leios-mvd/genesis/genesis.byron.json

This file was deleted.

Loading
Loading