2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, python3, xorg, cmake, libgit2, darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
, curl }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "amp";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmacdonald";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-02-07 01:22:34 +00:00
|
|
|
sha256 = "sha256-xNadwz2agPbxvgUqrUf1+KsWTmeNh8hJIWcNwTzzM/M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
cargoHash = "sha256-4c72l3R9OyxvslKC4RrIu/Ka3grGxIUCY6iF/NHS5X8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config python3 ];
|
2021-01-17 00:15:33 +00:00
|
|
|
buildInputs = [ openssl xorg.libxcb libgit2 ] ++ lib.optionals stdenv.isDarwin
|
2020-04-24 23:36:52 +00:00
|
|
|
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
|
|
|
|
|
|
|
|
# Tests need to write to the theme directory in HOME.
|
|
|
|
preCheck = "export HOME=`mktemp -d`";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Modern text editor inspired by Vim";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://amp.rs";
|
|
|
|
license = [ licenses.gpl3 ];
|
|
|
|
maintainers = [ maintainers.sb0 ];
|
|
|
|
platforms = platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "amp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|