-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
72 lines (62 loc) · 1.81 KB
/
flake.nix
File metadata and controls
72 lines (62 loc) · 1.81 KB
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
rec {
description = "Devkit Environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-24.11-darwin";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
apps.sk = {
type = "app";
program = "${self.packages.${system}.sk}/bin/sk";
};
packages.sk = pkgs.callPackage
({ lib, stdenv, lua, fmt, doctest, yaml-cpp, ninja, cmake, meson, pkg-config, installShellFiles }:
stdenv.mkDerivation rec{
pname = "devkit";
version = "develop";
src = ./.;
dontUseCmakeConfigure = true;
buildInputs = [ lua fmt doctest yaml-cpp ];
nativeBuildInputs = [ ninja cmake meson pkg-config installShellFiles ];
postInstall = ''
installShellCompletion --zsh ${src}/completions/sk.zsh
installShellCompletion --fish ${src}/completions/sk.fish
'';
meta = with lib; {
description = "devkit";
license = licenses.mit;
};
})
{ };
devShell = pkgs.mkShell {
buildInputs = [
pkgs.lua
pkgs.fmt
pkgs.doctest
pkgs.yaml-cpp
];
nativeBuildInputs = [
pkgs.ninja
pkgs.cmake
pkgs.meson
pkgs.pkg-config
pkgs.ccache
pkgs.nixd
pkgs.nixpkgs-fmt
pkgs.clang-tools
pkgs.lua-language-server
];
shellHook = ''
echo ${description}
'';
};
}
);
}