Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

owntracks-recorder: init at 0.9.3 #240732

Merged
merged 1 commit into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions pkgs/servers/owntracks-recorder/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, mosquitto
, curl
, openssl
, lmdb
, lua
, libsodium
, libuuid
, libconfig
, testers
, owntracks-recorder
}:

stdenv.mkDerivation (finalAttrs: {
pname = "owntracks-recorder";
version = "0.9.3";

src = fetchFromGitHub {
owner = "owntracks";
repo = "recorder";
rev = finalAttrs.version;
hash = "sha256-w0wk69hERGz6fs6uXBYiomcVlQeeTGCfTICu2q7ryNg=";
};

nativeBuildInputs = [
pkg-config
];

buildInputs = [
(lib.getDev curl)
(lib.getLib libconfig)
(lib.getDev openssl)
(lib.getDev lmdb)
(lib.getDev mosquitto)
(lib.getDev libuuid)
(lib.getDev lua)
(lib.getDev libsodium)
];

configurePhase = ''
runHook preConfigure

cp config.mk.in config.mk

substituteInPlace config.mk \
--replace "INSTALLDIR = /usr/local" "INSTALLDIR = $out" \
--replace "WITH_LUA ?= no" "WITH_LUA ?= yes" \
--replace "WITH_ENCRYPT ?= no" "WITH_ENCRYPT ?= yes"

runHook postConfigure
'';

installPhase = ''
runHook preInstall

mkdir -p $out/bin

install -m 0755 ot-recorder $out/bin
install -m 0755 ocat $out/bin

runHook postInstall
'';

passthru.tests.version = testers.testVersion {
package = owntracks-recorder;
command = "ocat --version";
version = finalAttrs.version;
};

meta = with lib; {
description = "Store and access data published by OwnTracks apps";
homepage = "https://github.com/owntracks/recorder";
changelog = "https://github.com/owntracks/recorder/blob/master/Changelog";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ gaelreyrol ];
mainProgram = "ot-recorder";
};
})
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11119,6 +11119,8 @@ with pkgs;

owncast = callPackage ../servers/owncast { };

owntracks-recorder = callPackage ../servers/owntracks-recorder { };

update-dotdee = with python3Packages; toPythonApplication update-dotdee;

update-nix-fetchgit = haskell.lib.compose.justStaticExecutables haskellPackages.update-nix-fetchgit;
Expand Down