about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFlorian <florian.brandes@posteo.de>2022-02-28 14:27:59 +0100
committerGitHub <noreply@github.com>2022-02-28 14:27:59 +0100
commit9d821edfd11c53fa5970c895eb404ac794c53d52 (patch)
tree06730375a023d6448e0481fe4f35b62bba3940d5 /pkgs
parentb7ec0afb59d5c094fc68ed95fea6b923f73124bc (diff)
pinegrow: init at 6.3 (#157304)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/pinegrow/default.nix70
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 72 insertions, 0 deletions
diff --git a/pkgs/applications/editors/pinegrow/default.nix b/pkgs/applications/editors/pinegrow/default.nix
new file mode 100644
index 0000000000000..8ddd0d6a283ab
--- /dev/null
+++ b/pkgs/applications/editors/pinegrow/default.nix
@@ -0,0 +1,70 @@
+{ stdenv
+, lib
+, fetchurl
+, unzip
+, udev
+, nwjs
+, gcc-unwrapped
+, autoPatchelfHook
+, gsettings-desktop-schemas
+, gtk3
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pinegrow";
+  version = "6.3";
+
+  src = fetchurl {
+    url = "https://download.pinegrow.com/PinegrowLinux64.${version}.zip";
+    sha256 = "0wldj633p67da077nfc67gr9xhq580rkfd0r3904sjq7x01r0kaz";
+  };
+
+  nativeBuildInputs = [
+    unzip
+    autoPatchelfHook
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    udev
+    nwjs
+    gcc-unwrapped
+    gsettings-desktop-schemas
+    gtk3
+  ];
+
+  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.
+    unzip $src -d $out/opt/pinegrow
+    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
+  '';
+
+  preFixup = ''
+    export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
+    wrapGApp "$out/opt/pinegrow/PinegrowLibrary" --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev ]}
+  '';
+
+  meta = with lib; {
+    homepage = "https://pinegrow.com";
+    description = "UI Web Editor";
+    platforms = platforms.linux;
+    license = with licenses; [ unfreeRedistributable ];
+    maintainers = with maintainers; [ gador ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c49100ae61c7e..e147dd37161aa 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -27702,6 +27702,8 @@ with pkgs;
 
   pijuice = with python3Packages; toPythonApplication pijuice;
 
+  pinegrow = callPackage ../applications/editors/pinegrow { };
+
   ping = callPackage ../applications/networking/ping { };
 
   piper = callPackage ../os-specific/linux/piper { };