From ecce30c3c5f0235d27553d0a9dc5539581387c64 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Mon, 23 Sep 2024 16:28:16 -0700 Subject: [PATCH] added default nix --- default.nix | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..f5ad782 --- /dev/null +++ b/default.nix @@ -0,0 +1,54 @@ +{ + +lib, + +stdenv, + +fetchurl, + +autoPatchelfHook, + +}: + + +stdenv.mkDerivation rec { + pname = "Alby Hub"; + version = "1.6.0"; + + src = fetchurl { + url = "https://github.com/getAlby/hub/releases/download/v${version}/albyhub-Server-Linux-x86_64.tar.bz2"; + hash = "sha256-nDrrAWAIWbGTHbTMinLMyQV33UkNCR0o+zrOMvigasw="; + }; + +sourceRoot = "."; + +nativeBuildInputs = [ + autoPatchelfHook +]; + +buildInputs = [ + stdenv.cc.cc.lib +]; + +preBuild = '' + addAutoPatchelfSearchPath ./lib +''; + +installPhase = '' + mkdir -p $out/lib/albyhub + + runHook preInstall + install -m755 -D ./bin/albyhub $out/bin/albyhub + install -m755 -D ./lib/* $out/lib/albyhub + runHook postInstall + + ''; + +meta = with lib; { + description = "Alby Hub - Your own lightning node connected to every app"; + license = licenses.asl20; + maintainers = with maintainers; [ ]; + homepage = "https://github.com/getAlby/hub"; +}; + +}