Compare commits

..

No commits in common. "3e4fe84538b81de954c4f31ccb4c1dfc0d331d08" and "a21260e89dbf408f29d7cdf2e895c9da5a245c78" have entirely different histories.

4 changed files with 43 additions and 149 deletions

View File

@ -1,11 +1,8 @@
{
system ? builtins.currentSystem,
}:
{ system ? builtins.currentSystem }:
let
pkgs = import <nixpkgs> { inherit system; };
in
{
apache-hop = pkgs.callPackage ./pkgs/apache-hop { };
yaak = pkgs.callPackage ./pkgs/yaak { };
}

View File

@ -1,29 +0,0 @@
{
description = "aospkgs - collection of Nix packages (flake)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
pkgset = {
apache-hop = pkgs.callPackage ./pkgs/apache-hop { };
yaak = pkgs.callPackage ./pkgs/yaak { };
};
in
{
packages = pkgset;
}
);
}

View File

@ -1,6 +1,4 @@
{
pkgs ? import <nixpkgs> { },
}:
{ pkgs ? import <nixpkgs> { }, ... }:
pkgs.stdenv.mkDerivation rec {
pname = "apache-hop";
@ -16,14 +14,13 @@ pkgs.stdenv.mkDerivation rec {
makeWrapper
jdk17
unzip
copyDesktopItems
];
buildInputs = with pkgs; [
gtk3
glib
webkitgtk_4_1
libsoup_3
libsoup_2_4
cairo
gdk-pixbuf
atk
@ -34,82 +31,58 @@ pkgs.stdenv.mkDerivation rec {
dontConfigure = true;
installPhase = ''
runHook preInstall
runHook preInstall
mkdir -p $out/opt/apache-hop
cp -r . $out/opt/apache-hop/
mkdir -p $out/bin
mkdir -p $out/opt/apache-hop
cp -r . $out/opt/apache-hop/
mkdir -p $out/bin
create_wrapper_script() {
local script_name=$1
cat > $out/bin/$script_name << EOF
#!/usr/bin/env bash
set -e
create_wrapper_script() {
local script_name=$1
cat > $out/bin/$script_name << EOF
#!/usr/bin/env bash
set -e
export HOP_CONFIG_FOLDER="\$HOME/.hop/config"
export HOP_AUDIT_FOLDER="\$HOME/.hop/audit"
export HOP_CONFIG_FOLDER="\$HOME/.hop/config"
export HOP_AUDIT_FOLDER="\$HOME/.hop/audit"
mkdir -p "\$HOP_CONFIG_FOLDER" "\$HOP_AUDIT_FOLDER"
mkdir -p "\$HOP_CONFIG_FOLDER" "\$HOP_AUDIT_FOLDER"
if [ ! -f "\$HOP_CONFIG_FOLDER/hop-config.json" ]; then
cp -r $out/opt/apache-hop/config/* "\$HOP_CONFIG_FOLDER/"
fi
if [ ! -f "\$HOP_CONFIG_FOLDER/hop-config.json" ]; then
cp -r $out/opt/apache-hop/config/* "\$HOP_CONFIG_FOLDER/"
fi
exec $out/opt/apache-hop/$script_name.sh "\$@"
EOF
chmod +x $out/bin/$script_name
}
exec $out/opt/apache-hop/$script_name.sh "\$@"
EOF
chmod +x $out/bin/$script_name
}
create_wrapper_script hop-gui
create_wrapper_script hop-run
create_wrapper_script hop-server
create_wrapper_script hop-gui
create_wrapper_script hop-run
create_wrapper_script hop-server
for script in hop-gui hop-run hop-server; do
mv $out/bin/$script $out/bin/.$script-wrapped
makeWrapper $out/bin/.$script-wrapped $out/bin/$script \
--set JAVA_HOME "${pkgs.jdk17}" \
--prefix LD_LIBRARY_PATH : "${
pkgs.lib.makeLibraryPath [
pkgs.gtk3
pkgs.glib
pkgs.webkitgtk_4_1
pkgs.libsoup_3
pkgs.cairo
pkgs.gdk-pixbuf
pkgs.atk
pkgs.pango
]
}"
done
for script in hop-gui hop-run hop-server; do
mv $out/bin/$script $out/bin/.$script-wrapped
makeWrapper $out/bin/.$script-wrapped $out/bin/$script \
--set JAVA_HOME "${pkgs.jdk17}" \
--prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath [
pkgs.gtk3
pkgs.glib
pkgs.webkitgtk_4_1
pkgs.libsoup_2_4
pkgs.cairo
pkgs.gdk-pixbuf
pkgs.atk
pkgs.pango
]}"
done
chmod +x $out/opt/apache-hop/*.sh
# Make sure shell scripts are executable
chmod +x $out/opt/apache-hop/*.sh
mkdir -p $out/share/applications
mkdir -p $out/share/pixmaps
cp $out/opt/apache-hop/hop.ico $out/share/pixmaps/hop.ico
runHook postInstall
runHook postInstall
'';
desktopItems = [
(pkgs.makeDesktopItem {
name = "apache-hop";
desktopName = "Apache Hop";
comment = "Data Integration Platform";
exec = "hop-gui";
icon = "hop";
categories = [
"Development"
"Database"
];
mimeTypes = [
"application/x-hop-workflow"
"application/x-hop-pipeline"
];
})
];
meta = with pkgs.lib; {
description = "Apache Hop - Data Integration Platform";
homepage = "https://hop.apache.org/";

View File

@ -1,47 +0,0 @@
{
pkgs ? import <nixpkgs> { },
appimageTools ? pkgs.appimageTools,
fetchurl ? pkgs.fetchurl,
}:
let
pname = "yaak";
version = "2025.7.3";
src = fetchurl {
url = "https://github.com/mountain-loop/yaak/releases/download/v${version}/yaak_${version}_amd64.AppImage";
sha256 = "Zaj+br95ypZpCVRWZdw1HLpxg/mPsni1F9y9wv+DfdI=";
};
in
appimageTools.wrapType2 {
inherit pname version src;
postInstall = ''
mkdir -p $out/share/pixmaps
chmod +x ${src}
${src} --appimage-extract >/dev/null 2>&1 || true
if [ -f squashfs-root/yaak.png ]; then
mkdir -p $out/share/icons/hicolor/128x128/apps $out/share/icons/hicolor/64x64/apps $out/share/icons/hicolor/32x32/apps
cp squashfs-root/yaak.png $out/share/icons/hicolor/128x128/apps/yaak.png
cp squashfs-root/yaak.png $out/share/icons/hicolor/64x64/apps/yaak.png
cp squashfs-root/yaak.png $out/share/icons/hicolor/32x32/apps/yaak.png
cp $out/share/icons/hicolor/128x128/apps/yaak.png $out/share/pixmaps/yaak.png || true
elif [ -f squashfs-root/usr/share/icons/hicolor/32x32/apps/yaak-app.png ]; then
mkdir -p $out/share/icons/hicolor/32x32/apps
cp squashfs-root/usr/share/icons/hicolor/32x32/apps/yaak-app.png $out/share/icons/hicolor/32x32/apps/yaak.png
cp $out/share/icons/hicolor/32x32/apps/yaak.png $out/share/pixmaps/yaak.png || true
fi
rm -rf squashfs-root
'';
desktopItems = [
(pkgs.makeDesktopItem {
name = "yaak";
desktopName = "Yaak";
comment = "Yaak API tool";
exec = "${pname}";
icon = "yaak";
categories = [ "Utility" ];
})
];
}