about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-02-02 06:31:11 +0100
committerGitHub <noreply@github.com>2023-02-02 06:31:11 +0100
commit2d72fcf67bf78a27e51a05f4c90b0bb0ee113bf2 (patch)
treed96bd5b66a1252d74f7de94ef37b0e7ca0ac5e58 /pkgs
parentf210c8c78be7d7cc063b76024df3a89b3d10042a (diff)
parenta66af6ba3a3bfe40ca746487fa343662f1907744 (diff)
Merge pull request #214069 from roman/roman/fix-locate-dominating-file-on-macos
locate-dominating-file: fix Darwin build
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/locate-dominating-file/default.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/tools/misc/locate-dominating-file/default.nix b/pkgs/tools/misc/locate-dominating-file/default.nix
index c4c55ca3b0684..7e0d0664b563e 100644
--- a/pkgs/tools/misc/locate-dominating-file/default.nix
+++ b/pkgs/tools/misc/locate-dominating-file/default.nix
@@ -2,13 +2,14 @@
 , bash
 , fetchFromGitHub
 , lib
-, stdenvNoCC
+, resholve
+, coreutils
 , getopt
 }:
 let
   version = "0.0.1";
 in
-stdenvNoCC.mkDerivation {
+resholve.mkDerivation {
   pname = "locate-dominating-file";
   inherit version;
   src = fetchFromGitHub {
@@ -24,12 +25,12 @@ stdenvNoCC.mkDerivation {
     done
   '';
 
-  buildInputs = [ getopt ];
-
-  doCheck = true;
+  buildInputs = [ getopt coreutils ];
 
   checkInputs = [ (bats.withLibraries (p: [ p.bats-support p.bats-assert ])) ];
 
+  doCheck = true;
+
   checkPhase = ''
     runHook preCheck
 
@@ -47,6 +48,15 @@ stdenvNoCC.mkDerivation {
     runHook postInstall
   '';
 
+  solutions.default = {
+    scripts = [ "bin/locate-dominating-file" ];
+    interpreter = "${bash}/bin/bash";
+    inputs = [
+      coreutils
+      getopt
+    ];
+  };
+
   meta = with lib; {
     homepage = "https://github.com/roman/locate-dominating-file";
     description = "Program that looks up in a directory hierarchy for a given filename";