4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
32 lines
953 B
Nix
32 lines
953 B
Nix
{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, python3, xorg, cmake, libgit2, darwin
|
|
, curl }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "amp";
|
|
version = "0.6.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jmacdonald";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0l1vpcfq6jrq2dkrmsa4ghwdpp7c54f46gz3n7nk0i41b12hnigw";
|
|
};
|
|
|
|
cargoSha256 = "09v991rl2w4c4jh7ga7q1lk6wyl2vr71j5cpniij8mcvszrz78qf";
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig python3 ];
|
|
buildInputs = [ openssl xorg.libxcb libgit2 ] ++ stdenv.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 = "A modern text editor inspired by Vim";
|
|
homepage = "https://amp.rs";
|
|
license = [ licenses.gpl3 ];
|
|
maintainers = [ maintainers.sb0 ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|