-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
85 lines (76 loc) · 2.32 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
inputs.nixpkgs.url = "nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.gitignore_src = {
url = "github:hercules-ci/gitignore.nix";
flake = false;
};
outputs = { self, nixpkgs, flake-utils, gitignore_src}:
(
flake-utils.lib.eachSystem flake-utils.lib.allSystems (
system:
let
pkgs = import nixpkgs {
inherit system;
};
gitignore = import gitignore_src {
lib = pkgs.lib;
};
pythonPackage = pkgs.python3Packages;
yamlns = pythonPackage.buildPythonPackage rec {
pname = "yamlns";
version = "0.9.1";
src = pythonPackage.fetchPypi {
inherit pname version;
sha256 = "sha256-3LDzPmxboU6cRia9Q4b92VZIYpzYTLVZNGday7KiO2g=";
};
propagatedBuildInputs = with pythonPackage; [
pyyaml
nose
rednose
];
};
markdown-customblocks = pythonPackage.buildPythonPackage rec {
pname = "markdown-customblocks";
version = "1.1.1";
src = pythonPackage.fetchPypi {
inherit pname version;
sha256 = "sha256-ZKDjSTog7qbemwV/YQGSBF2lwmRuNZwBomSW6ND6SM4=";
};
propagatedBuildInputs = with pythonPackage; [
decorator
beautifulsoup4
responses
markdown
yamlns
pytest
];
doCheck = false;
};
site = pkgs.stdenv.mkDerivation {
name = "this-week-in-pmd-hacking";
#disable, as it crash the raspi
#src = gitignore.gitignoreSource ./.;
src = ./.;
buildInputs = with pkgs.python3Packages; [
pelican
markdown
markdown-customblocks
];
buildPhase = ''
pelican
'';
installPhase = ''
mkdir $out
cp -r ./output/* $out
'';
};
in
{
packages = {
inherit site;
};
}
)
);
}