diff options
author | Jens Getreu <getreu@web.de> | 2024-03-11 12:48:13 +0200 |
---|---|---|
committer | Jens Getreu <getreu@web.de> | 2024-03-13 20:15:33 +0200 |
commit | 9b5f5844404fd895ffb4e5a0d5410757c005d159 (patch) | |
tree | 23fcefe88cbb9e2aada187096a32294438ce96f8 /pkgs/by-name/tp | |
parent | 3925fa19434f2d3677e579d334b829be8aeaa630 (diff) |
tpnote: init at 1.23.9
Diffstat (limited to 'pkgs/by-name/tp')
-rw-r--r-- | pkgs/by-name/tp/tpnote/package.nix | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/by-name/tp/tpnote/package.nix b/pkgs/by-name/tp/tpnote/package.nix new file mode 100644 index 0000000000000..5b4bc6642f338 --- /dev/null +++ b/pkgs/by-name/tp/tpnote/package.nix @@ -0,0 +1,59 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, rustPlatform +, cmake +, pkg-config +, oniguruma +, darwin +, installShellFiles +, tpnote +, testers +}: + + +rustPlatform.buildRustPackage rec { + pname = "tpnote"; + version = "1.23.9"; + + src = fetchFromGitHub { + owner = "getreu"; + repo = "tp-note"; + rev = "v${version}"; + hash = "sha256-HOCd5N8oS8N+9alR3cG7IEghvhvcc8A+O24L6FD1F38="; + }; + + cargoHash = "sha256-T1AYiwGPolYUhJQzTyR7v5dqqNFUCSfSBzU3CithZPw="; + + nativeBuildInputs = [ + cmake + pkg-config + installShellFiles + ]; + buildInputs = [ + oniguruma + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + AppKit + CoreServices + SystemConfiguration + ]); + + 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 ]; + }; +} |