diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-03-20 16:37:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 16:37:12 +0100 |
commit | ffd8ff10c9ea41778535c5f2491e93dc4c7ef918 (patch) | |
tree | 6336f55773cc2c03408655622896bf5e6359a240 | |
parent | a5979a4f99f4317236ba11cb646a0f3da1a1896d (diff) | |
parent | ca4e35218e315d9ce7c67aadcdf65ccba64102a2 (diff) | |
download | nixpkgs-ffd8ff10c9ea41778535c5f2491e93dc4c7ef918.tar nixpkgs-ffd8ff10c9ea41778535c5f2491e93dc4c7ef918.tar.gz nixpkgs-ffd8ff10c9ea41778535c5f2491e93dc4c7ef918.tar.bz2 nixpkgs-ffd8ff10c9ea41778535c5f2491e93dc4c7ef918.tar.lz nixpkgs-ffd8ff10c9ea41778535c5f2491e93dc4c7ef918.tar.xz nixpkgs-ffd8ff10c9ea41778535c5f2491e93dc4c7ef918.tar.zst nixpkgs-ffd8ff10c9ea41778535c5f2491e93dc4c7ef918.zip |
Merge pull request #115380 from siraben/trealla-init
trealla: init at 1.7.65
-rw-r--r-- | pkgs/development/interpreters/trealla/default.nix | 48 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/trealla/default.nix b/pkgs/development/interpreters/trealla/default.nix new file mode 100644 index 00000000000..165251c8c5c --- /dev/null +++ b/pkgs/development/interpreters/trealla/default.nix @@ -0,0 +1,48 @@ +{ lib, stdenv, fetchFromGitHub, readline, openssl, withThread ? true, withSSL ? true, xxd }: + +stdenv.mkDerivation rec { + pname = "trealla"; + version = "1.7.65"; + + src = fetchFromGitHub { + owner = "infradig"; + repo = "trealla"; + rev = "v${version}"; + sha256 = "sha256-uCDACBwdiCeAwF6IZHz7s5pD83JXTP7jAQDjGld8tt0="; + }; + + postPatch = '' + substituteInPlace Makefile \ + --replace '-I/usr/local/include' "" \ + --replace '-L/usr/local/lib' "" \ + --replace 'GIT_VERSION :=' 'GIT_VERSION ?=' + ''; + + makeFlags = [ + "GIT_VERSION=\"v${version}\"" + (lib.optionalString withThread "THREADS=1") + (lib.optionalString (!withSSL) "NOSSL=1") + (lib.optionalString stdenv.isDarwin "NOLDLIBS=1") + ]; + + nativeBuildInputs = [ xxd ]; + buildInputs = [ readline openssl ]; + + installPhase = '' + install -Dm755 -t $out/bin tpl + ''; + + doCheck = true; + preCheck = '' + # Disable test 81 due to floating point error + rm tests/issues/test081.expected tests/issues/test081.pl + ''; + + meta = with lib; { + description = "A compact, efficient Prolog interpreter written in ANSI C"; + homepage = "https://github.com/infradig/trealla"; + license = licenses.mit; + maintainers = with maintainers; [ siraben ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 46c66f15e76..a6415bd9385 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11793,6 +11793,8 @@ in tclreadline = callPackage ../development/interpreters/tclreadline { }; + trealla = callPackage ../development/interpreters/trealla { }; + wasm = ocamlPackages.wasm; proglodyte-wasm = callPackage ../development/interpreters/proglodyte-wasm { }; |