Simplify nixpkgs workaround (#84)
- Apply that overlay only on macOS - Make use of the overlay system - Update nixpkgs and haskell-flake
This commit is contained in:
parent
385039139c
commit
d176ed4159
2 changed files with 29 additions and 20 deletions
12
flake.lock
generated
12
flake.lock
generated
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"haskell-flake": {
|
"haskell-flake": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1674483307,
|
"lastModified": 1675623979,
|
||||||
"narHash": "sha256-NlohHWCqOsMY4q2fmKR6VAAX4y09Cr85Ezgbx4Q2hbc=",
|
"narHash": "sha256-eD01oAbmfWhAVHesQrsZkGdueV7xtV1AmhGDEvJV2XA=",
|
||||||
"owner": "srid",
|
"owner": "srid",
|
||||||
"repo": "haskell-flake",
|
"repo": "haskell-flake",
|
||||||
"rev": "8688fb2deaa193795467eedb4d2473dbeaba19b4",
|
"rev": "014aa621ec2e910766f8fbe03dc9638984a359eb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -102,11 +102,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1674361931,
|
"lastModified": 1675584158,
|
||||||
"narHash": "sha256-lUIZItHbW+LmJAz9V9puLq2rHlewcUgg1RPehkQIkzc=",
|
"narHash": "sha256-SBkchaDzCHxnPNRDdtZ5ko5caHio9iS0Mbyn/xXbXxs=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ef479383e13698c8d5ccf8a608485dc8ce1d4f80",
|
"rev": "d840126a0890621e7b220894d749132dd4bde6a0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
37
flake.nix
37
flake.nix
|
@ -18,31 +18,40 @@
|
||||||
inputs.flake-root.flakeModule
|
inputs.flake-root.flakeModule
|
||||||
inputs.mission-control.flakeModule
|
inputs.mission-control.flakeModule
|
||||||
];
|
];
|
||||||
perSystem = { self', lib, config, pkgs, ... }: {
|
perSystem = { self', system, lib, config, pkgs, ... }: {
|
||||||
# The "main" project. You can have multiple projects, but this template
|
# The "main" project. You can have multiple projects, but this template
|
||||||
# has only one.
|
# has only one.
|
||||||
haskellProjects.main = {
|
haskellProjects.main = {
|
||||||
packages = {
|
packages = {
|
||||||
haskell-template.root = ./.;
|
haskell-template.root = ./.;
|
||||||
};
|
};
|
||||||
buildTools = hp:
|
overrides =
|
||||||
let
|
let
|
||||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/140774
|
# Workaround for https://github.com/NixOS/nixpkgs/issues/140774
|
||||||
fixCyclicReference = drv:
|
nixpkgsWorkaround =
|
||||||
pkgs.haskell.lib.overrideCabal drv (_: {
|
let
|
||||||
enableSeparateBinOutput = false;
|
disableSeparateBinOutput =
|
||||||
});
|
pkgs.haskell.lib.compose.overrideCabal (_: { enableSeparateBinOutput = false; });
|
||||||
|
in
|
||||||
|
self: super: lib.optionalAttrs (system == "aarch64-darwin") {
|
||||||
|
ghcid = disableSeparateBinOutput super.ghcid;
|
||||||
|
ormolu = disableSeparateBinOutput super.ormolu;
|
||||||
|
};
|
||||||
|
projectOverrides = self: super: {
|
||||||
|
# Add your own overrides here.
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
lib.composeManyExtensions [
|
||||||
|
nixpkgsWorkaround
|
||||||
|
projectOverrides
|
||||||
|
];
|
||||||
|
devShell = {
|
||||||
|
tools = hp: {
|
||||||
treefmt = config.treefmt.build.wrapper;
|
treefmt = config.treefmt.build.wrapper;
|
||||||
ghcid = fixCyclicReference hp.ghcid;
|
|
||||||
haskell-language-server = hp.haskell-language-server.overrideScope (lself: lsuper: {
|
|
||||||
ormolu = fixCyclicReference hp.ormolu;
|
|
||||||
});
|
|
||||||
} // config.treefmt.build.programs;
|
} // config.treefmt.build.programs;
|
||||||
# overrides = self: super: with pkgs.haskell.lib; {};
|
hlsCheck.enable = false;
|
||||||
hlsCheck.enable = false;
|
hlintCheck.enable = true;
|
||||||
hlintCheck.enable = true;
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Auto formatters. This also adds a flake check to ensure that the
|
# Auto formatters. This also adds a flake check to ensure that the
|
||||||
|
|
Loading…
Reference in a new issue