Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplification of Nix flake and removal of GHC 8 #245

Merged
merged 14 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
- macos-latest # aarch64-darwin
- ubuntu-latest # x86_64-linux
ghc:
- ghc8107
- ghc902
- ghc96
fail-fast: true
runs-on: ${{ matrix.os }}
timeout-minutes: 30
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM utdemir/ghc-musl:v24-ghc902 AS build
FROM quay.io/benz0li/ghc-musl:9.6.6 AS build
WORKDIR /usr/src/app
sestrella marked this conversation as resolved.
Show resolved Hide resolved
COPY hapistrano.cabal .
RUN cabal update && \
Expand All @@ -8,7 +8,7 @@ RUN cabal build --enable-executable-static && \
cp $(cabal exec which hap) hap

FROM alpine:3.15
MAINTAINER Nicolas Vivar <nvivar@stackbuilders.com>
MAINTAINER Cristhian Motoche <cmotoche@stackbuilders.com>
RUN apk update && \
DavidMazarro marked this conversation as resolved.
Show resolved Hide resolved
apk add \
ca-certificates \
Expand Down
43 changes: 9 additions & 34 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,51 +27,27 @@
overlays = [
haskellNix.overlay
(final: prev: {
hapistrano-ghc8107 = final.haskell-nix.cabalProject' {
hapistrano-ghc96 = final.haskell-nix.cabalProject' {
src = final.haskell-nix.haskellLib.cleanGit {
name = "hapistrano";
src = ./.;
};
compiler-nix-name = "ghc8107";
};
hapistrano-ghc902 = final.haskell-nix.cabalProject' {
src = final.haskell-nix.haskellLib.cleanGit {
name = "hapistrano";
src = ./.;
};
compiler-nix-name = "ghc902";
compiler-nix-name = "ghc96";
};
})
];
};
flake-ghc8107 = pkgs.hapistrano-ghc8107.flake { };
flake-ghc902 = pkgs.hapistrano-ghc902.flake { };
flake-ghc96 = pkgs.hapistrano-ghc96.flake { };
in rec {
apps = {
test-ghc8107 = {
test-ghc96 = {
type = "app";
program = "${packages.test-ghc8107}/bin/test";
};
test-ghc902 = {
type = "app";
program = "${packages.test-ghc902}/bin/test";
program = "${packages.test-ghc96}/bin/test";
};
};
packages = {
default = flake-ghc8107.packages."hapistrano:exe:hap";
test-ghc8107 = flake-ghc8107.packages."hapistrano:test:test".overrideAttrs (_: {
postFixup = ''
wrapProgram $out/bin/test \
--set PATH ${pkgs.lib.makeBinPath [
pkgs.bash
pkgs.coreutils
pkgs.findutils
pkgs.git
pkgs.zsh
]}
'';
});
test-ghc902 = flake-ghc902.packages."hapistrano:test:test".overrideAttrs (_: {
default = flake-ghc96.packages."hapistrano:exe:hap";
test-ghc96 = flake-ghc96.packages."hapistrano:test:test".overrideAttrs (_: {
postFixup = ''
wrapProgram $out/bin/test \
--set PATH ${pkgs.lib.makeBinPath [
Expand All @@ -85,9 +61,8 @@
});
};
devShells = {
default = devShells.ghc902;
ghc8107 = flake-ghc8107.devShells.default;
ghc902 = flake-ghc902.devShells.default;
default = devShells.ghc96;
ghc96 = flake-ghc96.devShells.default;
};
});
}
2 changes: 1 addition & 1 deletion hapistrano.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ library
, text >= 1.2 && < 3
, typed-process >= 0.2 && < 0.3
, time >= 1.5 && < 1.13
, transformers >= 0.4 && < 0.6
, transformers >= 0.4 && < 0.7
, exceptions >= 0.10 && < 0.11
, yaml >= 0.11.7 && < 0.12
if flag(dev)
Expand Down
Loading