-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
49 lines (49 loc) · 1.18 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
/*
# About
This file contains Nix code used to allow the installation of xtodoc via the experimental
flakes feature.
*/
{
description = "Utility for generating markdown documentation from comments in code";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
let
xtodoc = pkgs.crystal.buildCrystalPackage rec {
pname = "xtodoc";
version = "0.0.3";
src = ./.;
crystalBinaries.xtodoc = {
src = "./xtodoc.cr";
options = [];
};
format = "crystal";
doCheck = false;
doInstallCheck = false;
};
/*
In the following section I allow xtodoc to either be installed or tested in a nix
shell environment.
*/
in rec {
defaultApp = flake-utils.lib.mkApp {
drv = defaultPackage;
};
defaultPackage = xtodoc;
devShell = pkgs.mkShell {
buildInputs = [
xtodoc
pkgs.hyperfine
pkgs.linuxPackages.perf
pkgs.valgrind
];
};
});
}