Plugin to add Pijul support to the Nix package manager
{
  lib,
  stdenv,
  clang17Stdenv,
  cmake,
  pkg-config,
  boost,
  howard-hinnant-date,
  nix,
  nlohmann_json,
}: let
  stdenv' =
    if stdenv.cc.isClang
    then clang17Stdenv
    else stdenv;
in
  stdenv'.mkDerivation {
    pname = "nix-plugin-pijul";
    version = lib.fileContents ./VERSION;

    src = ./.;

    nativeBuildInputs = [
      cmake
      pkg-config
    ];

    buildInputs = [
      boost
      howard-hinnant-date
      nix
      nlohmann_json
    ];
  }