about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/pl
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-03-24 11:04:41 +0100
committerAlyssa Ross <hi@alyssa.is>2024-03-24 11:04:41 +0100
commit5423cabbbf2b6dec5568f1ecabd288d5d9a642ec (patch)
treef316a6a921bfefd3a63bd4502c2eb50ff1644f67 /nixpkgs/pkgs/by-name/pl
parent46a88117a05c3469af5d99433af140c3de8ca088 (diff)
parent8aa81f34981add12aecada6c702ddbbd0375ca36 (diff)
downloadnixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar
nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.gz
nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.bz2
nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.lz
nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.xz
nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.zst
nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/pl')
-rw-r--r--nixpkgs/pkgs/by-name/pl/plasticity/package.nix128
-rwxr-xr-xnixpkgs/pkgs/by-name/pl/plasticity/update.sh17
-rw-r--r--nixpkgs/pkgs/by-name/pl/plumber/package.nix5
3 files changed, 148 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/by-name/pl/plasticity/package.nix b/nixpkgs/pkgs/by-name/pl/plasticity/package.nix
new file mode 100644
index 000000000000..563cff99bb68
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/pl/plasticity/package.nix
@@ -0,0 +1,128 @@
+{ alsa-lib
+, at-spi2-atk
+, autoPatchelfHook
+, cairo
+, cups
+, dbus
+, desktop-file-utils
+, expat
+, fetchurl
+, gdk-pixbuf
+, gtk3
+, gvfs
+, hicolor-icon-theme
+, lib
+, libdrm
+, libglvnd
+, libnotify
+, libsForQt5
+, libxkbcommon
+, mesa
+, nspr
+, nss
+, openssl
+, pango
+, rpmextract
+, stdenv
+, systemd
+, trash-cli
+, vulkan-loader
+, wrapGAppsHook
+, xdg-utils
+, xorg
+}:
+stdenv.mkDerivation rec  {
+  pname = "plasticity";
+  version = "1.4.15";
+
+  src = fetchurl {
+    url = "https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm";
+    hash = "sha256-wiUpDsfGVkhyjoXVpxaw3fqpo1aAfi0AkkvlkAZxTYI=";
+  };
+
+  passthru.updateScript = ./update.sh;
+
+  nativeBuildInputs = [ wrapGAppsHook autoPatchelfHook rpmextract mesa ];
+
+  buildInputs = [
+    alsa-lib
+    at-spi2-atk
+    cairo
+    cups
+    dbus
+    desktop-file-utils
+    expat
+    gdk-pixbuf
+    gtk3
+    gvfs
+    hicolor-icon-theme
+    libdrm
+    libnotify
+    libsForQt5.kde-cli-tools
+    libxkbcommon
+    nspr
+    nss
+    openssl
+    pango
+    stdenv.cc.cc.lib
+    trash-cli
+    xdg-utils
+  ];
+
+  runtimeDependencies = [
+    systemd
+    libglvnd
+    vulkan-loader #may help with nvidia users
+    xorg.libX11
+    xorg.libxcb
+    xorg.libXcomposite
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXrandr
+    xorg.libXtst
+  ];
+
+  dontUnpack = true;
+
+  # can't find anything on the internet about these files, no clue what they do
+  autoPatchelfIgnoreMissingDeps = [
+    "ACCAMERA.tx"
+    "AcMPolygonObj15.tx"
+    "ATEXT.tx"
+    "ISM.tx"
+    "RText.tx"
+    "SCENEOE.tx"
+    "TD_DbEntities.tx"
+    "TD_DbIO.tx"
+    "WipeOut.tx"
+   ];
+
+installPhase = ''
+  runHook preInstall
+
+  mkdir $out
+  cd $out
+  rpmextract $src
+  mv $out/usr/* $out
+  rm -r $out/usr
+
+  runHook postInstall
+'';
+
+  #--use-gl=egl for it to use hardware rendering it seems. Otherwise there are terrible framerates
+  postInstall = ''
+    substituteInPlace share/applications/Plasticity.desktop \
+      --replace-fail 'Exec=Plasticity %U' "Exec=Plasticity --use-gl=egl %U"
+  '';
+
+  meta = with lib; {
+    description = "CAD for artists";
+    homepage = "https://www.plasticity.xyz";
+    license = licenses.unfree;
+    mainProgram = "Plasticity";
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    maintainers = with maintainers; [ imadnyc ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/by-name/pl/plasticity/update.sh b/nixpkgs/pkgs/by-name/pl/plasticity/update.sh
new file mode 100755
index 000000000000..8980f632e3ee
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/pl/plasticity/update.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl jq common-updater-scripts
+#shellcheck shell=bash
+
+set -eu -o pipefail
+
+version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
+    curl -s https://api.github.com/repos/nkallen/plasticity/releases/latest | jq -e -r ".tag_name | .[1:]")
+old_version=$(nix-instantiate --eval -A plasticity.version | jq -e -r)
+
+if [[ $version == "$old_version" ]]; then
+    echo "New version same as old version, nothing to do." >&2
+    exit 0
+fi
+
+update-source-version plasticity "$version"
+
diff --git a/nixpkgs/pkgs/by-name/pl/plumber/package.nix b/nixpkgs/pkgs/by-name/pl/plumber/package.nix
index 4c1f02149712..760eea36573a 100644
--- a/nixpkgs/pkgs/by-name/pl/plumber/package.nix
+++ b/nixpkgs/pkgs/by-name/pl/plumber/package.nix
@@ -2,13 +2,13 @@
 
 buildGoModule rec {
   pname = "plumber";
-  version = "2.5.4";
+  version = "2.6.0";
 
   src = fetchFromGitHub {
     owner = "streamdal";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-6nPH+HQtpFJ4MAtblFWjaQjDSKtpIxW9tGt2o1ICtos=";
+    hash = "sha256-H1tyMedYKj1bePNcaEWYP3njHw57cJ0jgxwC7zDXQvk=";
   };
 
   vendorHash = null;
@@ -28,6 +28,7 @@ buildGoModule rec {
 
   meta = with lib; {
     description = "A CLI devtool for interacting with data in message systems like Kafka, RabbitMQ, GCP PubSub and more";
+    mainProgram = "plumber";
     homepage = "https://github.com/streamdal/plumber";
     license = licenses.mit;
     maintainers = with maintainers; [ svrana ];