Skip to content

Commit a06efe2

Browse files
committed
overlay test
1 parent a4f25f9 commit a06efe2

14 files changed

+37
-82
lines changed

default.nix

-25
This file was deleted.

devenv.nix

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{ pkgs, compiler ? "ghc948" }:
2+
let
3+
hPkgs = pkgs.haskell.packages."${compiler}";
4+
devTools = with pkgs; [ cabal2nix imagemagick zlib ];
5+
haskDevTools = with hPkgs; [
6+
cabal-install
7+
fourmolu
8+
ghc
9+
ghcid
10+
haskell-language-server
11+
hlint
12+
implicit-hie
13+
retrie
14+
];
15+
tools = devTools ++ haskDevTools;
16+
in pkgs.mkShell {
17+
buildInputs = tools;
18+
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath tools;
19+
}

flake.nix

+18-57
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,29 @@
44
flake-utils.url = "github:numtide/flake-utils";
55
};
66

7-
outputs = { nixpkgs, self, flake-utils }:
7+
outputs = { self, nixpkgs, flake-utils }:
88
# flake-utils.lib.eachDefaultSystem (system:
99
let
10-
compiler = "ghc948";
1110
system = flake-utils.lib.system.x86_64-linux;
12-
hPkgs = pkgs.haskell.packages."${compiler}";
13-
devTools = with pkgs; [
14-
asciinema
15-
asciinema-agg
16-
cabal2nix
17-
imagemagick
18-
zlib
19-
];
11+
pkgs = nixpkgs.legacyPackages.${system};
2012

21-
haskDevTools = with hPkgs; [
22-
ghc
23-
ghcid
24-
fourmolu
25-
hlint
26-
haskell-language-server
27-
implicit-hie
28-
retrie
29-
cabal-install
30-
];
31-
32-
tools = devTools ++ haskDevTools;
33-
34-
pkgs = import nixpkgs {
35-
inherit system;
36-
overlays = [ self.overlays.all ];
37-
};
13+
outputSet = pkgs:
14+
with pkgs; rec {
15+
awscost = callPackage ./packages/awscost.nix { };
16+
booknote = callPackage ./packages/booknote.nix { inherit pdftc; };
17+
epubthumb = callPackage ./packages/epubthumb.nix { };
18+
mdtopdf = callPackage ./packages/mdtopdf.nix { };
19+
newcover = haskell.packages.ghc948.callCabal2nix "" ./newcover { };
20+
pdftc = callPackage ./packages/pdftc.nix { };
21+
roamamer = callPackage ./packages/roamamer.nix { };
22+
seder = callPackage ./packages/seder.nix { };
23+
transcribe = callPackage ./packages/transcribe.nix { };
24+
};
3825

3926
in {
40-
devShells.${system}.default = pkgs.mkShell {
41-
buildInputs = tools;
42-
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath tools;
43-
};
44-
45-
packages.${system} = with pkgs; {
46-
inherit awscost;
47-
inherit booknote;
48-
inherit epubthumb;
49-
inherit mdtopdf;
50-
inherit newcover;
51-
inherit pdftc;
52-
inherit roamamer;
53-
inherit seder;
54-
inherit transcribe;
55-
};
56-
57-
overlays = {
58-
all = final: prev: {
59-
awscost = prev.callPackage ./packages/awscost.nix { };
60-
booknote = prev.callPackage ./packages/booknote.nix { };
61-
epubthumb = prev.callPackage ./packages/epubthumb.nix { };
62-
mdtopdf = prev.callPackage ./packages/mdtopdf.nix { };
63-
newcover = prev.haskell.packages.${compiler}.callPackage ./. { };
64-
pdftc = prev.callPackage ./packages/pdftc.nix { };
65-
roamamer = prev.callPackage ./packages/roamamer.nix { };
66-
seder = prev.callPackage ./packages/seder.nix { };
67-
transcribe = prev.callPackage ./packages/transcribe.nix { };
68-
};
69-
};
27+
devShells.${system}.default = pkgs.callPackage ./devenv.nix { };
28+
checks.${system} = outputSet pkgs;
29+
packages.${system} = outputSet pkgs;
30+
overlays = { all = final: prev: outputSet prev; };
7031
};
7132
}

app/Main.hs newcover/app/Main.hs

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/Main.hs newcover/test/Main.hs

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)