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
909 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";
2022-07-28 01:33:32 +00:00
version = "2.2.1";
2021-10-22 15:58:49 +00:00
src = fetchFromGitHub {
owner = "not-an-aardvark";
repo = pname;
rev = "v${version}";
2022-07-28 01:33:32 +00:00
sha256 = "sha256-0RSNlzmwat89ewQrjdGxLcXo01d+UaPZlteaxZCBRyE=";
2021-10-22 15:58:49 +00:00
};
2022-07-28 01:33:32 +00:00
cargoSha256 = "sha256-8r/EGIiN+HTtChgLTdOS+Y7AdmjswqD4BZtYlL5UiEo=";
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";
};
}