blob: 2118e42b1ed84297775420be1815130eeb4c4c60 (
plain)
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
|
# Author: Euxane TRAN-GIRARD
# Licence: EUPL-1.2
{
inputs = {
# For Nim 2.2.0 (necessary for generics, also better C compiler on master)
# https://github.com/NixOS/nixpkgs/pull/346578
nixpkgs.url = "github:NixOS/nixpkgs/7b2fbd2";
flake-utils.url = "github:numtide/flake-utils";
flaky-utils.url = "git+https://cgit.euxane.net/flaky-utils";
};
outputs = { self, nixpkgs, flake-utils, flaky-utils }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs { inherit system; };
in {
devShell = flaky-utils.lib.mkDevShell {
inherit pkgs;
tools = with pkgs; [
nim
nrpl
nim-atlas
nimble
nimlangserver
nim_lk
];
prePrompt = ''
echo "<C-d> to exit this development shell."
'';
shell = null;
};
packages.default = pkgs.stdenv.mkDerivation (final: {
pname = "tickwatch";
meta.mainProgram = final.pname;
version = "SNAPSHOT";
src = ./.;
buildInputs = [ pkgs.nim ];
doCheck = true;
makeFlags = [
"NIM_FLAGS=--nimcache:."
"VERSION=${final.version}"
];
installFlags = [
"DESTDIR=$(out)"
];
});
});
}
|