-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
67 lines (61 loc) · 1.85 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
inputs = { nixpkgs.url = "nixpkgs"; };
description = "source code for https://djan.world/";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = f:
nixpkgs.lib.genAttrs supportedSystems (system: f system);
in {
devShells = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in {
djan-world = pkgs.mkShell {
buildInputs = with pkgs; [
haskellPackages.ghc # ghc 9.0.2
zlib.dev
];
};
});
packages = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in rec {
djan-world = pkgs.haskellPackages.mkDerivation {
pname = "djan-world";
version = "1.0";
src = ./.;
license = null;
buildDepends = with pkgs.haskellPackages; [
blaze-html
blaze-svg
typed-process
tasty
tasty-hunit
tasty-golden
directory
co-log-core
(callHackageDirect {
pkg = "relude";
ver = "1.0.0.1";
sha256 = "sha256-tpv6QvG8jhAO8tvfehPuyqJBQNosDaS/83cwMkYQl5g=";
} { })
pkgs.zlib
];
};
djan-world-site = pkgs.stdenv.mkDerivation {
name = "djan-world";
version = "0.1.0";
src = ./.;
buildInputs = with pkgs; [ djan-world ];
buildPhase = ''
# TODO: implement site generator
djan-world > index.html
'';
installPhase = ''
# TODO: copy directory of site
mkdir -p $out && install -D index.html $out/index.html
'';
};
});
};
}