depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/lucky-commit/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

37 lines
910 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, withOpenCL ? true
, stdenv
, OpenCL
, ocl-icd
}:
rustPlatform.buildRustPackage rec {
pname = "lucky-commit";
version = "2.1.0";
src = fetchFromGitHub {
owner = "not-an-aardvark";
repo = pname;
rev = "v${version}";
sha256 = "0vs668i1yglfcqs94jhwdk90v0lja2w5kr5gakz082wykilms0zg";
};
cargoSha256 = "sha256-MvopLKhovwXaEmRgXnAzJeuhPgqnMjt0EtKUGSWFpaY=";
buildInputs = lib.optional withOpenCL (if stdenv.isDarwin then OpenCL else ocl-icd);
buildNoDefaultFeatures = !withOpenCL;
# disable tests that require gpu
checkNoDefaultFeatures = true;
meta = with lib; {
description = "Change the start of your git commit hashes to whatever you want";
homepage = "https://github.com/not-an-aardvark/lucky-commit";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "lucky_commit";
};
}