Skip to content

Commit

Permalink
Bump haskellNix/nixpkgs for flake fixes. bump index-state.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgi committed Sep 16, 2021
1 parent c5a7c8f commit 4d14377
Show file tree
Hide file tree
Showing 8 changed files with 233 additions and 262 deletions.
2 changes: 1 addition & 1 deletion cabal.project
@@ -1,4 +1,4 @@
index-state: 2021-08-14T00:00:00Z
index-state: 2021-09-15T00:00:00Z

packages:
cardano-api
Expand Down
4 changes: 2 additions & 2 deletions cardano-api/src/Cardano/Api/Fees.hs
Expand Up @@ -54,8 +54,8 @@ import GHC.Records (HasField (..))
import Numeric.Natural

import Control.Monad.Trans.Except
import qualified Data.Text.Prettyprint.Doc as PP
import qualified Data.Text.Prettyprint.Doc.Render.String as PP
import qualified Prettyprinter as PP
import qualified Prettyprinter.Render.String as PP

import qualified Cardano.Binary as CBOR
import Cardano.Slotting.EpochInfo (EpochInfo, hoistEpochInfo)
Expand Down
4 changes: 2 additions & 2 deletions default.nix
Expand Up @@ -45,7 +45,7 @@ let

inherit (haskellPackages.cardano-node.identifier) version;

exes = mapAttrsRecursiveCond (as: !(isDerivation as)) rewriteStatic (collectComponents' "exes" haskellPackages);
exes = collectComponents' "exes" haskellPackages;

# `tests` are the test suites which have been built.
tests = collectComponents' "tests" haskellPackages;
Expand All @@ -57,7 +57,7 @@ let
tests = collectChecks haskellPackages;

hlint = callPackage hlintCheck {
inherit (cardanoNodeProject.projectModule) src;
inherit (cardanoNodeProject) src;
};
};

Expand Down
38 changes: 19 additions & 19 deletions flake.lock

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

45 changes: 20 additions & 25 deletions flake.nix
Expand Up @@ -35,6 +35,7 @@
defaultSystem = head supportedSystems;

overlays = [
haskellNix.overlay
iohkNix.overlays.haskell-nix-extra
iohkNix.overlays.crypto
iohkNix.overlays.cardano-lib
Expand All @@ -54,30 +55,28 @@

in eachSystem supportedSystems (system:
let
pkgs = haskellNix.legacyPackages.${system}.appendOverlays overlays;
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};

inherit (pkgs.commonLib) eachEnv environments;

devShell = import ./shell.nix { inherit pkgs; };

flake = pkgs.cardanoNodeProject.flake {};

staticFlake = pkgs.pkgsStatic.cardanoNodeProject.flake {};

windowsFlake = pkgs.pkgsCross.${systems.examples.mingwW64}.cardanoNodeProject.flake {};
flake = pkgs.cardanoNodeProject.flake {
crossPlatforms = p: with p; [
mingwW64
musl64
];
};

scripts = flattenTree pkgs.scripts;

checkNames = attrNames flake.checks;

checks =
# Linux only checks:
optionalAttrs (system == "x86_64-linux") (
prefixNamesWith "windows/" (removeAttrs
(getAttrs checkNames windowsFlake.checks)
["cardano-node-chairman:test:chairman-tests"]
)
// (prefixNamesWith "nixosTests/" (mapAttrs (_: v: v.${system} or v) pkgs.nixosTests))
prefixNamesWith "nixosTests/" (mapAttrs (_: v: v.${system} or v) pkgs.nixosTests)
)
# checks run on default system only;
// optionalAttrs (system == defaultSystem) {
Expand All @@ -86,26 +85,22 @@
};
};

exes = collectExes flake.packages;
exeNames = attrNames exes;
lazyCollectExe = p: getAttrs exeNames (collectExes p);
exes = collectExes
flake.packages;


packages = {
inherit (devShell) devops;
inherit (pkgs) cardano-node-profiled cardano-node-eventlogged cardano-node-asserted tx-generator-profiled locli-profiled;
}
// scripts
// exes
// (prefixNamesWith "static/"
(mapAttrs pkgs.rewriteStatic (lazyCollectExe staticFlake.packages)))
# Linux only packages:
// optionalAttrs (system == "x86_64-linux") (
prefixNamesWith "windows/" (lazyCollectExe windowsFlake.packages)
// {
"dockerImage/node" = pkgs.dockerImage;
"dockerImage/submit-api" = pkgs.submitApiDockerImage;
}
)
// optionalAttrs (system == "x86_64-linux") {
"dockerImage/node" = pkgs.dockerImage;
"dockerImage/submit-api" = pkgs.submitApiDockerImage;
}

# Add checks to be able to build them individually
// (prefixNamesWith "checks/" checks);

Expand Down

0 comments on commit 4d14377

Please sign in to comment.