initial commit

This commit is contained in:
Simonas Kazlauskas
2023-02-20 23:58:44 +02:00
commit 1fe37caf74
4 changed files with 123 additions and 0 deletions

25
openhab-repository.nix Normal file
View File

@@ -0,0 +1,25 @@
# Downloads various dependencies for the openhab build.
{ lib, stdenv, maven, openhab-distro }:
stdenv.mkDerivation {
pname = "openhab-repository";
version = openhab-distro.shortRev;
nativeBuildInputs = [ maven ];
src = openhab-distro;
buildPhase = ''
mvn -B -T 128 -Drelease -Dmaven.repo.local="$out" package
'';
installPhase = ''
# Delete all ephemeral files with lastModified timestamps inside
find "$out" -type f '(' \
-name '*.lastUpdated' -or \
-name 'resolver-status.properties' -or \
-name '_remote.repositories' ')' -delete
'';
dontFixup = true;
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = builtins.readFile ./openhab-repository.sha256;
}