Skip to content

Commit 7111c8c

Browse files
committed
tools: swap to different flake layout/update inputs
1 parent edf842e commit 7111c8c

File tree

2 files changed

+34
-39
lines changed

2 files changed

+34
-39
lines changed

code/hsec-tools/flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code/hsec-tools/flake.nix

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,35 @@
77
};
88

99
outputs = { self, nixpkgs, flake-utils }:
10-
flake-utils.lib.eachDefaultSystem
11-
(system:
12-
let
13-
pkgs = nixpkgs.legacyPackages.${system};
14-
15-
jailbreakUnbreak = pkg:
16-
pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.unmarkBroken pkg));
17-
18-
haskellPackages = pkgs.haskell.packages.ghc925.override
19-
{
20-
overrides = hself: hsuper: {
21-
Cabal-syntax = hsuper.Cabal-syntax_3_8_1_0;
22-
};
23-
};
24-
in
25-
rec
26-
{
27-
packages.hsec-tools =
28-
haskellPackages.callCabal2nix "hsec-tools" ./. {
29-
# Dependency overrides go here
10+
flake-utils.lib.eachDefaultSystem (system:
11+
let
12+
overlays = [ ];
13+
pkgs =
14+
import nixpkgs { inherit system overlays; config.allowBroken = true; };
15+
project = returnShellEnv:
16+
pkgs.haskellPackages.developPackage {
17+
inherit returnShellEnv;
18+
name = "hsec-tools";
19+
root = ./.;
20+
withHoogle = false;
21+
overrides = self: super: with pkgs.haskell.lib; {
3022
};
31-
32-
defaultPackage = packages.hsec-tools;
33-
34-
devShell =
35-
pkgs.mkShell {
36-
buildInputs = with haskellPackages; [
37-
haskell-language-server
38-
ghcid
23+
modifier = drv:
24+
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
25+
[
26+
cabal-fmt
3927
cabal-install
40-
];
41-
inputsFrom = [
42-
self.defaultPackage.${system}.env
43-
];
44-
};
28+
ghcid
29+
haskell-language-server
30+
pkgs.nixpkgs-fmt
31+
]);
32+
};
33+
in
34+
{
35+
# Used by `nix build` & `nix run` (prod exe)
36+
defaultPackage = project true;
37+
38+
# Used by `nix develop` (dev shell)
39+
devShell = project true;
4540
});
4641
}

0 commit comments

Comments
 (0)