Skip to content

Commit

Permalink
Merge pull request #1241 from peterbecich/fix-nix-flake
Browse files Browse the repository at this point in the history
fix `flake.nix` for Linux
  • Loading branch information
peterbecich authored Aug 18, 2023
2 parents e5dd400 + 99ad012 commit fd44687
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 202 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nix-flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
nix:
strategy:
fail-fast: true
fail-fast: false
matrix:
os:
- ubuntu-latest
Expand Down
135 changes: 4 additions & 131 deletions flake.lock

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

73 changes: 5 additions & 68 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:nixos/nixpkgs/haskell-updates";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
treefmt-nix.url = "github:numtide/treefmt-nix";
flake-root.url = "github:srid/flake-root";
mission-control.url = "github:Platonic-Systems/mission-control";

linear-generics = {
url = "github:linear-generics/linear-generics";
flake = false;
};

stylish-haskell = {
url = "github:haskell/stylish-haskell";
flake = false;
};

nothunks = {
url = "github:input-output-hk/nothunks";
flake = false;
};

hls-hlint-plugin = {
url = "github:haskell/haskell-language-server?dir=plugins/hls-hlint-plugin";
flake = false;
};
hls-floskell-plugin = {
url = "github:haskell/haskell-language-server?dir=plugins/hls-floskell-plugin";
flake = false;
};
hls-ormolu-plugin = {
url = "github:haskell/haskell-language-server?dir=plugins/hls-ormolu-plugin";
flake = false;
};
hls-graph = {
url = "github:haskell/haskell-language-server?dir=hls-graph";
flake = false;
};
nixpkgs-140774-workaround.url = "github:srid/nixpkgs-140774-workaround";
};

Expand All @@ -59,47 +28,15 @@
inputs.nixpkgs-140774-workaround.haskellFlakeProjectModules.default
];
packages.hackage-server.root = ./.; # Auto-discovered by haskell-flake

overrides = self: super: {
Cabal = super.Cabal_3_10_1_0;
Cabal-syntax = super.Cabal-syntax_3_10_1_0;
doctest-parallel = super.doctest-parallel_0_3_0_1;

ghc-lib-parser = super.ghc-lib-parser_9_4_4_20221225;
ghc-lib-parser-ex = super.ghc-lib-parser-ex_9_4_0_0;
text = super.text_2_0_2;
parsec = self.callHackage "parsec" "3.1.16.1" {};

chell = pkgs.haskell.lib.doJailbreak (self.callHackage "chell" "0.5.0.1" {});
ghc-boot-th = self.callHackage "ghc-boot-th" "9.2.1" {};
hedgehog = self.callHackage "hedgehog" "1.2" {};
tasty-hedgehog = self.callHackage "tasty-hedgehog" "1.4.0.0" {};
optparse-applicative = pkgs.haskell.lib.doJailbreak (super.optparse-applicative_0_15_1_0);
haddock-library = pkgs.haskell.lib.doJailbreak (self.callHackage "haddock-library" "1.11.0" {});

th-abstraction = self.callHackage "th-abstraction" "0.4.5.0" {};
stylish-haskell = super.callCabal2nix "stylish-haskell" inputs.stylish-haskell {};

nothunks = super.callCabal2nix "nothunks" inputs.nothunks {};

# requirements of HLS
# TODO: fix HLS https://github.com/haskell/haskell-language-server/issues/3518
ormolu = self.callHackage "ormolu" "0.5.3.0" {};
fourmolu = pkgs.haskell.lib.dontCheck (self.callHackage "fourmolu" "0.10.1.0" {});
# hls-floskell-plugin = pkgs.haskell.lib.dontCheck (self.callHackage "hls-floskell-plugin" "1.0.2.0" {});
# hls-floskell-plugin = self.callCabal2nix "hls-floskell-plugin" inputs.hls-floskell-plugin {};
# hls-graph = self.callCabal2nix "hls-graph" inputs.hls-graph {};
# hls-graph = self.callHackage "hls-graph" "1.9.0.0" {};
# hls-hlint-plugin = self.callCabal2nix "hls-hlint-plugin" inputs.hls-hlint-plugin {};
# hls-hlint-plugin = self.callHackage "hls-hlint-plugin" "1.1.2.0" {};
# hls-ormolu-plugin = self.callCabal2nix "hls-ormolu-plugin" inputs.hls-ormolu-plugin {};
# hls-ormolu-plugin = self.callHackage "hls-ormolu-plugin" "1.0.2.2" {};
# hls-ormolu-plugin = self.callHackage "hls-ormolu-plugin" "1.0.3.0" {};
# hls-plugin-api = self.callHackage "hls-plugin-api" "1.6.0.0" {};
# hls-test-utils = self.callHackage "hls-test-utils" "1.5.0.0" {};

hlint = self.callHackage "hlint" "3.5" {};

ghcide = pkgs.haskell.lib.dontCheck (self.callHackage "ghcide" "1.9.0.0" {});

streamly = self.callHackage "streamly" "0.9.0" {};
streamly_0_9_0 = self.callHackage "streamly" "0.9.0" {};
};
devShell = {
hlsCheck.enable = false;
Expand Down
4 changes: 2 additions & 2 deletions hackage-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ common defaults
, scientific
-- other dependencies shared by most components
build-depends:
, aeson ^>= 2.2.0.0
, aeson >= 2.1.0.0 && < 2.3
, Cabal >= 3.10.1.0 && < 3.12
, Cabal-syntax >= 3.10.1.0 && < 3.12
-- Cabal-syntax needs to be bound to constrain hackage-security
Expand Down Expand Up @@ -553,7 +553,7 @@ test-suite HighLevelTest
build-depends:
-- version constraints inherited from lib-server
, HTTP
, attoparsec-aeson ^>= 2.2.0.0
, attoparsec-aeson >= 2.1.0.0 && < 2.3
, base64-bytestring
, random
-- component-specific dependencies
Expand Down

0 comments on commit fd44687

Please sign in to comment.