-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154860 from hiljusti/init/findup
findup: init at 1.0
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ lib, stdenv, fetchFromGitHub, zig, testers, findup }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "findup"; | ||
version = "1.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "hiljusti"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
sha256 = "sha256-erlKIiYYlWnhoeD3FnKdxnHjfGmmJVXk44DUja5Unig="; | ||
}; | ||
|
||
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; { | ||
homepage = "https://github.com/hiljusti/findup"; | ||
description = "Search parent directories for sentinel files"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ hiljusti ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters