nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5}:
6
7stdenvNoCC.mkDerivation (finalAttrs: {
8 pname = "has";
9 version = "1.5.2";
10
11 src = fetchFromGitHub {
12 owner = "kdabir";
13 repo = "has";
14 rev = "v${finalAttrs.version}";
15 hash = "sha256-sqpKI9RHo0VlGUNU71mIzw4LzExji2FN2FBOAIVo4jI=";
16 };
17
18 dontBuild = true;
19
20 installPhase = ''
21 runHook preInstall
22 install -Dm0555 has -t $out/bin
23 runHook postInstall
24 '';
25
26 meta = {
27 homepage = "https://github.com/kdabir/has";
28 description = "Checks presence of various command line tools and their versions on the path";
29 license = lib.licenses.mit;
30 maintainers = with lib.maintainers; [ Freed-Wu ];
31 platforms = lib.platforms.unix;
32 mainProgram = "has";
33 };
34})