2022-09-09 14:08:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, zig, testers, findup }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "findup";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.1.1";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-07-15 17:15:38 +00:00
|
|
|
owner = "booniepepper";
|
2022-09-09 14:08:57 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-Tpyiy5oJQ04lqVEOFshFC0+90VoNILQ+N6Dd7lbuH/Q=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ zig ];
|
|
|
|
|
|
|
|
# Builds and installs (at the same time) with Zig.
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
# Give Zig a directory for intermediate work.
|
|
|
|
preInstall = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
zig build -Drelease-safe -Dcpu=baseline --prefix $out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion { package = findup; };
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/booniepepper/findup";
|
2022-09-09 14:08:57 +00:00
|
|
|
description = "Search parent directories for sentinel files";
|
|
|
|
license = licenses.mit;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ booniepepper ];
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|