2019-09-15 15:29:08 -07:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, python3, xorg, cmake, libgit2, darwin
|
|
|
|
, curl }:
|
2019-06-11 04:48:56 -07:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "amp";
|
2020-01-18 03:39:17 -08:00
|
|
|
version = "0.6.1";
|
2019-06-11 04:48:56 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmacdonald";
|
|
|
|
repo = pname;
|
2020-01-18 03:39:17 -08:00
|
|
|
rev = version;
|
|
|
|
sha256 = "0jhxyl27nwp7rp0lc3kic69g8x55d0azrwlwwhz3z74icqa8f03j";
|
2019-06-11 04:48:56 -07:00
|
|
|
};
|
|
|
|
|
2020-01-18 03:39:17 -08:00
|
|
|
cargoSha256 = "0rk5c8knx8swqzmj7wd18hq2h5ndkzvcbq4lzggpavkk01a8hlb1";
|
2019-06-11 04:48:56 -07:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
2019-09-15 15:29:08 -07:00
|
|
|
buildInputs = [ openssl python3 xorg.libxcb libgit2 ] ++ stdenv.lib.optionals stdenv.isDarwin
|
|
|
|
(with darwin.apple_sdk.frameworks; [ curl Security AppKit ]);
|
2019-06-11 04:48:56 -07: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;
|
|
|
|
};
|
|
|
|
}
|