3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #210256 from roman/roman/pkg/locate-dominating-file

locate-dominating-file: init 0.0.1
This commit is contained in:
Anderson Torres 2023-01-24 00:32:33 -03:00 committed by GitHub
commit e148951a07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 0 deletions

View file

@ -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";

View 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;
};
}

View file

@ -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 { };