]> Git — Sourcephile - haskell/symantic-parser.git/blob - flake.nix
wip
[haskell/symantic-parser.git] / flake.nix
1 {
2 inputs.nixpkgs.url = "flake:nixpkgs";
3 inputs.symantic-base.url = "git://git.sourcephile.fr/haskell/symantic-base";
4 inputs.symantic-base.inputs.nixpkgs.follows = "nixpkgs";
5 outputs = inputs: let
6 pkg = "symantic-parser";
7 lib = inputs.nixpkgs.lib;
8 forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f rec {
9 inherit system;
10 pkgs = inputs.nixpkgs.legacyPackages.${system};
11 haskellPackages = pkgs.haskellPackages.extend (with pkgs.haskell.lib; hfinal: hsuper: {
12 ${pkg} = doBenchmark (buildFromSdist (hfinal.callCabal2nix pkg ./. {}));
13 eventlog2html = doJailbreak (unmarkBroken hsuper.eventlog2html);
14 hs-speedscope = doJailbreak (unmarkBroken hsuper.hs-speedscope);
15 #ormolu = doJailbreak (unmarkBroken hsuper.ormolu);
16 symantic-base = buildFromSdist (hfinal.callCabal2nix "symantic-base" inputs.symantic-base {});
17 #text-short = dontCheck hsuper.text-short;
18 #trie-simple = doJailbreak (unmarkBroken hsuper.trie-simple);
19 #criterion = dontCheck hsuper.criterion; # Reason "killed for running longer than 30 seconds!"
20 });
21 });
22 in {
23 # nix -L build
24 defaultPackage = forAllSystems ({haskellPackages, ...}: haskellPackages.${pkg});
25 # nix -L develop
26 devShell = forAllSystems ({pkgs, haskellPackages, ...}:
27 haskellPackages.shellFor {
28 packages = ps: [ ps.${pkg} ];
29 nativeBuildInputs = [
30 haskellPackages.cabal-install
31 #haskellPackages.eventlog2html
32 #haskellPackages.ghc-events
33 haskellPackages.ghcid
34 haskellPackages.haskell-language-server
35 haskellPackages.hlint
36 #haskellPackages.hs-speedscope
37 haskellPackages.ormolu
38 #haskellPackages.profiteur
39 pkgs.git-chglog
40 pkgs.reuse
41 ];
42 withHoogle = false;
43 doBenchmark = true;
44 # FIXME: remove when Nixpkgs' haskellPackages.ormolu is no longer broken
45 CABAL_TEST_FLAGS = "-fdisable-ormolu-check";
46 });
47 };
48 }