2022-03-05 16:20:37 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, udev
|
|
|
|
, nwjs
|
|
|
|
, gcc-unwrapped
|
|
|
|
, autoPatchelfHook
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, gtk3
|
2022-04-03 18:54:34 +00:00
|
|
|
, wrapGAppsHook
|
2022-03-30 09:31:56 +00:00
|
|
|
, makeWrapper
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pinegrow";
|
2022-08-12 12:06:08 +00:00
|
|
|
# deactivate auto update, because an old 6.21 version is getting mixed up
|
|
|
|
# see e.g. https://github.com/NixOS/nixpkgs/pull/184460
|
|
|
|
version = "6.6"; # nixpkgs-update: no auto update
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-05-18 14:49:53 +00:00
|
|
|
url = "https://download.pinegrow.com/PinegrowLinux64.${version}.zip";
|
2022-07-18 16:21:45 +00:00
|
|
|
sha256 = "sha256-a3SwUNcMXl42+Gy3wjcx/KvVprgFAO0D0lFPohPV3Tk=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
unzip
|
|
|
|
autoPatchelfHook
|
2022-03-30 09:31:56 +00:00
|
|
|
makeWrapper
|
2022-04-03 18:54:34 +00:00
|
|
|
wrapGAppsHook
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
udev
|
|
|
|
nwjs
|
|
|
|
gcc-unwrapped
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
makeWrapperArgs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gcc-unwrapped.lib gtk3 udev ]}"
|
|
|
|
"--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}"
|
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
# Extract and copy executable in $out/bin
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications $out/bin $out/opt/bin
|
|
|
|
# we can't unzip it in $out/lib, because nw.js will start with
|
|
|
|
# an empty screen. Therefore it will be unzipped in a non-typical
|
|
|
|
# folder and symlinked.
|
2022-04-03 18:54:34 +00:00
|
|
|
unzip -q $src -d $out/opt/pinegrow
|
2022-03-05 16:20:37 +00:00
|
|
|
substituteInPlace $out/opt/pinegrow/Pinegrow.desktop \
|
|
|
|
--replace 'Exec=sh -c "$(dirname %k)/PinegrowLibrary"' 'Exec=sh -c "$out/bin/Pinegrow"'
|
|
|
|
mv $out/opt/pinegrow/Pinegrow.desktop $out/share/applications/Pinegrow.desktop
|
|
|
|
ln -s $out/opt/pinegrow/PinegrowLibrary $out/bin/Pinegrow
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
# GSETTINGS_SCHEMAS_PATH is not set in installPhase
|
2022-03-05 16:20:37 +00:00
|
|
|
preFixup = ''
|
2022-04-03 18:54:34 +00:00
|
|
|
wrapProgram $out/bin/Pinegrow \
|
|
|
|
''${makeWrapperArgs[@]} \
|
|
|
|
''${gappsWrapperArgs[@]}
|
2022-03-05 16:20:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://pinegrow.com";
|
|
|
|
description = "UI Web Editor";
|
2022-04-27 09:35:20 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-03-05 16:20:37 +00:00
|
|
|
license = with licenses; [ unfreeRedistributable ];
|
|
|
|
maintainers = with maintainers; [ gador ];
|
|
|
|
};
|
|
|
|
}
|