about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libpeas
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
commit9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d (patch)
tree4368f9e4cb2d5b93a956c085337e45cb70f1e331 /nixpkgs/pkgs/development/libraries/libpeas
parenta9cbfb6941b47d6f50129e6e36927882392daed7 (diff)
parent2344fe1da14cb08b0c18743b207995f9b8597915 (diff)
downloadnixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.gz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.bz2
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.lz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.xz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.zst
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.zip
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libpeas')
-rw-r--r--nixpkgs/pkgs/development/libraries/libpeas/2.x.nix86
1 files changed, 86 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix b/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix
new file mode 100644
index 000000000000..2b3bd0bc5797
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix
@@ -0,0 +1,86 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, gi-docgen
+, gobject-introspection
+, meson
+, ninja
+, gjs
+, glib
+, lua5_1
+, python3
+, spidermonkey_115
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libpeas";
+  version = "2.0.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-VAesvAwS95D3DJ0rmCJKzBvjrEScYGA7gZLKAgtJcBE=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    gi-docgen
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    gjs
+    glib
+    lua5_1
+    lua5_1.pkgs.lgi
+    python3
+    python3.pkgs.pygobject3
+    spidermonkey_115
+  ];
+
+  propagatedBuildInputs = [
+    # Required by libpeas-2.pc
+    gobject-introspection
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  postPatch = ''
+    # Checks lua51 and lua5.1 executable but we have non of them.
+    substituteInPlace meson.build --replace \
+      "find_program('lua51', required: false)" \
+      "find_program('lua', required: false)"
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "libpeas2";
+      packageName = "libpeas";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A GObject-based plugins engine";
+    homepage = "https://wiki.gnome.org/Projects/Libpeas";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}