2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, python3, xorg, cmake, libgit2, darwin
|
2019-09-16 00:29:08 +02:00
|
|
|
, curl }:
|
2019-06-11 13:48:56 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "amp";
|
2024-01-24 08:42:28 +01:00
|
|
|
version = "0.7.0";
|
2019-06-11 13:48:56 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmacdonald";
|
|
|
|
repo = pname;
|
2020-01-18 12:39:17 +01:00
|
|
|
rev = version;
|
2024-01-24 08:42:28 +01:00
|
|
|
sha256 = "sha256-xNadwz2agPbxvgUqrUf1+KsWTmeNh8hJIWcNwTzzM/M=";
|
2019-06-11 13:48:56 +02:00
|
|
|
};
|
|
|
|
|
2024-01-24 08:42:28 +01:00
|
|
|
cargoHash = "sha256-4c72l3R9OyxvslKC4RrIu/Ka3grGxIUCY6iF/NHS5X8=";
|
2019-06-11 13:48:56 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config python3 ];
|
2021-01-15 14:21:58 +01:00
|
|
|
buildInputs = [ openssl xorg.libxcb libgit2 ] ++ lib.optionals stdenv.isDarwin
|
2019-09-16 00:29:08 +02:00
|
|
|
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
|
2019-06-11 13:48:56 +02:00
|
|
|
|
|
|
|
# Tests need to write to the theme directory in HOME.
|
|
|
|
preCheck = "export HOME=`mktemp -d`";
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-06-11 13:48:56 +02:00
|
|
|
description = "A modern text editor inspired by Vim";
|
|
|
|
homepage = "https://amp.rs";
|
|
|
|
license = [ licenses.gpl3 ];
|
|
|
|
maintainers = [ maintainers.sb0 ];
|
|
|
|
platforms = platforms.unix;
|
2023-11-27 02:17:53 +01:00
|
|
|
mainProgram = "amp";
|
2019-06-11 13:48:56 +02:00
|
|
|
};
|
|
|
|
}
|