2019-09-15 23:29:08 +01:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, python3, xorg, cmake, libgit2, darwin
|
|
|
|
, curl }:
|
2019-06-11 12:48:56 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "amp";
|
2020-03-07 20:50:29 +00:00
|
|
|
version = "0.6.2";
|
2019-06-11 12:48:56 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmacdonald";
|
|
|
|
repo = pname;
|
2020-01-18 11:39:17 +00:00
|
|
|
rev = version;
|
2020-03-07 20:50:29 +00:00
|
|
|
sha256 = "0l1vpcfq6jrq2dkrmsa4ghwdpp7c54f46gz3n7nk0i41b12hnigw";
|
2019-06-11 12:48:56 +01:00
|
|
|
};
|
|
|
|
|
2020-03-07 20:50:29 +00:00
|
|
|
cargoSha256 = "09v991rl2w4c4jh7ga7q1lk6wyl2vr71j5cpniij8mcvszrz78qf";
|
2019-06-11 12:48:56 +01:00
|
|
|
|
2020-03-29 06:57:57 +01:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig python3 ];
|
|
|
|
buildInputs = [ openssl xorg.libxcb libgit2 ] ++ stdenv.lib.optionals stdenv.isDarwin
|
2019-09-15 23:29:08 +01:00
|
|
|
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
|
2019-06-11 12:48:56 +01:00
|
|
|
|
|
|
|
# Tests need to write to the theme directory in HOME.
|
|
|
|
preCheck = "export HOME=`mktemp -d`";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A modern text editor inspired by Vim";
|
|
|
|
homepage = "https://amp.rs";
|
|
|
|
license = [ licenses.gpl3 ];
|
|
|
|
maintainers = [ maintainers.sb0 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|