summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiran Bastaja <mbastaja@sorre.xyz>2025-02-23 14:34:43 +0100
committerMiran Bastaja <mbastaja@sorre.xyz>2025-02-23 14:49:45 +0100
commit6ae34993a6292fa0b7ef6cc886f5100b9cc4c8e1 (patch)
treec1d7feb65155a4a1d90189e228ddde6bb97b63f4
parent2cb758341a0399ca76678dfb87a1380d35e37b56 (diff)
Package pyexecjs
-rw-r--r--default.nix3
-rw-r--r--pkgs/python3Packages/pyexecjs.nix33
2 files changed, 36 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index d89d302..f90dda0 100644
--- a/default.nix
+++ b/default.nix
@@ -6,5 +6,8 @@
modules = import ./modules;
overlays = import ./overlays;
+ python3Packages = {
+ pyexecjs = pkgs.callPackage ./pkgs/python3Packages/pyexecjs.nix { };
+ };
sorremacs = pkgs.callPackage ./pkgs/sorremacs { };
}
diff --git a/pkgs/python3Packages/pyexecjs.nix b/pkgs/python3Packages/pyexecjs.nix
new file mode 100644
index 0000000..ae2b05a
--- /dev/null
+++ b/pkgs/python3Packages/pyexecjs.nix
@@ -0,0 +1,33 @@
+{
+ lib,
+ python3Packages,
+ fetchPypi,
+ nodejs-slim,
+}:
+python3Packages.buildPythonPackage rec {
+ pname = "PyExecJS";
+ version = "1.5.1";
+ pyproject = true;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "sha256-NMwdBwl2kYGD/3vcCtcfgVeokcknCMAMX7v/enafUFw=";
+ };
+
+ build-system = [
+ python3Packages.setuptools
+ ];
+
+ dependencies = [
+ python3Packages.six
+
+ # the library supports multiple backends, but node seems the easiest one to include here
+ nodejs-slim
+ ];
+
+ meta = {
+ homepage = "https://github.com/doloopwhile/PyExecJS";
+ description = "Run JavaScript code from Python";
+ license = lib.licenses.mit;
+ };
+}