Something went wrong. Try again.
Reading and writing git repositories in Zig, without running git.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ lib, stdenv, git, tzdata, zig_0_17,}:stdenv.mkDerivation { pname = "zig-git"; version = "0.1.0";
# Named rather than filtered, so that editing something outside this list # -- the flake, the workflow, a scratch file -- does not rebuild the package. src = lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ ./build.zig ./build.zig.zon ./src ./tools ./LICENSES ./REUSE.toml ]; };
nativeBuildInputs = [ zig_0_17.hook ];
# The tests make their repositories with git and compare answers with it. nativeCheckInputs = [ git ]; doCheck = true; # The time zones the tests that compare dates read local time with. preCheck = '' export TZDIR=${tzdata}/share/zoneinfo '';
# The install phase installs zig-git, the tool for comparing the library # with git; the library itself has nothing to install but its # documentation. postInstall = '' zig build docs --prefix $out '';
meta = { description = "Reading and writing git repositories in Zig, without running git"; homepage = "https://git.jcollie.dev/jeff/zig-git"; license = lib.licenses.mit; platforms = lib.platforms.unix; };}