Skip to content

Commit dfe157e

Browse files
committed
Always just executables and don't build haddock
- Doesn't inflate closure size to over 2GB, see NixOS#143 - The API docs aren't important and we're intending on deprecating the hackage package, see NixOS#161
1 parent 59c8792 commit dfe157e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
run: nix shell .#packages.x86_64-linux.reuse -c reuse lint
2323

2424
- name: build nixfmt
25-
run: nix build -L .#nixfmt-static
25+
run: nix build -L .
2626
if: success() || failure()

default.nix

+6-3
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,17 @@ let
4040
];
4141
};
4242

43-
build = pkgs.haskellPackages.nixfmt;
43+
build = lib.pipe pkgs.haskellPackages.nixfmt [
44+
haskell.lib.justStaticExecutables
45+
haskell.lib.dontHaddock
46+
(drv: lib.lazyDerivation { derivation = drv; })
47+
];
4448
in
4549
build
4650
// rec {
4751
packages = {
4852
nixfmt = build;
49-
nixfmt-static = haskell.lib.justStaticExecutables packages.nixfmt;
50-
nixfmt-deriver = packages.nixfmt-static.cabal2nixDeriver;
53+
nixfmt-deriver = build.cabal2nixDeriver;
5154

5255
nixfmt-shell = packages.nixfmt.env.overrideAttrs (oldAttrs: {
5356
buildInputs =

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
apps.default = {
2222
type = "app";
23-
program = "${self.packages.${system}.nixfmt-static}/bin/nixfmt";
23+
program = "${result}/bin/nixfmt";
2424
};
2525

2626
checks = result.checks;

0 commit comments

Comments
 (0)