2018-12-03 14:15:57 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "vivid";
|
2019-12-04 23:34:08 +00:00
|
|
|
version = "0.5.0";
|
2018-12-03 14:15:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sharkdp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-12-04 23:34:08 +00:00
|
|
|
sha256 = "00xxk1ipr3hndd717q52j7s2wfxis1p4glaa9lvp72gwwzmv5k9w";
|
2018-12-03 14:15:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/main.rs --replace /usr/share $out/share
|
|
|
|
'';
|
|
|
|
|
2020-02-14 02:00:26 +00:00
|
|
|
# Delete this on next update; see #79975 for details
|
|
|
|
legacyCargoFetcher = true;
|
|
|
|
|
2019-12-04 23:34:08 +00:00
|
|
|
cargoSha256 = "04xx26ngz7hx7bv5g01q9h6dqa96xkx0xm3jb0qk6c3hp6500zpn";
|
2018-12-03 14:15:57 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/${pname}
|
|
|
|
cp -rv config/* themes $out/share/${pname}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A generator for LS_COLORS with support for multiple color themes";
|
|
|
|
homepage = https://github.com/sharkdp/vivid;
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = [ maintainers.dtzWill ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|