diff options
author | Jonas Heinrich <onny@project-insanity.org> | 2022-09-05 16:20:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 16:20:37 +0200 |
commit | 963e4e91416797e29c61794b8478c2436a1348e3 (patch) | |
tree | 5b5c540a1babd5ba7b9fd8ffd24150b822940d1c /pkgs/tools | |
parent | 35516013a77a893b92a9eb8d1336f07d90e473e2 (diff) | |
parent | f78e768d4971cabd98bf078f2c0113aafbd939f8 (diff) |
Merge pull request #154860 from hiljusti/init/findup
findup: init at 1.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/findup/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/misc/findup/default.nix b/pkgs/tools/misc/findup/default.nix new file mode 100644 index 000000000000..0b7d687922f4 --- /dev/null +++ b/pkgs/tools/misc/findup/default.nix @@ -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 ]; + }; +} |