Compare commits

...

10 Commits

Author SHA1 Message Date
optimo 3e4fe84538 Edit default.nix 2025-11-05 07:10:54 +00:00
AG 199341c4ad Update default.nix 2025-10-30 16:09:11 +01:00
AG 91f1d94070 yaak 2025-10-30 15:43:01 +01:00
AG f1faa10d33 Update default.nix 2025-10-30 15:27:03 +01:00
AG eac26713c7 Flake test 2025-10-30 15:12:38 +01:00
AG 8780b83dd7 fix 2025-10-24 09:56:59 +02:00
AG 46cfb325bb flake compat 2025-10-24 09:51:40 +02:00
AG d5e447a086 Desktop entry 2025-10-20 16:00:08 +02:00
AG ec0442f7b3 test 2025-10-20 15:47:44 +02:00
AG da85b3fe22 test 2025-10-20 15:44:48 +02:00
4 changed files with 149 additions and 43 deletions

View File

@ -1,8 +1,11 @@
{ 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 { };
}

29
flake.nix Normal file
View File

@ -0,0 +1,29 @@
{
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,4 +1,6 @@
{ pkgs ? import <nixpkgs> { }, ... }:
{
pkgs ? import <nixpkgs> { },
}:
pkgs.stdenv.mkDerivation rec {
pname = "apache-hop";
@ -14,13 +16,14 @@ pkgs.stdenv.mkDerivation rec {
makeWrapper
jdk17
unzip
copyDesktopItems
];
buildInputs = with pkgs; [
gtk3
glib
webkitgtk_4_1
libsoup_2_4
libsoup_3
cairo
gdk-pixbuf
atk
@ -31,58 +34,82 @@ 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_2_4
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_3
pkgs.cairo
pkgs.gdk-pixbuf
pkgs.atk
pkgs.pango
]
}"
done
# Make sure shell scripts are executable
chmod +x $out/opt/apache-hop/*.sh
chmod +x $out/opt/apache-hop/*.sh
runHook postInstall
mkdir -p $out/share/applications
mkdir -p $out/share/pixmaps
cp $out/opt/apache-hop/hop.ico $out/share/pixmaps/hop.ico
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/";

47
pkgs/yaak/default.nix Normal file
View File

@ -0,0 +1,47 @@
{
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" ];
})
];
}