1
1
mirror of https://github.com/srid/ema.git synced 2024-11-28 23:42:59 +03:00

Use haskell-flake (multi-package API) (#142)

This commit is contained in:
Sridhar Ratnakumar 2022-11-10 16:32:28 -05:00 committed by GitHub
parent 98d932db1d
commit 3428f1d322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 17 deletions

40
flake.lock generated
View File

@ -2,16 +2,14 @@
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1657102481,
"narHash": "sha256-62Fuw8JgPub38OdgNefkIKOodM9nC3M0AG6lS+7smf4=",
"lastModified": 1666885127,
"narHash": "sha256-uXA/3lhLhwOTBMn9a5zJODKqaRT+SuL5cpEmOz2ULoo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "608ed3502263d6f4f886d75c48fc2b444a4ab8d8",
"rev": "0e101dbae756d35a376a5e1faea532608e4a4b9a",
"type": "github"
},
"original": {
@ -22,11 +20,11 @@
},
"haskell-flake": {
"locked": {
"lastModified": 1654001497,
"narHash": "sha256-GfrpyoQrVT9Z/j9its8BQs3I5O5X5Lc2IkK922bz7zg=",
"lastModified": 1668096377,
"narHash": "sha256-Kn13rgbmhcGqCYqfsJylAMJylsQiKo/nLdTq/X0aNPo=",
"owner": "srid",
"repo": "haskell-flake",
"rev": "4c0b0ff295f0b97238a600d2381c37ee46b67f9c",
"rev": "e1fceb7d473b4f03f54f35ae9330a91e87f434a8",
"type": "github"
},
"original": {
@ -37,11 +35,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659782844,
"narHash": "sha256-tM/qhHFE61puBxh9ebP3BIG1fkRAT4rHqD3jCM0HXGY=",
"lastModified": 1667969101,
"narHash": "sha256-GL53T705HO7Q/KVfbb5STx8AxFs8YgaGY8pvAZC+O7U=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c85e56bb060291eac3fb3c75d4e0e64f6836fcfe",
"rev": "bbf77421ac51a7c93f5f0f760da99e4dbce614fa",
"type": "github"
},
"original": {
@ -51,6 +49,24 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1665349835,
"narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",

View File

@ -3,7 +3,6 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
haskell-flake.url = "github:srid/haskell-flake";
};
outputs = inputs@{ self, nixpkgs, flake-parts, haskell-flake, ... }:
@ -16,7 +15,10 @@
# This attr is provided by https://github.com/srid/haskell-flake
haskellProjects = {
ghc90 = {
root = ./.;
packages.ema.root = ./.;
overrides = self: super: {
ema = pkgs.haskell.lib.dontCheck super.ema; # test/type-errors requires 9.2
};
buildTools = hp: {
inherit (pkgs)
treefmt
@ -25,10 +27,9 @@
cabal-fmt
fourmolu;
};
modifier = drv: with pkgs.haskell.lib; dontCheck drv; # test/type-errors requires 9.2
};
ghc92 = {
root = ./.;
packages.ema.root = ./.;
haskellPackages = pkgs.haskell.packages.ghc924; # Needed for `UnconsSymbol`
buildTools = hp:
let
@ -48,7 +49,6 @@
fourmolu;
ghcid = workaround140774 hp.ghcid;
};
source-overrides = { };
overrides = self: super: with pkgs.haskell.lib; {
# All these below are for GHC 9.2 compat.
relude = dontCheck super.relude_1_1_0_0; # Not the default in nixpkgs yet.