nixpkgs/pkgs/tools/misc/vivid/default.nix
Alyssa Ross 062210bdff treewide: update cargoSha256 hashes for cargo-vendor upgrade
A recent upgrade of cargo-vendor changed its output slightly, which
broke all cargoSha256 hashes in nixpkgs.
See https://github.com/NixOS/nixpkgs/issues/60668 for more information.

Since then, a few hashes have been fixed in master by hand, but there
were a lot still to do, so I did all of the ones left over with some
scripts I wrote.

The one hash I wasn’t able to update was habitat's, because it’s
currently broken and the build doesn’t get far enough to produce a
hash anyway.
2019-06-01 15:17:52 +00:00

34 lines
887 B
Nix

{ stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
name = "${pname}-${version}";
pname = "vivid";
version = "0.4.0";
src = fetchFromGitHub {
owner = "sharkdp";
repo = pname;
rev = "v${version}";
sha256 = "13x0295v5blvv8dxhimbdjh81l7xl0vm6zni3qjd85psfn61371q";
};
postPatch = ''
substituteInPlace src/main.rs --replace /usr/share $out/share
'';
cargoSha256 = "125392a7x0h9jgcqc4wcaky0494xmr82iacxwl883kf0g227rv2y";
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;
};
}