really decouple the nixpkgs workaround (#85)
This commit is contained in:
parent
12ec81a94f
commit
9a272d1d14
2 changed files with 40 additions and 26 deletions
33
flake.lock
generated
33
flake.lock
generated
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"haskell-flake": {
|
"haskell-flake": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675724013,
|
"lastModified": 1676144980,
|
||||||
"narHash": "sha256-RHkxnmNRTwfxSzP/3UUil30h2HyC7QfqYafoJRdyTmE=",
|
"narHash": "sha256-LlB5XRJmAvMc0mTrIntYGrmWX9K/aoDSwylZ4UHQizQ=",
|
||||||
"owner": "srid",
|
"owner": "srid",
|
||||||
"repo": "haskell-flake",
|
"repo": "haskell-flake",
|
||||||
"rev": "7c4af21238b3c94e5eb61daad78fec7df4eaec51",
|
"rev": "5d1f6d9a7695e4cf70ab129fd5dbfe75b018614f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -82,6 +82,32 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-140774-workaround": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": [
|
||||||
|
"flake-parts"
|
||||||
|
],
|
||||||
|
"haskell-flake": [
|
||||||
|
"haskell-flake"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676145473,
|
||||||
|
"narHash": "sha256-EhMHmT2uMwZKdZx7nSbxe0ABqfkxPZZWVVWCSJDMLGw=",
|
||||||
|
"owner": "srid",
|
||||||
|
"repo": "nixpkgs-140774-workaround",
|
||||||
|
"rev": "55fd894a106502653165fe98a4aa3bc0946e3674",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "srid",
|
||||||
|
"repo": "nixpkgs-140774-workaround",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"dir": "lib",
|
||||||
|
@ -123,6 +149,7 @@
|
||||||
"haskell-flake": "haskell-flake",
|
"haskell-flake": "haskell-flake",
|
||||||
"mission-control": "mission-control",
|
"mission-control": "mission-control",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nixpkgs-140774-workaround": "nixpkgs-140774-workaround",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
33
flake.nix
33
flake.nix
|
@ -7,6 +7,11 @@
|
||||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||||
flake-root.url = "github:srid/flake-root";
|
flake-root.url = "github:srid/flake-root";
|
||||||
mission-control.url = "github:Platonic-Systems/mission-control";
|
mission-control.url = "github:Platonic-Systems/mission-control";
|
||||||
|
|
||||||
|
nixpkgs-140774-workaround.url = "github:srid/nixpkgs-140774-workaround";
|
||||||
|
nixpkgs-140774-workaround.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
nixpkgs-140774-workaround.inputs.flake-parts.follows = "flake-parts";
|
||||||
|
nixpkgs-140774-workaround.inputs.haskell-flake.follows = "haskell-flake";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
||||||
|
@ -22,29 +27,11 @@
|
||||||
# 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 = {
|
imports = [
|
||||||
haskell-template.root = ./.;
|
inputs.nixpkgs-140774-workaround.haskellFlakeProjectModules.default
|
||||||
};
|
];
|
||||||
overrides =
|
# packages.haskell-template.root = ./.; # Auto-discovered by haskell-flake
|
||||||
let
|
overrides = self: super: { };
|
||||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/140774
|
|
||||||
nixpkgsWorkaround =
|
|
||||||
let
|
|
||||||
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
|
|
||||||
lib.composeManyExtensions [
|
|
||||||
nixpkgsWorkaround
|
|
||||||
projectOverrides
|
|
||||||
];
|
|
||||||
devShell = {
|
devShell = {
|
||||||
tools = hp: {
|
tools = hp: {
|
||||||
treefmt = config.treefmt.build.wrapper;
|
treefmt = config.treefmt.build.wrapper;
|
||||||
|
|
Loading…
Reference in a new issue