Merge pull request #210256 from roman/roman/pkg/locate-dominating-file
locate-dominating-file: init 0.0.1
This commit is contained in:
commit
e148951a07
|
@ -12263,6 +12263,12 @@
|
|||
githubId = 710906;
|
||||
name = "Roel van Dijk";
|
||||
};
|
||||
roman = {
|
||||
email = "open-source@roman-gonzalez.info";
|
||||
github = "roman";
|
||||
githubId = 7335;
|
||||
name = "Roman Gonzalez";
|
||||
};
|
||||
romildo = {
|
||||
email = "malaquias@gmail.com";
|
||||
github = "romildo";
|
||||
|
|
56
pkgs/tools/misc/locate-dominating-file/default.nix
Normal file
56
pkgs/tools/misc/locate-dominating-file/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ bats
|
||||
, bash
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, stdenvNoCC
|
||||
, getopt
|
||||
}:
|
||||
let
|
||||
version = "0.0.1";
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "locate-dominating-file";
|
||||
inherit version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "roman";
|
||||
repo = "locate-dominating-file";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-gwh6fAw7BV7VFIkQN02QIhK47uxpYheMk64UeLyp2IY=";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
for file in $(find src tests -type f); do
|
||||
patchShebangs "$file"
|
||||
done
|
||||
'';
|
||||
|
||||
buildInputs = [ getopt ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp src/locate-dominating-file.sh $out/bin/locate-dominating-file
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
checkInputs = [ (bats.withLibraries (p: [ p.bats-support p.bats-assert ])) ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
bats -t tests
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Program that looks up in a directory hierarchy for a given filename";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.roman ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -38716,6 +38716,8 @@ with pkgs;
|
|||
|
||||
tuner = callPackage ../applications/audio/tuner { };
|
||||
|
||||
locate-dominating-file = callPackage ../tools/misc/locate-dominating-file { };
|
||||
|
||||
jfrog-cli = callPackage ../tools/misc/jfrog-cli { };
|
||||
|
||||
ov = callPackage ../tools/text/ov { };
|
||||
|
|
Loading…
Reference in a new issue