2022-12-02 08:20:57 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, readline }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mujs";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "1.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://mujs.com/downloads/mujs-${version}.tar.xz";
|
2022-12-02 08:20:57 +00:00
|
|
|
sha256 = "sha256-SIZZP8aIsM3M0x5ey+Wv560b7iOqaeZnuHGv1d/GQMM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
|
|
|
(fetchpatch {
|
|
|
|
# ld: library not found for -l:libmujs.a
|
|
|
|
name = "darwin-failures.patch";
|
|
|
|
url = "https://git.ghostscript.com/?p=mujs.git;a=patch;h=d592c785c0b2f9fea982ac3fe7b88fdd7c4817fc";
|
|
|
|
sha256 = "sha256-/57A7S65LWZFyQIGe+LtqDMu85K1N/hbztXB+/nCDJk=";
|
|
|
|
revert = true;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ readline ];
|
|
|
|
|
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://mujs.com/";
|
|
|
|
description = "A lightweight, embeddable Javascript interpreter";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2021-04-17 00:35:05 +00:00
|
|
|
license = licenses.isc;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|