forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / applications / version-management / lucky-commit / default.nix
blob6e3cb2c09d5f9c12b0c6e88769ef6406242d86ae
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , withOpenCL ? true
5 , stdenv
6 , OpenCL
7 , ocl-icd
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "lucky-commit";
12   version = "2.2.3";
14   src = fetchFromGitHub {
15     owner = "not-an-aardvark";
16     repo = pname;
17     rev = "v${version}";
18     sha256 = "sha256-jxcsTtQcSuL+2vwdxIVxqTpKh8Bfvna+hkGt+Rx21FE=";
19   };
21   cargoHash = "sha256-8JkodGtMdYP/IIBqRcJFD5syiZi+VakDyX7VcvR0HLo=";
23   buildInputs = lib.optional withOpenCL (if stdenv.hostPlatform.isDarwin then OpenCL else ocl-icd);
25   buildNoDefaultFeatures = !withOpenCL;
27   # disable tests that require gpu
28   checkNoDefaultFeatures = true;
30   meta = with lib; {
31     description = "Change the start of your git commit hashes to whatever you want";
32     homepage = "https://github.com/not-an-aardvark/lucky-commit";
33     license = licenses.mit;
34     maintainers = with maintainers; [ figsoda ];
35     mainProgram = "lucky_commit";
36   };