diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-05-25 16:37:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 16:37:52 +0300 |
commit | 73a022687c4f0206628ac39f42374c0836d67467 (patch) | |
tree | 6bc87179c0fd1ec82ab8369b28c6d2322799e3c1 /pkgs | |
parent | a5c7a7392f38fa5a2c2653d103cb3ab78c2b1958 (diff) | |
parent | dd3f0ee099fc57be74dab478224af30d0521bfff (diff) |
Merge pull request #233822 from nagy/zf
zf: install shell files, run tests
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/misc/zf/default.nix | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/tools/misc/zf/default.nix b/pkgs/tools/misc/zf/default.nix index 98cdae6807fbc..a34e85def589d 100644 --- a/pkgs/tools/misc/zf/default.nix +++ b/pkgs/tools/misc/zf/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, zig, testers, + installShellFiles, zf, }: stdenv.mkDerivation rec { @@ -18,17 +19,33 @@ stdenv.mkDerivation rec { hash = "sha256-MzlSU5x2lb6PJZ/iNAi2aebfuClBprlfHMIG/4OPmuc="; }; - nativeBuildInputs = [ zig ]; - - dontConfigure = true; + nativeBuildInputs = [ zig installShellFiles ]; preBuild = '' export HOME=$TMPDIR ''; + buildPhase = '' + runHook preBuild + zig build -Drelease-safe -Dcpu=baseline + runHook postBuild + ''; + + doCheck = true; + checkPhase = '' + runHook preCheck + zig build test + runHook postCheck + ''; + installPhase = '' runHook preInstall zig build -Drelease-safe -Dcpu=baseline --prefix $out install + installManPage doc/zf.1 + installShellCompletion \ + --bash complete/zf \ + --fish complete/zf.fish \ + --zsh complete/_zf runHook postInstall ''; |