Skip to content
Snippets Groups Projects
Commit 3d2cc3da authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

make it work on CI which doesn't enter the dev shell, too

parent 11f8ab65
No related branches found
No related tags found
1 merge request!13Auto generate cabal project
Pipeline #4739 passed
......@@ -40,6 +40,22 @@
checks = hslib.checks {};
devShells = hslib.devShells {
shellHook = ''
nix run .#generate-cabal-project
'';
extraBuildInputs = pkgs:
with pkgs; [
zlib
];
};
packages = hslib.packages {};
apps.hlint = hslib.apps.hlint {};
apps.generate-cabal-project = {
type = "app";
program = "${
pkgs.writeShellApplication {
name = "generate-cabal-project";
text = ''
cat >cabal.project.local <<EOF
-- This file is auto-generated by the flake devShell's shellHook. Do
-- not edit this file. Make changes in flake.nix.
......@@ -51,13 +67,9 @@
${tahoe-chk}
EOF
'';
extraBuildInputs = pkgs:
with pkgs; [
zlib
];
}
}/bin/generate-cabal-project";
};
packages = hslib.packages {};
apps.hlint = hslib.apps.hlint {};
# Using the working directory of `nix run`, do a build with cabal and
# then run the test suite.
......@@ -69,6 +81,7 @@
runtimeInputs = with pkgs; [pkg-config haskell.compiler.${ghcVersion} cabal-install];
text = ''
nix run .#generate-cabal-project
cabal update hackage.haskell.org
cabal build all
cabal run tests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment