-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
/
Copy pathpackage.nix
50 lines (45 loc) · 1.26 KB
/
package.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
50
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
clang_16,
testers,
nixel,
}:
let
clang = clang_16;
rustPlatform' = rustPlatform // {
bindgenHook = rustPlatform.bindgenHook.override { inherit clang; };
};
in
rustPlatform'.buildRustPackage rec {
pname = "nixel";
version = "5.1.1";
src = fetchFromGitHub {
owner = "kamadorueda";
repo = pname;
rev = version;
sha256 = "sha256-wIXZd8iujLqbgbV+abWmIfjDgQ8i6nyE5jTAs3OczXM=";
};
cargoHash = "sha256-GJ2UO8MvujRxFjzdt2Tfrlfzv1jot9XCrmfBqTFVngI=";
nativeBuildInputs = [
rustPlatform'.bindgenHook # .override { clang = clang_16; }
];
# Package requires a non reproducible submodule
# https://github.com/kamadorueda/nixel/blob/2873bd84bf4fc540d0ae8af062e109cc9ad40454/.gitmodules#L7
doCheck = false;
#
# Let's test it runs
passthru.tests = {
version = testers.testVersion { package = nixel; };
};
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Lexer, Parser, Abstract Syntax Tree and Concrete Syntax Tree for the Nix Expressions Language";
mainProgram = "nixel";
homepage = "https://github.com/kamadorueda/nixel";
license = licenses.agpl3Only;
maintainers = with maintainers; [ kamadorueda ];
};
}