Skip to content

Commit

Permalink
Use named tag of haskellNix, update shell tools. (#1820)
Browse files Browse the repository at this point in the history
Named tags of haskellNix make it easier to bisect issues with the
underlying nixpkgs and hackage pins.
  • Loading branch information
noonio authored Feb 4, 2025
2 parents 2db6366 + 3458f51 commit 907d979
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 150 deletions.
125 changes: 67 additions & 58 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 21 additions & 30 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
{
inputs = {
nixpkgs.follows = "haskellNix/nixpkgs";
haskellNix.url = "github:input-output-hk/haskell.nix";
hydra-spec.url = "github:cardano-scaling/hydra-formal-specification";
iohk-nix.url = "github:input-output-hk/iohk-nix";
flake-parts.url = "github:hercules-ci/flake-parts";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
lint-utils = {
url = "github:homotopic/lint-utils";
inputs.nixpkgs.follows = "haskellNix/nixpkgs";
};
CHaP = {
url = "github:IntersectMBO/cardano-haskell-packages?ref=repo";
flake = false;
};
aiken.url = "github:aiken-lang/aiken/v1.1.9";
cardano-node.url = "github:intersectmbo/cardano-node/10.1.2";
nix-npm-buildpackage.url = "github:serokell/nix-npm-buildpackage";


flake-parts.url = "github:hercules-ci/flake-parts";
haskellNix.url = "github:input-output-hk/haskell.nix/2025.02.02";
hydra-spec.url = "github:cardano-scaling/hydra-formal-specification";
iohk-nix.url = "github:input-output-hk/iohk-nix";
lint-utils = {
url = "github:homotopic/lint-utils";
inputs.nixpkgs.follows = "haskellNix/nixpkgs";
};
mithril.url = "github:input-output-hk/mithril/2450.0";
mithril-unstable.url = "github:input-output-hk/mithril/unstable";
nixpkgs.follows = "haskellNix/nixpkgs";
nix-npm-buildpackage.url = "github:serokell/nix-npm-buildpackage";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
};

outputs =
{ self
, flake-parts
, nixpkgs
, cardano-node
, ...
} @ inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
outputs = { self, ... }@inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.process-compose-flake.flakeModule
];
Expand All @@ -46,7 +38,7 @@

# nixpkgs enhanced with haskell.nix and crypto libs as used by iohk

pkgs = import nixpkgs {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
# This overlay contains libsodium and libblst libraries
Expand All @@ -65,11 +57,11 @@
# Specific versions of tools we require
(final: prev: {
aiken = inputs.aiken.packages.${system}.aiken;
apply-refact = pkgs.haskell-nix.tool compiler "apply-refact" "0.14.0.0";
apply-refact = pkgs.haskell-nix.tool compiler "apply-refact" "0.15.0.0";
cabal-fmt = pkgs.haskell-nix.tool compiler "cabal-fmt" "0.1.12";
cabal-install = pkgs.haskell-nix.cabal-install.${compiler};
cabal-plan = pkgs.haskell-nix.tool compiler "cabal-plan" "0.7.4.0";
fourmolu = pkgs.haskell-nix.tool compiler "fourmolu" "0.16.2.0";
cabal-install = pkgs.haskell-nix.tool compiler "cabal-install" "3.10.3.0";
cabal-plan = pkgs.haskell-nix.tool compiler "cabal-plan" "0.7.5.0";
fourmolu = pkgs.haskell-nix.tool compiler "fourmolu" "0.17.0.0";
haskell-language-server = pkgs.haskell-nix.tool compiler "haskell-language-server" "2.9.0.0";
hlint = pkgs.haskell-nix.tool compiler "hlint" "3.8";
weeder = pkgs.haskell-nix.tool compiler "weeder" "2.9.0";
Expand All @@ -92,12 +84,12 @@
};

hydraPackages = import ./nix/hydra/packages.nix {
inherit system pkgs inputs hsPkgs self;
inherit pkgs inputs hsPkgs self;
gitRev = self.rev or "dirty";
};

hydraImages = import ./nix/hydra/docker.nix {
inherit hydraPackages system nixpkgs;
inherit hydraPackages pkgs;
};

prefixAttrs = s: attrs:
Expand Down Expand Up @@ -174,8 +166,7 @@
]);

devShells = import ./nix/hydra/shell.nix {
inherit (inputs) aiken;
inherit inputs pkgs hsPkgs system hydraPackages;
inherit pkgs hsPkgs hydraPackages;
ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler};
};
};
Expand Down
24 changes: 12 additions & 12 deletions hydra-cluster/bench/Bench/Summary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ textReport Summary{totalTxs, numberOfTxs, averageConfirmationTime, quantiles, nu
, "Average confirmation time (ms): " <> show (nominalDiffTimeToMilliseconds averageConfirmationTime)
]
++ ( if length quantiles == 100
then
[ "P99: " <> show (quantiles ! 99) <> "ms"
, "P95: " <> show (quantiles ! 95) <> "ms"
, "P50: " <> show (quantiles ! 50) <> "ms"
]
else []
then
[ "P99: " <> show (quantiles ! 99) <> "ms"
, "P95: " <> show (quantiles ! 95) <> "ms"
, "P50: " <> show (quantiles ! 50) <> "ms"
]
else []
)
++ ["Invalid txs: " <> show numberOfInvalidTxs]

Expand Down Expand Up @@ -111,12 +111,12 @@ markdownReport now summaries =
, "| _Avg. Confirmation Time (ms)_ | " <> show (nominalDiffTimeToMilliseconds averageConfirmationTime) <> " |"
]
++ ( if length quantiles == 100
then
[ "| _P99_ | " <> show (quantiles ! 99) <> "ms |"
, "| _P95_ | " <> show (quantiles ! 95) <> "ms |"
, "| _P50_ | " <> show (quantiles ! 50) <> "ms |"
]
else []
then
[ "| _P99_ | " <> show (quantiles ! 99) <> "ms |"
, "| _P95_ | " <> show (quantiles ! 95) <> "ms |"
, "| _P50_ | " <> show (quantiles ! 50) <> "ms |"
]
else []
)
++ [ "| _Number of Invalid txs_ | " <> show numberOfInvalidTxs <> " |"
]
Expand Down
Loading

0 comments on commit 907d979

Please sign in to comment.