-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
75 lines (65 loc) · 1.92 KB
/
flake.nix
File metadata and controls
75 lines (65 loc) · 1.92 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
73
74
75
# SPDX-FileCopyrightText: © 2026 Nikita Krasnov <nikita.nikita.krasnov@gmail.com>
#
# SPDX-License-Identifier: MIT
{
# For VS Code to use the right version of rust-analyzer, add this to your settings:
# "rust-analyzer.server.path": "rust-analyzer"
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version;
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
in
{
formatter = pkgs.nixfmt-rfc-style;
apps.default = {
type = "app";
program = lib.getExe self.packages.${system}.kconfq;
};
packages.default = self.packages.${system}.kconfq;
packages.kconfq = pkgs.callPackage ./nix/kconfq.nix { inherit version; };
packages.libkconfq = pkgs.callPackage ./nix/libkconfq.nix {
inherit version;
stdenv = pkgs.clangStdenv;
};
devShells.default =
pkgs.mkShell.override
{
stdenv = pkgs.clangStdenv;
}
{
inputsFrom = [
self.packages.${system}.kconfq
self.packages.${system}.libkconfq
];
packages = [
pkgs.bash
pkgs.rust-analyzer
pkgs.rustfmt
pkgs.clippy
pkgs.prek
pkgs.reuse
pkgs.jq
pkgs.tree
# pre-commit hooks from https://github.com/pre-commit/pre-commit-hooks repo invoke it
pkgs.uv
pkgs.cargo-edit
];
shellHook = ''
prek install
'';
};
}
);
}