diff options
author | toonn <toonn@toonn.io> | 2024-04-28 23:21:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-28 23:21:37 +0200 |
commit | 84df02abdbcaa5c5a6e702a4704806fb49061020 (patch) | |
tree | d147ce4f0e29004dd1e868767fc9b0e2c07ab00a /pkgs/by-name/lu | |
parent | 8e098acf1dc97cca17d1d5b028bd36a0722eec55 (diff) | |
parent | e7b5b44f9df793129be5610d91d1256626c8b181 (diff) |
Merge pull request #301354 from reckenrode/libiconv-switch-mk2
darwin.libiconv: 50 -> 99 and move to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/lu')
-rw-r--r-- | pkgs/by-name/lu/lutok/package.nix | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/pkgs/by-name/lu/lutok/package.nix b/pkgs/by-name/lu/lutok/package.nix new file mode 100644 index 0000000000000..a09724b5348f9 --- /dev/null +++ b/pkgs/by-name/lu/lutok/package.nix @@ -0,0 +1,87 @@ +{ + lib, + stdenv, + fetchFromGitHub, + atf, + autoreconfHook, + kyua, + lua, + pkg-config, + gitUpdater, +}: + +lib.fix ( + drv: + let + # Avoid infinite recursions: + # - Lutok depends on ATF and Kyua for testing; but + # - ATF depends on Kyua for testing, and Kyua depends on Lutok as a build input. + # To break the cycle (ATF -> Kyua -> Lutok -> ATF and Kyua): + # - Build ATF without testing (avoiding the Kyua dependency); and + # - Build Kyua against a version of Lutok without testing (also avoiding the ATF and Kyua dependencies). + atf' = atf.overrideAttrs (_: { + doInstallCheck = false; + }); + kyua' = + (kyua.override { + lutok = drv.overrideAttrs (_: { + doCheck = false; + }); + }).overrideAttrs + (_: { + # Assume Kyua’s install check phase will run when Kyua is built. Don’t run it again + # while building Lutok because it can take four to five minutes to run. + doInstallCheck = false; + }); + in + stdenv.mkDerivation (finalAttrs: { + pname = "lutok"; + version = "0.4"; + + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitHub { + owner = "freebsd"; + repo = "lutok"; + rev = "lutok-${finalAttrs.version}"; + hash = "sha256-awAFxx9q8dZ6JO1/mShjhJnOPTLn1wCT4VrB4rlgWyg="; + }; + + strictDeps = true; + + propagatedBuildInputs = [ lua ]; + + nativeBuildInputs = [ + atf' + autoreconfHook + pkg-config + ]; + + enableParallelBuilding = true; + + makeFlags = [ + # Lutok isn’t compatible with C++17, which is the default on current clang and GCC. + "CXXFLAGS=-std=c++11" + ]; + + doCheck = true; + + checkInputs = [ atf' ]; + nativeCheckInputs = [ kyua' ]; + + passthru.updateScript = gitUpdater { rev-prefix = "lutok-"; }; + + __structuredAttrs = true; + + meta = { + description = "Libraries to write tests in C, C++, and shell"; + homepage = "https://github.com/freebsd/lutok/"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ reckenrode ]; + platforms = lib.platforms.unix; + }; + }) +) |