Skip to content

Commit b1bf549

Browse files
michaelpjpepeiborrasmunix
authored
nix update (#2892)
* Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: NixOS/nixpkgs#163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
1 parent 9e1738e commit b1bf549

9 files changed

+420
-101
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test/testdata/**/hie.yaml
3131
.shake/
3232

3333
# pre-commit-hook.nix
34-
#.pre-commit-config.yaml
34+
.pre-commit-config.yaml
3535

3636
# direnv
3737
/.direnv/

cabal.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ package *
4343

4444
write-ghc-environment-files: never
4545

46-
index-state: 2022-04-27T09:22:49Z
46+
index-state: 2022-04-30T21:02:45Z
4747

4848
constraints:
4949
hyphenation +embed,

configuration-ghc-90.nix

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{ pkgs, inputs }:
2+
3+
let
4+
disabledPlugins = [ "hls-brittany-plugin" "hls-stylish-haskell-plugin" ];
5+
6+
hpkgsOverride = hself: hsuper:
7+
with pkgs.haskell.lib;
8+
{
9+
hlsDisabledPlugins = disabledPlugins;
10+
# YOLO
11+
mkDerivation = args:
12+
hsuper.mkDerivation (args // {
13+
jailbreak = true;
14+
doCheck = false;
15+
});
16+
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
17+
# ptr-poker breaks on MacOS without SSE2 optimizations
18+
# https://github.com/nikita-volkov/ptr-poker/issues/11
19+
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
20+
21+
ghc-lib = hself.ghc-lib_9_2_2_20220307;
22+
ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307;
23+
ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_3;
24+
25+
Cabal = hself.Cabal_3_6_3_0;
26+
ormolu = hself.ormolu_0_4_0_0;
27+
fourmolu = hself.fourmolu_0_6_0_0;
28+
29+
# Hlint is still broken
30+
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { });
31+
32+
hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
33+
./plugins/hls-hlint-plugin
34+
(pkgs.lib.concatStringsSep " " [ "-fhlint34" "-fghc-lib" ]) { };
35+
36+
# Re-generate HLS drv excluding some plugins
37+
haskell-language-server =
38+
hself.callCabal2nixWithOptions "haskell-language-server" ./.
39+
(pkgs.lib.concatStringsSep " " [ "-f-brittany" "-f-stylishhaskell" ])
40+
{ };
41+
});
42+
in {
43+
inherit disabledPlugins;
44+
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
45+
}

configuration-ghc-92.nix

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{ pkgs, inputs }:
2+
3+
let
4+
disabledPlugins = [
5+
"hls-hlint-plugin"
6+
# That one is not technically a plugin, but by putting it in this list, we
7+
# get it removed from the top level list of requirement and it is not pull
8+
# in the nix shell.
9+
"shake-bench"
10+
];
11+
12+
hpkgsOverride = hself: hsuper:
13+
with pkgs.haskell.lib;
14+
{
15+
hlsDisabledPlugins = disabledPlugins;
16+
# YOLO
17+
mkDerivation = args:
18+
hsuper.mkDerivation (args // {
19+
jailbreak = true;
20+
doCheck = false;
21+
});
22+
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
23+
# ptr-poker breaks on MacOS without SSE2 optimizations
24+
# https://github.com/nikita-volkov/ptr-poker/issues/11
25+
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
26+
27+
ghc-exactprint =
28+
hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { };
29+
# Hlint is still broken
30+
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });
31+
32+
# Re-generate HLS drv excluding some plugins
33+
haskell-language-server =
34+
hself.callCabal2nixWithOptions "haskell-language-server" ./.
35+
(pkgs.lib.concatStringsSep " " [ "-fpedantic" "-f-hlint" ]) { };
36+
});
37+
in {
38+
inherit disabledPlugins;
39+
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
40+
}

docs/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Sphinx==4.0.2
22
sphinx-rtd-theme==0.5.2
33
myst-parser==0.15.1
4-
docutils<0.17
4+
docutils<0.19

docutils.nix

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{ stdenv, lib, fetchPypi, buildPythonPackage, isPy3k, python }:
2+
3+
buildPythonPackage rec {
4+
pname = "docutils";
5+
version = "0.17.1";
6+
7+
src = fetchPypi {
8+
inherit pname version;
9+
sha256 = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125";
10+
};
11+
12+
# Only Darwin needs LANG, but we could set it in general.
13+
# It's done here conditionally to prevent mass-rebuilds.
14+
checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin)
15+
''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + ''
16+
${python.interpreter} test/alltests.py
17+
'';
18+
19+
# Create symlinks lacking a ".py" suffix, many programs depend on these names
20+
postFixup = ''
21+
for f in $out/bin/*.py; do
22+
ln -s $(basename $f) $out/bin/$(basename $f .py)
23+
done
24+
'';
25+
26+
meta = with lib; {
27+
description = "Python Documentation Utilities";
28+
homepage = "http://docutils.sourceforge.net/";
29+
license = with licenses; [ publicDomain bsd2 psfl gpl3Plus ];
30+
maintainers = with maintainers; [ AndersonTorres ];
31+
};
32+
}

0 commit comments

Comments
 (0)