aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix46
1 files changed, 14 insertions, 32 deletions
diff --git a/flake.nix b/flake.nix
index bbd444f..116626b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,43 +8,25 @@
8 flaky-utils.url = "git+https://cgit.euxane.eu/flaky-utils"; 8 flaky-utils.url = "git+https://cgit.euxane.eu/flaky-utils";
9 }; 9 };
10 10
11 outputs = { self, nixpkgs, flake-utils, flaky-utils }: 11 outputs = { self, nixpkgs, flake-utils, flaky-utils }: let
12 flake-utils.lib.eachDefaultSystem (system: let 12
13 mkPackage = pkgs: pkgs.callPackage ./nix/package.nix {
14 src = ./.;
15 version = self.rev or self.dirtyRev;
16 };
17
18 in flake-utils.lib.eachDefaultSystem (system: let
13 pkgs = import nixpkgs { inherit system; }; 19 pkgs = import nixpkgs { inherit system; };
14 in { 20 in {
15 devShell = flaky-utils.lib.mkDevShell {
16 inherit pkgs;
17 21
18 tools = with pkgs; [ 22 packages = {
19 nim 23 default = self.packages.${system}.tickwatch;
20 nrpl 24 tickwatch = mkPackage pkgs;
21 nim-atlas 25 };
22 nimble
23 nimlangserver
24 nim_lk
25 ];
26
27 prePrompt = ''
28 echo "<C-d> to exit this development shell."
29 '';
30 26
31 shell = null; 27 devShells.default = import ./nix/devshell.nix {
28 inherit flaky-utils pkgs;
32 }; 29 };
33 30
34 packages.default = pkgs.stdenv.mkDerivation (final: {
35 pname = "tickwatch";
36 meta.mainProgram = final.pname;
37 version = "SNAPSHOT";
38 src = ./.;
39 buildInputs = [ pkgs.nim ];
40 doCheck = true;
41 makeFlags = [
42 "NIM_FLAGS=--nimcache:."
43 "VERSION=${final.version}"
44 ];
45 installFlags = [
46 "DESTDIR=$(out)"
47 ];
48 });
49 }); 31 });
50} 32}