depot/third_party/nixpkgs/pkgs/by-name/tp/tpnote/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

69 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
cmake,
pkg-config,
oniguruma,
darwin,
installShellFiles,
tpnote,
testers,
}:
rustPlatform.buildRustPackage rec {
pname = "tpnote";
version = "1.25.2";
src = fetchFromGitHub {
owner = "getreu";
repo = "tp-note";
rev = "v${version}";
hash = "sha256-8AUPNjrT4/Vu8ykTHuDSdnCteih3i61CrfRBfPMwCfY=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-+qtphGkypyVY8SZsEmejikhnu18WIuvABlYGNA3GDUw=";
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 ];
};
}