From 7b006dd9b84da5c7596f0766868dc888006ef4ab Mon Sep 17 00:00:00 2001 From: Wu Zhenyu Date: Tue, 22 Nov 2022 19:37:48 +0800 Subject: [PATCH] has: init at 1.4.0 --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/applications/misc/has/default.nix | 29 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 37 insertions(+) create mode 100644 pkgs/applications/misc/has/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ee2014d6525b..b94729ff46e8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4775,6 +4775,12 @@ githubId = 7551358; name = "Frede Emil"; }; + Freed-Wu = { + email = "wuzhenyu@ustc.edu"; + github = "Freed-Wu"; + githubId = 32936898; + name = "Wu Zhenyu"; + }; freezeboy = { email = "freezeboy@users.noreply.github.com"; github = "freezeboy"; diff --git a/pkgs/applications/misc/has/default.nix b/pkgs/applications/misc/has/default.nix new file mode 100644 index 000000000000..144d8073ff0e --- /dev/null +++ b/pkgs/applications/misc/has/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenvNoCC, fetchFromGitHub }: + +stdenvNoCC.mkDerivation (finalAttrs: rec { + pname = "has"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "kdabir"; + repo = "has"; + rev = "v${finalAttrs.version}"; + hash = "sha256-3XsNSl4lQfJjEPNGoFj6ABXGkwOUsg9AFDAz8euZApE="; + }; + + dontBuild = true; + + installPhase = '' + runHook preInstall + install -Dm0555 ${pname} -t $out/bin + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/kdabir/has"; + description = "Checks presence of various command line tools and their versions on the path"; + license = licenses.mit; + maintainers = with maintainers; [ Freed-Wu ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 48a0ec0c45a6..524d0915a211 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4294,6 +4294,8 @@ with pkgs; gti = callPackage ../tools/misc/gti { }; + has = callPackage ../applications/misc/has { }; + hdate = callPackage ../applications/misc/hdate { }; heatseeker = callPackage ../tools/misc/heatseeker { };