Compare commits

..

1 Commits

Author SHA1 Message Date
nixpkg-openhab-auto-update[bot]
f50ce74b15 openhab: ? -> 4.1.1 2024-01-08 01:42:08 +00:00
6 changed files with 73 additions and 88 deletions

12
flake.lock generated
View File

@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1720863214,
"narHash": "sha256-i2MaeZlmE85eZtILHzZdb0blm15xcq7ASbhHa8ILiLI=",
"lastModified": 1690716044,
"narHash": "sha256-5rhZK0YMQOK+FaOC72leFXUFuCBxKH5SRzUQqpePqQE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "267ce10433ba68de208074a2faf9d31f048593f3",
"rev": "b1b263e5f7f899704c6b592f2096bc8f719dc181",
"type": "github"
},
"original": {

32
jdk.nix
View File

@@ -1,24 +1,18 @@
{
buildPlatform,
hostPlatform,
jdk21,
which,
zip,
buildPackages,
}:
{ buildPlatform, hostPlatform, jdk17, which, zip, buildPackages }:
if buildPlatform == hostPlatform
then jdk21
else
jdk21.overrideAttrs (old: {
then jdk17
else (jdk17.override {
# libIDL does not compile in cross-compile scenarios.
enableGnome2 = false;
}).overrideAttrs (old: {
# lol, nixpkgs cant get pkgs right
# AUTOCONF = "${autoconf}/bin/autoconf";
nativeBuildInputs = old.nativeBuildInputs ++ [which zip];
depsBuildBuild = with buildPackages; [stdenv.cc autoconf];
configureFlags =
old.configureFlags
++ [
nativeBuildInputs = old.nativeBuildInputs ++ [ which zip ];
depsBuildBuild = with buildPackages; [ stdenv.cc autoconf ];
configureFlags = old.configureFlags ++ [
"--with-jtreg=no"
"--disable-hotspot-gtest"
"--with-build-jdk=${buildPackages.jdk21}"
];
})
"--with-build-jdk=${buildPackages.jdk17}"
];
})

View File

@@ -1 +1 @@
0da4a8887afe0b4c9808f35cc033290f608c25eb99bcf6943e73ab59e78894d0
0bbf3c60945d63379f82c34319e87f058cff01438a8d81961a9ec375a594279f

View File

@@ -1,75 +1,66 @@
{
bash,
coreutils,
fetchurl,
gawk,
jdk-openhab,
lib,
makeWrapper,
procps,
zip,
unzip,
stdenv,
gnused,
}: let
version = builtins.readFile ./version;
sha256 = builtins.readFile ./openhab.sha256;
in
stdenv.mkDerivation rec {
bash,
coreutils,
fetchurl,
gawk,
jdk-openhab,
lib,
makeWrapper,
procps,
stdenv,
}:
let
version = builtins.readFile ./version;
sha256 = builtins.readFile ./openhab.sha256;
in stdenv.mkDerivation rec {
inherit version;
pname = "openhab";
src = fetchurl {
url = "https://github.com/openhab/openhab-distro/releases/download/${version}/openhab-${version}.tar.gz";
inherit sha256;
url = "https://github.com/openhab/openhab-distro/releases/download/${version}/openhab-${version}.tar.gz";
inherit sha256;
};
nativeBuildInputs = [makeWrapper gnused];
buildInputs = [bash];
outputs = ["out"];
extraPath = lib.makeBinPath [jdk-openhab gawk coreutils procps zip unzip];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
outputs = [ "out" ];
extraPath = lib.makeBinPath [ jdk-openhab gawk coreutils procps ];
wrappedExecutables = [
"start.sh"
"start_debug.sh"
"runtime/bin/karaf"
"runtime/bin/backup"
"runtime/bin/client"
"runtime/bin/instance"
"runtime/bin/karaf"
"runtime/bin/restore"
"runtime/bin/shell"
"runtime/bin/start"
"runtime/bin/status"
"runtime/bin/stop"
"runtime/bin/update"
"start.sh"
"start_debug.sh"
"runtime/bin/karaf"
"runtime/bin/backup"
"runtime/bin/client"
"runtime/bin/instance"
"runtime/bin/karaf"
"runtime/bin/restore"
"runtime/bin/shell"
"runtime/bin/start"
"runtime/bin/status"
"runtime/bin/stop"
"runtime/bin/update"
];
unpackPhase = ''
runHook preUnpack
mkdir -p $out
tar -C $out -xf $src
runHook postUnpack
runHook preUnpack
mkdir -p $out
tar -C $out -xf $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
rm -rfv \
"$out/"*.bat \
"$out/runtime/bin/"*.bat \
"$out/runtime/bin/"*.ps1 \
"$out/runtime/bin/"*.psm1
runHook preInstall
rm -rfv \
"$out/"*.bat \
"$out/runtime/bin/"*.bat \
"$out/runtime/bin/"*.ps1 \
"$out/runtime/bin/"*.psm1 \
"$out/runtime/bin/"*.lst
for exe in $wrappedExecutables; do
echo "Rewriting $exe"
cat - $out/$exe > "$out/$exe".new << EOF
#!${bash}/bin/sh
export PATH="\''$PATH:$extraPath"
EOF
mv "$out/$exe".new "$out/$exe"
done
for exe in $wrappedExecutables; do
echo "Wrapping $exe"
wrapProgram $out/$exe --prefix PATH ':' $extraPath
done
# Fix OPENHAB_HOME overwritting
sed '6d' "$out/runtime/bin/oh_dir_layout" | sed '6i if [ -z ''${OPENHAB_HOME} ]; then\n export OPENHAB_HOME=`cd "$DIRNAME/../.."; pwd`\nfi' > "$out/runtime/bin/oh_dir_layout.new"
mv "$out/runtime/bin/oh_dir_layout.new" "$out/runtime/bin/oh_dir_layout"
runHook postInstall
runHook postInstall
'';
}
}

View File

@@ -1 +1 @@
9d5d8815951d1638a4cb08d430226ec670179cbbd4620cb16d0251b4bb9f9377
8d6b3de2ab5711303055cee67288fcf761609bf902e97cc5e58a20856b63ba20

View File

@@ -1 +1 @@
5.0.2
4.1.1