depot/third_party/nixpkgs/pkgs/applications/version-management/lucky-commit/default.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

39 lines
959 B
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
withOpenCL ? true,
stdenv,
OpenCL,
ocl-icd,
}:
rustPlatform.buildRustPackage rec {
pname = "lucky-commit";
version = "2.2.3";
src = fetchFromGitHub {
owner = "not-an-aardvark";
repo = pname;
rev = "v${version}";
sha256 = "sha256-jxcsTtQcSuL+2vwdxIVxqTpKh8Bfvna+hkGt+Rx21FE=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-e3011CvoxoAeXrJqcjKSWbpkQBncFV5qgFLM8ByZOYI=";
buildInputs = lib.optional withOpenCL (if stdenv.hostPlatform.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";
};
}