Skip to content

Commit

Permalink
Merge pull request #154860 from hiljusti/init/findup
Browse files Browse the repository at this point in the history
findup: init at 1.0
  • Loading branch information
onny authored Sep 5, 2022
2 parents 3551601 + f78e768 commit 963e4e9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
39 changes: 39 additions & 0 deletions pkgs/tools/misc/findup/default.nix
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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6338,6 +6338,8 @@ with pkgs;

findutils = callPackage ../tools/misc/findutils { };

findup = callPackage ../tools/misc/findup { };

bsd-finger = callPackage ../tools/networking/bsd-finger { };
bsd-fingerd = bsd-finger.override({ buildClient = false; });

Expand Down

0 comments on commit 963e4e9

Please sign in to comment.