nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 alsa-lib,
3 at-spi2-atk,
4 autoPatchelfHook,
5 cairo,
6 cups,
7 dbus,
8 desktop-file-utils,
9 expat,
10 fetchurl,
11 gdk-pixbuf,
12 gtk3,
13 gvfs,
14 hicolor-icon-theme,
15 lib,
16 libdrm,
17 libglvnd,
18 libnotify,
19 libxkbcommon,
20 libgbm,
21 nspr,
22 nss,
23 openssl,
24 pango,
25 rpmextract,
26 stdenv,
27 systemd,
28 trash-cli,
29 vulkan-loader,
30 wrapGAppsHook3,
31 xdg-utils,
32 libxtst,
33 libxrandr,
34 libxfixes,
35 libxext,
36 libxdamage,
37 libxcomposite,
38 libx11,
39 libxcb,
40}:
41stdenv.mkDerivation rec {
42 pname = "plasticity";
43 version = "25.2.11";
44
45 src = fetchurl {
46 url = "https://github.com/nkallen/plasticity/releases/download/v${version}/Plasticity-${version}-1.x86_64.rpm";
47 hash = "sha256-aqc6CDR3yBOGaRr+VjXQrTXZKvr9kqzaqcu5y30clCA=";
48 };
49
50 passthru.updateScript = ./update.sh;
51
52 nativeBuildInputs = [
53 wrapGAppsHook3
54 autoPatchelfHook
55 rpmextract
56 libgbm
57 ];
58
59 buildInputs = [
60 alsa-lib
61 at-spi2-atk
62 cairo
63 cups
64 dbus
65 desktop-file-utils
66 expat
67 gdk-pixbuf
68 gtk3
69 gvfs
70 hicolor-icon-theme
71 libdrm
72 libnotify
73 libxkbcommon
74 nspr
75 nss
76 openssl
77 pango
78 (lib.getLib stdenv.cc.cc)
79 trash-cli
80 xdg-utils
81 ];
82
83 runtimeDependencies = [
84 systemd
85 libglvnd
86 vulkan-loader # may help with nvidia users
87 libx11
88 libxcb
89 libxcomposite
90 libxdamage
91 libxext
92 libxfixes
93 libxrandr
94 libxtst
95 ];
96
97 dontUnpack = true;
98
99 # can't find anything on the internet about these files, no clue what they do
100 autoPatchelfIgnoreMissingDeps = [
101 "ACCAMERA.tx"
102 "AcMPolygonObj15.tx"
103 "ATEXT.tx"
104 "ISM.tx"
105 "RText.tx"
106 "SCENEOE.tx"
107 "TD_DbEntities.tx"
108 "TD_DbIO.tx"
109 "WipeOut.tx"
110 ];
111
112 installPhase = ''
113 runHook preInstall
114
115 mkdir $out
116 cd $out
117 rpmextract $src
118 mv $out/usr/* $out
119 rm -r $out/usr
120 rm -r $out/lib/.build-id
121
122 runHook postInstall
123 '';
124
125 #--use-gl=egl for it to use hardware rendering it seems. Otherwise there are terrible framerates
126 preFixup = ''
127 gappsWrapperArgs+=(--add-flags "--use-gl=egl")
128 '';
129
130 meta = {
131 description = "CAD for artists";
132 homepage = "https://www.plasticity.xyz";
133 license = lib.licenses.unfree;
134 mainProgram = "Plasticity";
135 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
136 maintainers = with lib.maintainers; [ imadnyc ];
137 platforms = [ "x86_64-linux" ];
138 };
139}