Partially fix build on Mac

dblsaiko
Mar 30, 2024, 4:52 PM
KEPVL66D6DQXZLNEKZ2Z3BR2UXIN3LJC4NBSY26AK5PTWLYURNJQC

Dependencies

  • [2] 72KPLIMX Store version in central file
  • [3] DYNXZQZV Uncouple some of the logic from Nix library and add basic tests
  • [4] 3KEFKH5F Import existing code
  • [5] ZZW47X5H Version 0.1.1
  • [6] 4OTS5CAK Version 0.1.2
  • [7] UZYI7CB2 Fix compile errors on macOS in dev shell

Change contents

  • replacement in src/compat.cpp at line 10
    [3.4077][3.4077:4095]()
    #include <cstdio>
    [3.4077]
    [3.4095]
    #include <csignal>
  • edit in src/compat.cpp at line 16
    [3.4195]
    [3.4195]
    #include <unistd.h>
  • edit in src/CMakeLists.txt at line 16
    [3.7846]
    [3.7846]
    target_link_libraries(PijulTesting PRIVATE date::date)
  • edit in package.nix at line 4
    [4.13355]
    [4.13355]
    clang17Stdenv,
  • replacement in package.nix at line 11
    [4.83][4.13417:13442](),[4.13417][4.13417:13442](),[4.13442][4.13442:13472](),[4.13472][2.8:48]()
    }:
    stdenv.mkDerivation {
    pname = "nix-plugin-pijul";
    version = lib.fileContents ./VERSION;
    [4.83]
    [4.13493]
    }: let
    stdenv' =
    if stdenv.cc.isClang
    then clang17Stdenv
    else stdenv;
    in
    stdenv'.mkDerivation {
    pname = "nix-plugin-pijul";
    version = lib.fileContents ./VERSION;
  • replacement in package.nix at line 21
    [4.13494][4.13494:13507]()
    src = ./.;
    [4.13494]
    [4.13507]
    src = ./.;
  • replacement in package.nix at line 23
    [4.13508][4.13508:13562]()
    nativeBuildInputs = [
    cmake
    pkg-config
    ];
    [4.13508]
    [4.13562]
    nativeBuildInputs = [
    cmake
    pkg-config
    ];
  • replacement in package.nix at line 28
    [4.13563][4.13563:13623](),[4.13623][4.84:102](),[4.102][4.13623:13630](),[4.13623][4.13623:13630]()
    buildInputs = [
    boost
    howard-hinnant-date
    nix
    nlohmann_json
    ];
    }
    [4.13563]
    buildInputs = [
    boost
    howard-hinnant-date
    nix
    nlohmann_json
    ];
    }
  • replacement in autotests/datetest.cpp at line 7
    [3.8320][3.8320:8387]()
    template<typename T>
    void assert_eq(const T &left, const T &right)
    [3.8320]
    [3.8387]
    template<typename T, typename U>
    void assert_eq(const T &left, const U &right)
  • replacement in autotests/datetest.cpp at line 39
    [3.9065][3.9065:9118]()
    assert_eq(0L, point.time_since_epoch().count());
    [3.9065]
    [3.9118]
    assert_eq(0LL, point.time_since_epoch().count());