nixpkgs/pkgs/applications/version-management/lucky-commit/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
907 B
Nix
Raw Normal View History

2021-10-22 15:58:49 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, withOpenCL ? true
2021-10-30 16:48:45 +00:00
, stdenv
, OpenCL
2021-10-22 15:58:49 +00:00
, ocl-icd
}:
rustPlatform.buildRustPackage rec {
pname = "lucky-commit";
2023-11-27 06:22:58 +00:00
version = "2.2.2";
2021-10-22 15:58:49 +00:00
src = fetchFromGitHub {
owner = "not-an-aardvark";
repo = pname;
rev = "v${version}";
2023-11-27 06:22:58 +00:00
sha256 = "sha256-DrgZBzcJmqSP7iCHZyy623iRZYfTE/z/zzx7I+BAOBo=";
2021-10-22 15:58:49 +00:00
};
2023-11-27 06:22:58 +00:00
cargoHash = "sha256-5P0CiLCf86Jul4EaIDqHGkp4XNifLKnWJZXtrLkpLMY=";
2021-10-22 15:58:49 +00:00
2021-10-30 16:48:45 +00:00
buildInputs = lib.optional withOpenCL (if stdenv.isDarwin then OpenCL else ocl-icd);
2021-10-22 15:58:49 +00:00
buildNoDefaultFeatures = !withOpenCL;
2021-10-22 15:58:49 +00:00
# disable tests that require gpu
checkNoDefaultFeatures = true;
2021-10-22 15:58:49 +00:00
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";
};
}