Update default.nix

This commit is contained in:
AG 2025-10-30 15:27:03 +01:00
parent eac26713c7
commit f1faa10d33
1 changed files with 55 additions and 45 deletions

View File

@ -1,4 +1,6 @@
{ pkgs ? import <nixpkgs> { } }:
{
pkgs ? import <nixpkgs> { },
}:
pkgs.stdenv.mkDerivation rec {
pname = "apache-hop";
@ -41,20 +43,20 @@ pkgs.stdenv.mkDerivation rec {
create_wrapper_script() {
local script_name=$1
cat > $out/bin/$script_name << EOF
#!/usr/bin/env bash
set -e
#!/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
if [ ! -f "\$HOP_CONFIG_FOLDER/hop-config.json" ]; then
cp -r $out/opt/apache-hop/config/* "\$HOP_CONFIG_FOLDER/"
fi
fi
exec $out/opt/apache-hop/$script_name.sh "\$@"
EOF
exec $out/opt/apache-hop/$script_name.sh "\$@"
EOF
chmod +x $out/bin/$script_name
}
@ -66,16 +68,18 @@ EOF
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 [
--prefix LD_LIBRARY_PATH : "${
pkgs.lib.makeLibraryPath [
pkgs.gtk3
pkgs.glib
pkgs.webkitgtk_4_1
pkgs.libsoup_2_4
pkgs.libsoup_3
pkgs.cairo
pkgs.gdk-pixbuf
pkgs.atk
pkgs.pango
]}"
]
}"
done
chmod +x $out/opt/apache-hop/*.sh
@ -95,8 +99,14 @@ EOF
comment = "Data Integration Platform";
exec = "hop-gui";
icon = "hop";
categories = [ "Development" "Database" ];
mimeTypes = [ "application/x-hop-workflow" "application/x-hop-pipeline" ];
categories = [
"Development"
"Database"
];
mimeTypes = [
"application/x-hop-workflow"
"application/x-hop-pipeline"
];
})
];