Compare commits
10 Commits
a21260e89d
...
3e4fe84538
| Author | SHA1 | Date |
|---|---|---|
|
|
3e4fe84538 | |
|
|
199341c4ad | |
|
|
91f1d94070 | |
|
|
f1faa10d33 | |
|
|
eac26713c7 | |
|
|
8780b83dd7 | |
|
|
46cfb325bb | |
|
|
d5e447a086 | |
|
|
ec0442f7b3 | |
|
|
da85b3fe22 |
|
|
@ -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 { };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -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/";
|
||||
|
|
|
|||
|
|
@ -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" ];
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Reference in New Issue