Skip to content

Commit

Permalink
Merge pull request #56 from cofree-coffee/feature/version-bumps
Browse files Browse the repository at this point in the history
Updates matrix-client to 0.1.4.2 and ghc to 924. Removes brittany.
  • Loading branch information
solomon-b authored Nov 21, 2022
2 parents 5efbc92 + 1a44988 commit 19a4f33
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 157 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cabal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
cabal: ["3.4"]
ghc: ["8.10.7"]
ghc: ["8.10.7", "9.0.2", "9.2.4"]

env:
CONFIG: "--project-file=cabal.project"
Expand Down Expand Up @@ -61,4 +61,4 @@ jobs:
# run: cabal test $CONFIG
#
# - run: cabal haddock $CONFIG
# - run: cabal sdist
# - run: cabal sdist
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/dist-newstyle/
.pre-commit-config.yaml
/hie.yaml
/.direnv/
/.envrc.local
22 changes: 0 additions & 22 deletions brittany.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ packages: *
source-repository-package
type: git
location: https://github.com/softwarefactory-project/matrix-client-haskell.git
tag: f8610d8956bd146105292bb75821ca078d01b5ff
tag: 0.1.4.2
subdir: matrix-client
34 changes: 17 additions & 17 deletions flake.lock

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

35 changes: 6 additions & 29 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
description = "Cofree.Coffee Matrix Bot";

inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05;

flake-utils = {
url = github:numtide/flake-utils;
Expand All @@ -15,7 +15,7 @@

outputs = { self, nixpkgs, flake-utils, pre-commit-hooks }:
let
ghcVersion = "8107";
ghcVersion = "924";
compiler = "ghc${ghcVersion}";
# default systems compatible with pre-commit-hooks.nix
# https://github.com/cachix/pre-commit-hooks.nix/pull/122
Expand All @@ -40,23 +40,8 @@
hsPkgs = evalPkgs.haskell.packages.${compiler}.override {
overrides = hfinal: hprev: {
cofree-bot = hfinal.callCabal2nix "cofree-bot" ./. { };

# command to reproduce:
# cabal2nix https://github.com/softwarefactory-project/matrix-client-haskell --subpath matrix-client --revision f8610d8956bd146105292bb75821ca078d01b5ff > .nix/deps/matrix-client.nix
matrix-client = hfinal.callPackage ./nix/deps/matrix-client.nix { };
};
};

brittany-config = pkgs.writeTextFile {
name = "brittany-config";
text = builtins.readFile ./brittany.yaml;
};

scripts = import ./nix/scripts.nix {
inherit brittany-config;
s = pkgs.writeShellScriptBin;
brittany = pkgs.haskellPackages.brittany;
};
in
rec {

Expand All @@ -65,14 +50,13 @@
devShell = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = with pkgs; [
haskellPackages.brittany
(haskell-language-server.override { supportedGhcVersions = [ ghcVersion ]; })
cabal2nix
cabal-install
ghc
ghcid
cabal2nix
haskell.compiler.${compiler}
haskell.packages.${compiler}.haskell-language-server
zlib
] ++ (builtins.attrValues scripts);
];
};

packages = flake-utils.lib.flattenTree {
Expand All @@ -88,13 +72,6 @@
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
brittany = {
name = "brittany";
entry = "${hsPkgs.brittany}/bin/brittany --write-mode=inplace --config-file=${brittany-config}";
files = "\\.l?hs$";
language = "system";
pass_filenames = false;
};
cabal-fmt.enable = true;
};
};
Expand Down
77 changes: 0 additions & 77 deletions nix/deps/matrix-client.nix

This file was deleted.

4 changes: 0 additions & 4 deletions nix/scripts.nix

This file was deleted.

3 changes: 0 additions & 3 deletions shell.nix

This file was deleted.

4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
resolver: lts-18.16
resolver: lts-20.1

packages:
- .

extra-deps:
- git: https://github.com/cofree-coffee/matrix-client-haskell.git
commit: f8610d8956bd146105292bb75821ca078d01b5ff
commit: 0.1.4.2
subdirs:
- matrix-client

Expand Down

0 comments on commit 19a4f33

Please sign in to comment.