@@ -0,0 +1,33 @@
1+{ stdenv, fetchFromGitHub, rustPlatform }:
2+
3+rustPlatform.buildRustPackage rec {
4+ name = "${pname}-${version}";
5+ pname = "vivid";
6+ version = "0.4.0";
7+
8+ src = fetchFromGitHub {
9+ owner = "sharkdp";
10+ repo = pname;
11+ rev = "v${version}";
12+ sha256 = "13x0295v5blvv8dxhimbdjh81l7xl0vm6zni3qjd85psfn61371q";
13+ };
14+
15+ postPatch = ''
16+ substituteInPlace src/main.rs --replace /usr/share $out/share
17+ '';
18+
19+ cargoSha256 = "156wapa2ds7ij1jhrpa8mm6dicwq934qxl56sqw3bgz6pfa8fldz";
20+
21+ postInstall = ''
22+ mkdir -p $out/share/${pname}
23+ cp -rv config/* themes $out/share/${pname}
24+ '';
25+
26+ meta = with stdenv.lib; {
27+ description = "A generator for LS_COLORS with support for multiple color themes";
28+ homepage = https://github.com/sharkdp/vivid;
29+ license = with licenses; [ asl20 /* or */ mit ];
30+ maintainers = [ maintainers.dtzWill ];
31+ platforms = platforms.unix;
32+ };
33+}