depot/third_party/nixpkgs/pkgs/applications/editors/amp/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

32 lines
967 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, python3, xorg, cmake, libgit2, darwin
, curl }:
rustPlatform.buildRustPackage rec {
pname = "amp";
version = "0.7.0";
src = fetchFromGitHub {
owner = "jmacdonald";
repo = pname;
rev = version;
sha256 = "sha256-xNadwz2agPbxvgUqrUf1+KsWTmeNh8hJIWcNwTzzM/M=";
};
cargoHash = "sha256-4c72l3R9OyxvslKC4RrIu/Ka3grGxIUCY6iF/NHS5X8=";
nativeBuildInputs = [ cmake pkg-config python3 ];
buildInputs = [ openssl xorg.libxcb libgit2 ] ++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
# Tests need to write to the theme directory in HOME.
preCheck = "export HOME=`mktemp -d`";
meta = with lib; {
description = "Modern text editor inspired by Vim";
homepage = "https://amp.rs";
license = [ licenses.gpl3 ];
maintainers = [ maintainers.sb0 ];
platforms = platforms.unix;
mainProgram = "amp";
};
}