2019-02-25 15:47:18 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, darwin }:
|
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
2019-04-19 15:34:40 +01:00
|
|
|
pname = "git-ignore";
|
|
|
|
version = "1.0.0";
|
2019-02-25 15:47:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sondr3";
|
2019-04-19 15:34:40 +01:00
|
|
|
repo = pname;
|
2019-02-25 15:47:18 +00:00
|
|
|
rev = "v${version}";
|
2019-04-19 15:34:40 +01:00
|
|
|
sha256 = "0krz50pw9bkyzl78bvppk6skbpjp8ga7bd34jya4ha1xfmd8p89c";
|
2019-02-25 15:47:18 +00:00
|
|
|
};
|
|
|
|
|
2019-05-25 12:03:08 +01:00
|
|
|
cargoSha256 = "1ccipxifnm38315qigaq28hlzam2wr8q2p2dbcq96kar6pq377vf";
|
2019-04-19 15:34:40 +01:00
|
|
|
|
2019-02-25 15:47:18 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
2019-04-20 07:00:24 +01:00
|
|
|
outputs = [ "out" "man" ];
|
2019-04-19 15:34:40 +01:00
|
|
|
preFixup = ''
|
2019-04-20 07:00:24 +01:00
|
|
|
mkdir -p "$man/man/man1"
|
|
|
|
cp target/release/build/git-ignore-*/out/git-ignore.1 "$man/man/man1/"
|
2019-04-19 15:34:40 +01:00
|
|
|
'';
|
|
|
|
|
2019-02-25 15:47:18 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Quickly and easily fetch .gitignore templates from gitignore.io";
|
|
|
|
homepage = https://github.com/sondr3/git-ignore;
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.sondr3 ];
|
|
|
|
};
|
|
|
|
}
|