blob: ea58c45f579b14e653601f691d1a5ac632cb6630 (
plain) (
blame)
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
|
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, cmake
, pkg-config
, oniguruma
, darwin
, installShellFiles
, tpnote
, testers
}:
rustPlatform.buildRustPackage rec {
pname = "tpnote";
version = "1.24.8";
src = fetchFromGitHub {
owner = "getreu";
repo = "tp-note";
rev = "v${version}";
hash = "sha256-tn6GCBX3DrqyZZz2FJLTn1vJd4eEbawyJM5huco21/8=";
};
cargoHash = "sha256-2qGObTu7g6GbUwd4obgqufig7bABFLBsCWSyZt8AVac=";
nativeBuildInputs = [
cmake
pkg-config
installShellFiles
];
buildInputs = [
oniguruma
] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
AppKit
CoreServices
SystemConfiguration
]);
postInstall = ''
installManPage docs/build/man/man1/tpnote.1
'';
RUSTONIG_SYSTEM_LIBONIG = true;
passthru.tests.version = testers.testVersion { package = tpnote; };
# The `tpnote` crate has no unit tests. All tests are in `tpnote-lib`.
checkType = "debug";
cargoTestFlags = "--package tpnote-lib";
doCheck = true;
meta = {
changelog = "https://github.com/getreu/tp-note/releases/tag/v${version}";
description = "Markup enhanced granular note-taking";
homepage = "https://blog.getreu.net/projects/tp-note/";
license = lib.licenses.mit;
mainProgram = "tpnote";
maintainers = with lib.maintainers; [ getreu ];
};
}
|