blob: 1c5f02c8b1ea3af9e502a8f02e8c86cc76c2f4ce (
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
|
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
openssl,
pkg-config,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "codesnap";
version = "0.13.4";
src = fetchFromGitHub {
owner = "codesnap-rs";
repo = "codesnap";
tag = "v${finalAttrs.version}";
hash = "sha256-cMxXzLvnqsloKT7ixMlQnAq+ZempLeEzkWyWxG4jt9Y=";
};
cargoHash = "sha256-QMpncisumxF02lFQ8xsZiR5AYZVSHWlAuuFDg0ZoPtI=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
cargoBuildFlags = [
"-p"
"codesnap-cli"
];
cargoTestFlags = finalAttrs.cargoBuildFlags;
env.OPENSSL_NO_VENDOR = true;
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Command-line tool for generating beautiful code snippets";
homepage = "https://github.com/mistricky/CodeSnap";
changelog = "https://github.com/mistricky/CodeSnap/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nartsiss ];
mainProgram = "codesnap";
};
})
|