Skip to content

Commit

Permalink
Merge pull request #723 from input-output-hk/serge/nix-shell-almost
Browse files Browse the repository at this point in the history
nix-shell, almost
  • Loading branch information
deepfire committed Jul 11, 2019
2 parents 2991bd0 + 352a9bb commit adc7ea8
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -21,6 +21,7 @@ dist/
*.swp
*.swo
*~
\#*
*_flymake.hs
result*
**/tags
Expand Down
6 changes: 4 additions & 2 deletions default.nix
@@ -1,4 +1,6 @@
{ customConfig ? {}, ... }:
{ customConfig ? {}
, withHoogle ? true
, ... }:
#
# The default.nix file. This will generate targets for all
# buildables (see release.nix for nomenclature, excluding
Expand Down Expand Up @@ -52,7 +54,7 @@ let
documents = import ./doc/default.nix {inherit commonLib; };
in {
inherit scripts tests;
inherit (nixTools) nix-tools;
inherit (nixTools) nix-tools shell;
network-pdf-wip = documents.network-pdf-wip;
network-pdf = documents.network-pdf;
}
27 changes: 24 additions & 3 deletions nix/nix-tools.nix
@@ -1,6 +1,27 @@
{ ... }@args:
{ withHoogle ? true
, ... }@args:

let
commonLib = import ./iohk-common.nix;

in commonLib.nix-tools.default-nix ./pkgs.nix args
pkgs = commonLib.nix-tools.default-nix ./pkgs.nix args;
in pkgs // {
shell = pkgs.nix-tools.shellFor {
inherit withHoogle;
packages = pkgs: with pkgs; [
io-sim
io-sim-classes
ouroboros-consensus
ouroboros-network
typed-transitions
];
buildInputs = with pkgs.nix-tools._raw; [
cabal-install.components.exes.cabal
commonLib.stack-hpc-coveralls
] ++ (with commonLib.pkgs; [
git
pkgconfig
stack
systemd
]);
};
}
1 change: 1 addition & 0 deletions release.nix
Expand Up @@ -67,6 +67,7 @@ commonLib.pkgs.lib.mapAttrsRecursiveCond
network-pdf-wip = default.network-pdf-wip;
network-pdf = default.network-pdf;
};
builds-on-supported-systems = [ "shell" ];
required-targets = jobs: [
# targets are specified using above nomenclature:
jobs.nix-tools.tests.ouroboros-consensus.test-consensus.x86_64-linux
Expand Down
3 changes: 3 additions & 0 deletions shell.nix
@@ -0,0 +1,3 @@
{ withHoogle ? true
}:
(import ./default.nix { inherit withHoogle; }).shell

0 comments on commit adc7ea8

Please sign in to comment.