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

project: deprecate 8.10.7 #254

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
ghc: "9.2.5"
os: ubuntu-latest

- cabal: "3.2"
ghc: "8.10.7"
os: ubuntu-latest

# latest GHC, non-default OS
- cabal: "3.8"
ghc: "9.6"
Expand Down Expand Up @@ -106,8 +102,8 @@ jobs:

- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --no-nix

- name: Test
run: |
stack test --system-ghc
stack test --system-ghc --no-nix
14 changes: 7 additions & 7 deletions flake.lock

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

73 changes: 47 additions & 26 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,36 +1,57 @@
{
description = "A Klister flake";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
description = "A klister flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
overlay = final: prev: {
klister = prev.callCabal2nix "klister" ./. { };
pkgs = nixpkgs.legacyPackages.${system};

hPkgs =
pkgs.haskell.packages."ghc966"; # need to match Stackage LTS version
# from stack.yaml snapshot

myDevTools = [
hPkgs.ghc # GHC compiler in the desired version (will be available on PATH)
hPkgs.ghcid # Continuous terminal Haskell compile checker
hPkgs.ormolu # Haskell formatter
hPkgs.hlint # Haskell codestyle checker
hPkgs.hoogle # Lookup Haskell documentation
hPkgs.haskell-language-server # LSP server for editor
hPkgs.implicit-hie # auto generate LSP hie.yaml file from cabal
hPkgs.retrie # Haskell refactoring tool
# hPkgs.cabal-install
stack-wrapped
pkgs.zlib # External C library needed by some Haskell packages
];

# Wrap Stack to work with our Nix integration. We don't want to modify
# stack.yaml so non-Nix users don't notice anything.
# - no-nix: We don't want Stack's way of integrating Nix.
# --system-ghc # Use the existing GHC on PATH (will come from this Nix file)
# --no-install-ghc # Don't try to install GHC if no matching GHC found on PATH
stack-wrapped = pkgs.symlinkJoin {
name = "stack"; # will be available as the usual `stack` in terminal
paths = [ pkgs.stack ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/stack \
--add-flags "\
--no-nix \
--system-ghc \
--no-install-ghc \
"
'';
};
haskellPackages = pkgs.haskellPackages.extend overlay;
in {
# nix build
packages.default = haskellPackages.klister;
devShells.default = pkgs.mkShell {
buildInputs = myDevTools;

# nix develop
devShells.default = haskellPackages.shellFor {
withHoogle = true;
packages = p: [ p.klister ];
buildInputs = with haskellPackages; [
cabal-install
haskell-language-server
eventlog2html
];
shellHook = ''
export KLISTERPATH="$(pwd)"/examples/
'';
# Make external Nix c libraries like zlib known to GHC, like
# pkgs.haskell.lib.buildStackProject does
# https://github.com/NixOS/nixpkgs/blob/d64780ea0e22b5f61cd6012a456869c702a72f20/pkgs/development/haskell-modules/generic-stack-builder.nix#L38
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath myDevTools;
};
}
);
});
}
2 changes: 1 addition & 1 deletion klister.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author: David Christiansen <[email protected]>, Samuel Géline
maintainer: David Christiansen <[email protected]>, Samuel Gélineau <[email protected]>
license: BSD-3-Clause
license-file: LICENSE
tested-with: GHC==8.10.7, GHC==9.2.5, GHC==9.4, GHC==9.6
tested-with: GHC==9.2.5, GHC==9.4, GHC==9.6
build-type: Simple
data-files:
stdlib/defun.kl
Expand Down
11 changes: 5 additions & 6 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
resolver: lts-20.25
resolver: lts-22.39
packages:
- .
extra-deps:
- transformers-0.6.1.0@sha256:7e7feea5fc9071375a973a48290fee6664e3eba38eb7028ce04850911f1ad0d4,3146
- mtl-2.3.1
- exceptions-0.10.7
- hedgehog-1.2
- tasty-hedgehog-1.4.0.0@sha256:d29ba1e363d9d41da5b34d4f320ab761cbc9c19fda6091d2d650351604c2d9aa,1795

# mark nix as disable. Nix users can use cabal and the nix flake
nix:
enable: false
Loading