From 7f1866e127a30f123af95ae6786bef22f65e81e8 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 22 Oct 2021 11:58:49 -0400 Subject: [PATCH] lucky-commit: init at 2.1.0 --- .../git-and-tools/lucky-commit/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/lucky-commit/default.nix diff --git a/pkgs/applications/version-management/git-and-tools/lucky-commit/default.nix b/pkgs/applications/version-management/git-and-tools/lucky-commit/default.nix new file mode 100644 index 000000000000..71c40e86aa97 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/lucky-commit/default.nix @@ -0,0 +1,35 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, withOpenCL ? true +, 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 [ ocl-icd ]; + + cargoBuildFlags = lib.optional (!withOpenCL) "--no-default-features"; + + # disable tests that require gpu + cargoTestFlags = [ "--no-default-features" ]; + + 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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b022361f2752..508bfbc81590 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26207,6 +26207,8 @@ with pkgs; lscolors = callPackage ../applications/misc/lscolors { }; + lucky-commit = callPackage ../applications/version-management/git-and-tools/lucky-commit { }; + luddite = with python3Packages; toPythonApplication luddite; lumail = callPackage ../applications/networking/mailreaders/lumail {