Compare commits

17 Commits

Author SHA1 Message Date
206e975368 Fix JDK build
Some checks failed
Update the version / update (push) Has been cancelled
2025-12-05 13:01:04 +01:00
75fb304107 Revert "Remove enableGnome2 property from JDK derivation"
This reverts commit 32838d386a.
2025-12-05 12:50:55 +01:00
32838d386a Remove enableGnome2 property from JDK derivation 2025-12-05 12:32:28 +01:00
nixpkg-openhab-auto-update[bot]
3afd0cc0e4 openhab: ? -> 5.0.2
Some checks failed
Update the version / update (push) Has been cancelled
2025-11-13 12:37:27 +01:00
nixpkg-openhab-auto-update[bot]
b837236488 openhab: ? -> 5.0.1
Some checks failed
Update the version / update (push) Has been cancelled
2025-08-21 16:46:23 +02:00
nixpkg-openhab-auto-update[bot]
19315154cc openhab: ? -> 4.3.5
Some checks failed
Update the version / update (push) Has been cancelled
2025-05-24 11:35:29 +02:00
nixpkg-openhab-auto-update[bot]
a361fb03a5 openhab: ? -> 4.3.4 2025-04-26 21:53:50 +02:00
nixpkg-openhab-auto-update[bot]
1c51cf3e1a openhab: ? -> 4.3.3
Some checks failed
Update the version / update (push) Has been cancelled
2025-03-15 13:31:04 +01:00
77f5d53be5 Fix overwritting OPEN_HAB env 2025-01-18 21:19:08 +01:00
nixpkg-openhab-auto-update[bot]
f6ac50c914 openhab: ? -> 4.3.2 2025-01-18 13:04:26 +01:00
a8ae8c9656 Upgrade 2024-09-28 17:33:11 +02:00
nixpkg-openhab-auto-update[bot]
eb7b86b8aa openhab: ? -> 4.2.1 2024-09-28 17:32:20 +02:00
nixpkg-openhab-auto-update[bot]
a9d4720835 openhab: ? -> 4.2.0 2024-07-11 15:23:36 +02:00
16cfb3226e Revert "Force OpenHAB-4.2.0.M1 version"
This reverts commit c1ca49f09f.
2024-07-11 15:23:17 +02:00
c1ca49f09f Force OpenHAB-4.2.0.M1 version 2024-03-23 12:25:14 +01:00
Simonas Kazlauskas
63c1d89dda Attempt fixing the backup and restore scripts
This has required to eschew the `wrapProgram` script as they then go on
to figure out their "installed" location via `dirname` which now points
to the nixstore location. Thus leading to the backup being bogus and
also not written. Fortunately all of the interesting programs are shell
scripts, so we can just prepend some text to them.

Another issue was that we were deleting the `lst` file that OH was
relying on to clean up the backup afterwards.
2024-01-08 12:31:22 +00:00
nixpkg-openhab-auto-update[bot]
c5143fbe60 openhab: ? -> 4.1.1 2024-01-08 12:30:50 +00:00
6 changed files with 88 additions and 75 deletions

12
flake.lock generated
View File

@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1690716044,
"narHash": "sha256-5rhZK0YMQOK+FaOC72leFXUFuCBxKH5SRzUQqpePqQE=",
"lastModified": 1764934844,
"narHash": "sha256-P+MyCHPVEXUB7j1lQCjWo6Ke9/SGkKCWbyyVeXkude8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b1b263e5f7f899704c6b592f2096bc8f719dc181",
"rev": "1177aa56e17909379c74d86c60d51f92f2f1e8e4",
"type": "github"
},
"original": {

34
jdk.nix
View File

@@ -1,18 +1,22 @@
{ buildPlatform, hostPlatform, jdk17, which, zip, buildPackages }:
if buildPlatform == hostPlatform
then jdk17
else (jdk17.override {
# libIDL does not compile in cross-compile scenarios.
enableGnome2 = false;
}).overrideAttrs (old: {
{
stdenv,
jdk21,
which,
zip,
buildPackages,
}:
if stdenv.buildPlatform == stdenv.hostPlatform
then jdk21
else
jdk21.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.jdk17}"
];
})
"--with-build-jdk=${buildPackages.jdk21}"
];
})

View File

@@ -1 +1 @@
4d48c0086d14525b05a59e4209270edb90a967ea271b80694e243caa2eea69c2
0da4a8887afe0b4c9808f35cc033290f608c25eb99bcf6943e73ab59e78894d0

View File

@@ -1,66 +1,75 @@
{
bash,
coreutils,
fetchurl,
gawk,
jdk-openhab,
lib,
makeWrapper,
procps,
stdenv,
}:
let
version = builtins.readFile ./version;
sha256 = builtins.readFile ./openhab.sha256;
in stdenv.mkDerivation rec {
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 {
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 ];
buildInputs = [ bash ];
outputs = [ "out" ];
extraPath = lib.makeBinPath [ jdk-openhab gawk coreutils procps ];
nativeBuildInputs = [makeWrapper gnused];
buildInputs = [bash];
outputs = ["out"];
extraPath = lib.makeBinPath [jdk-openhab gawk coreutils procps zip unzip];
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 \
"$out/runtime/bin/"*.lst
runHook preInstall
rm -rfv \
"$out/"*.bat \
"$out/runtime/bin/"*.bat \
"$out/runtime/bin/"*.ps1 \
"$out/runtime/bin/"*.psm1
for exe in $wrappedExecutables; do
echo "Wrapping $exe"
wrapProgram $out/$exe --prefix PATH ':' $extraPath
done
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
runHook postInstall
# 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
'';
}
}

View File

@@ -1 +1 @@
aa75eb31b10a7d966f006b6358e8d5db1304e2a7912decddf3a09b3cdec615dc
9d5d8815951d1638a4cb08d430226ec670179cbbd4620cb16d0251b4bb9f9377

View File

@@ -1 +1 @@
4.1.0
5.0.2