From 815e771da3118742a78c3a301f2e5da9b8eda81f Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Thu, 6 Jan 2022 22:48:53 +0100 Subject: [PATCH] Add proximity-sort --- packages.nix | 1 + packages/cliclick.nix | 2 +- packages/proximity-sort.nix | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 packages/proximity-sort.nix diff --git a/packages.nix b/packages.nix index bd98cb9..6b55dda 100644 --- a/packages.nix +++ b/packages.nix @@ -2,4 +2,5 @@ { cliclick = import ./packages/cliclick.nix { inherit system lib pkgs; }; + proximity-sort = import ./packages/proximity-sort.nix { inherit system lib pkgs; }; } diff --git a/packages/cliclick.nix b/packages/cliclick.nix index 7d3a0ef..e3eecef 100644 --- a/packages/cliclick.nix +++ b/packages/cliclick.nix @@ -6,7 +6,7 @@ pkgs.stdenv.mkDerivation { src = pkgs.fetchFromGitHub { owner = "BlueM"; - repo = "cliclick"; + repo = pname; rev = "79a49ff25f550fda5b2a1806366aa9d7facc46f3"; sha256 = "Wj1niLXCwBYTsXB2Qkdvs85BJD7uRqGIerCTjhS20ZQ="; fetchSubmodules = false; diff --git a/packages/proximity-sort.nix b/packages/proximity-sort.nix new file mode 100644 index 0000000..3133a5e --- /dev/null +++ b/packages/proximity-sort.nix @@ -0,0 +1,22 @@ +{ system, lib, pkgs }: + +pkgs.rustPlatform.buildRustPackage rec { + pname = "proximity-sort"; + version = "1.0.7"; + + src = pkgs.fetchFromGitHub { + owner = "jonhoo"; + repo = pname; + rev = "v${version}"; + sha256 = "ZDG45GETZfkCo6OO5DaN10EviaOf18k71Kw6Ni8ygDQ="; + }; + + cargoSha256 = "sha256-/FF5CtUdf5uSu9AR9OPRXisYs6PRTwKwGWssxzVpb4g="; + + meta = with lib; { + description = "Simple command-line utility for sorting inputs by proximity to a path argument"; + homepage = "https://github.com/jonhoo/proximity-sort"; + license = [ licenses.asl20 licenses.mit ]; + platforms = [ "x86_64-darwin" "aarch64-darwin" ]; + }; +}