diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/misc')
15 files changed, 727 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/misc/airsonic/default.nix b/nixpkgs/pkgs/servers/misc/airsonic/default.nix new file mode 100644 index 000000000000..0089ee33c27d --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/airsonic/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchurl, nixosTests }: + +stdenv.mkDerivation rec { + pname = "airsonic"; + version = "10.6.2"; + + src = fetchurl { + url = "https://github.com/airsonic/airsonic/releases/download/v${version}/airsonic.war"; + sha256 = "0q3qnqymj3gaa6n79pvbyidn1ga99lpngp5wvhlw1aarg1m7vccl"; + }; + + buildCommand = '' + mkdir -p "$out/webapps" + cp "$src" "$out/webapps/airsonic.war" + ''; + + passthru.tests = { + airsonic-starts = nixosTests.airsonic; + }; + + meta = with lib; { + description = "Personal media streamer"; + homepage = "https://airsonic.github.io"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + license = lib.licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ disassembler ]; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/client-ip-echo/client-ip-echo.nix b/nixpkgs/pkgs/servers/misc/client-ip-echo/client-ip-echo.nix new file mode 100644 index 000000000000..a02daa179833 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/client-ip-echo/client-ip-echo.nix @@ -0,0 +1,17 @@ +{ mkDerivation, fetchFromGitHub, base, bytestring, network, lib }: +mkDerivation { + pname = "client-ip-echo"; + version = "0.1.0.5"; + src = fetchFromGitHub { + owner = "jerith666"; + repo = "client-ip-echo"; + rev = "e81db98d04c13966b2ec114e01f82487962055a7"; + sha256 = "02rzzbm1mdqh5zx5igd0s7pwkcsk64lx40rclxw3485348brc6ya"; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ base bytestring network ]; + description = "accepts TCP connections and echoes the client's IP address back to it"; + license = lib.licenses.lgpl3; + mainProgram = "client-ip-echo"; +} diff --git a/nixpkgs/pkgs/servers/misc/client-ip-echo/default.nix b/nixpkgs/pkgs/servers/misc/client-ip-echo/default.nix new file mode 100644 index 000000000000..5bc0ea45e2b6 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/client-ip-echo/default.nix @@ -0,0 +1,2 @@ +{ pkgs }: +pkgs.haskellPackages.callPackage ./client-ip-echo.nix { } diff --git a/nixpkgs/pkgs/servers/misc/gobgpd/default.nix b/nixpkgs/pkgs/servers/misc/gobgpd/default.nix new file mode 100644 index 000000000000..48003cae4693 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/gobgpd/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "gobgpd"; + version = "3.24.0"; + + src = fetchFromGitHub { + owner = "osrg"; + repo = "gobgp"; + rev = "refs/tags/v${version}"; + hash = "sha256-JGgkhNSKprqaUBaW+m/5vYnuDri1Ibyf2Y6SMlscnIU="; + }; + + vendorHash = "sha256-5eB3vFOo3LCsjMnWYFH0yq5+IunwKXp5C34x6NvpFZ8="; + + postConfigure = '' + export CGO_ENABLED=0 + ''; + + ldflags = [ + "-s" + "-w" + "-extldflags '-static'" + ]; + + subPackages = [ + "cmd/gobgpd" + ]; + + meta = with lib; { + description = "BGP implemented in Go"; + mainProgram = "gobgpd"; + homepage = "https://osrg.github.io/gobgp/"; + changelog = "https://github.com/osrg/gobgp/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ higebu ]; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/irrd/default.nix b/nixpkgs/pkgs/servers/misc/irrd/default.nix new file mode 100644 index 000000000000..e6cc723ab4dc --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/irrd/default.nix @@ -0,0 +1,162 @@ +{ lib +, python3 +, fetchPypi +, fetchFromGitHub +, fetchpatch +, git +, postgresql +, postgresqlTestHook +, redis +}: + +let + py = python3.override { + packageOverrides = final: prev: { + # sqlalchemy 1.4.x or 2.x are not supported + sqlalchemy = prev.sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "1.3.24"; + src = fetchPypi { + inherit (oldAttrs) pname; + inherit version; + hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk="; + }; + doCheck = false; + }); + alembic = prev.alembic.overridePythonAttrs (lib.const { + doCheck = false; + }); + factory-boy = prev.factory-boy.overridePythonAttrs (lib.const { + doCheck = false; + }); + beautifultable = prev.beautifultable.overridePythonAttrs (oldAttrs: rec { + version = "0.8.0"; + src = fetchPypi { + inherit (oldAttrs) pname; + inherit version; + hash = "sha256-1E2VUbvte/qIZ1Mk+E77mqhXOE1E6fsh61MPCgutuBU="; + }; + doCheck = false; + }); + }; + }; +in + +py.pkgs.buildPythonPackage rec { + pname = "irrd"; + version = "4.4.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "irrdnet"; + repo = "irrd"; + rev = "v${version}"; + hash = "sha256-vZSuBP44ZvN0mu2frcaQNZN/ilvKWIY9ETnrStzSnG0="; + }; + patches = [ + # replace poetry dependency with poetry-core + # https://github.com/irrdnet/irrd/pull/884 + (fetchpatch { + url = "https://github.com/irrdnet/irrd/commit/4fb6e9b50d65729aff2d0a94c2e9b4e2daadea85.patch"; + hash = "sha256-DcE6VZfJkbHnPiEdYDpXea7S/8P0SmdvvJ42hywnpf0="; + }) + ]; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + ]; + + nativeCheckInputs = [ + git + redis + postgresql + postgresqlTestHook + ] ++ (with py.pkgs; [ + pytest-asyncio + pytest-freezegun + pytestCheckHook + smtpdfix + ]); + + propagatedBuildInputs = with py.pkgs; [ + python-gnupg + passlib + bcrypt + ipy + ordered-set + beautifultable + pyyaml + datrie + setproctitle + python-daemon + pid + py.pkgs.redis + hiredis + coredis + requests + pytz + ariadne + uvicorn + starlette + psutil + asgiref + pydantic + typing-extensions + py-radix-sr + psycopg2 + sqlalchemy + alembic + ujson + wheel + websockets + limits + factory-boy + webauthn + wtforms + imia + starlette-wtf + zxcvbn + pyotp + asgi-logger + wtforms-bootstrap5 + email-validator + ] ++ py.pkgs.uvicorn.optional-dependencies.standard; + + preCheck = '' + redis-server & + REDIS_PID=$! + + while ! redis-cli --scan ; do + echo waiting for redis + sleep 1 + done + + export SMTPD_HOST=127.0.0.1 + export IRRD_DATABASE_URL="postgres:///$PGDATABASE" + export IRRD_REDIS_URL="redis://localhost/1" + ''; + + # required for test_object_writing_and_status_checking + postgresqlTestSetupPost = '' + echo "track_commit_timestamp=on" >> $PGDATA/postgresql.conf + pg_ctl restart + ''; + + postCheck = '' + kill $REDIS_PID + ''; + + # skip tests that require internet access + disabledTests = [ + "test_020_dash_o_noop" + "test_050_non_json_response" + ]; + + meta = with lib; { + changelog = "https://irrd.readthedocs.io/en/v${version}/releases/"; + description = "An Internet Routing Registry database server, processing IRR objects in the RPSL format"; + license = licenses.mit; + homepage = "https://github.com/irrdnet/irrd"; + maintainers = teams.wdz.members; + }; +} + diff --git a/nixpkgs/pkgs/servers/misc/navidrome/default.nix b/nixpkgs/pkgs/servers/misc/navidrome/default.nix new file mode 100644 index 000000000000..b663df8809a8 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/navidrome/default.nix @@ -0,0 +1,88 @@ +{ buildGoModule +, buildPackages +, fetchFromGitHub +, fetchNpmDeps +, lib +, nodejs +, npmHooks +, pkg-config +, stdenv +, ffmpeg-headless +, taglib +, zlib +, makeWrapper +, nixosTests +, nix-update-script +, ffmpegSupport ? true +}: + +buildGoModule rec { + pname = "navidrome"; + version = "0.51.1"; + + src = fetchFromGitHub { + owner = "navidrome"; + repo = "navidrome"; + rev = "v${version}"; + hash = "sha256-6IYQrSWqrvYz2tDlk14UaX36bdXN0DbF7ynaa3Qboa4="; + }; + + vendorHash = "sha256-Q95OchWkxd/EmG7Vu0e/dge9nOIrGmcTgjGL5dBvEKA="; + + npmRoot = "ui"; + + npmDeps = fetchNpmDeps { + inherit src; + sourceRoot = "${src.name}/ui"; + hash = "sha256-LrLswdt6RA55FQE/YWHNwtjxljjlCNSTLWJNqy1ohKo="; + }; + + nativeBuildInputs = [ + buildPackages.makeWrapper + nodejs + npmHooks.npmConfigHook + pkg-config + ]; + + overrideModAttrs = oldAttrs: { + nativeBuildInputs = lib.filter (drv: drv != npmHooks.npmConfigHook) oldAttrs.nativeBuildInputs; + preBuild = null; + }; + + buildInputs = [ + taglib + zlib + ]; + + ldflags = [ + "-X github.com/navidrome/navidrome/consts.gitSha=${src.rev}" + "-X github.com/navidrome/navidrome/consts.gitTag=v${version}" + ]; + + CGO_CFLAGS = lib.optionals stdenv.cc.isGNU [ "-Wno-return-local-addr" ]; + + preBuild = '' + make buildjs + ''; + + postFixup = lib.optionalString ffmpegSupport '' + wrapProgram $out/bin/navidrome \ + --prefix PATH : ${lib.makeBinPath [ ffmpeg-headless ]} + ''; + + passthru = { + tests.navidrome = nixosTests.navidrome; + updateScript = nix-update-script { }; + }; + + meta = { + description = "Navidrome Music Server and Streamer compatible with Subsonic/Airsonic"; + mainProgram = "navidrome"; + homepage = "https://www.navidrome.org/"; + license = lib.licenses.gpl3Only; + sourceProvenance = with lib.sourceTypes; [ fromSource ]; + maintainers = with lib.maintainers; [ aciceri squalus ]; + # Broken on Darwin: sandbox-exec: pattern serialization length exceeds maximum (NixOS/nix#4119) + broken = stdenv.isDarwin; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/oven-media-engine/default.nix b/nixpkgs/pkgs/servers/misc/oven-media-engine/default.nix new file mode 100644 index 000000000000..35db446c70a2 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/oven-media-engine/default.nix @@ -0,0 +1,66 @@ +{ lib, stdenv +, fetchFromGitHub +, fetchpatch +, srt +, bc +, pkg-config +, perl +, openssl +, zlib +, ffmpeg_4 +, libvpx +, libopus +, libuuid +, srtp +, jemalloc +, pcre2 +, hiredis +}: + +stdenv.mkDerivation rec { + pname = "oven-media-engine"; + version = "0.15.14"; + + src = fetchFromGitHub { + owner = "AirenSoft"; + repo = "OvenMediaEngine"; + rev = "v${version}"; + sha256 = "sha256-pLLnk0FXJ6gb0WSdWGEzJSEbKdOpjdWECIRzrHvi8HQ="; + }; + + sourceRoot = "${src.name}/src"; + makeFlags = [ "release" "CONFIG_LIBRARY_PATHS=" "CONFIG_PKG_PATHS=" "GLOBAL_CC=$(CC)" "GLOBAL_CXX=$(CXX)" "GLOBAL_LD=$(CXX)" "SHELL=${stdenv.shell}" ]; + enableParallelBuilding = true; + + nativeBuildInputs = [ bc pkg-config perl ]; + buildInputs = [ openssl srt zlib ffmpeg_4 libvpx libopus srtp jemalloc pcre2 libuuid hiredis ]; + + preBuild = '' + patchShebangs core/colorg++ + patchShebangs core/colorgcc + patchShebangs projects/main/update_git_info.sh + + sed -i -e 's/const AVOutputFormat /AVOutputFormat /g' \ + projects/modules/mpegts/mpegts_writer.cpp \ + projects/modules/file/file_writer.cpp \ + projects/modules/rtmp/rtmp_writer.cpp + sed -i -e '/^CC =/d' -e '/^CXX =/d' -e '/^AR =/d' projects/third_party/pugixml-1.9/scripts/pugixml.make + ''; + + installPhase = '' + install -Dm0755 bin/RELEASE/OvenMediaEngine $out/bin/OvenMediaEngine + install -Dm0644 ../misc/conf_examples/Origin.xml $out/share/examples/origin_conf/Server.xml + install -Dm0644 ../misc/conf_examples/Logger.xml $out/share/examples/origin_conf/Logger.xml + install -Dm0644 ../misc/conf_examples/Edge.xml $out/share/examples/edge_conf/Server.xml + install -Dm0644 ../misc/conf_examples/Logger.xml $out/share/examples/edge_conf/Logger.xml + ''; + + meta = with lib; { + description = "Open-source streaming video service with sub-second latency"; + mainProgram = "OvenMediaEngine"; + homepage = "https://ovenmediaengine.com"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ lukegb ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/podgrab/default.nix b/nixpkgs/pkgs/servers/misc/podgrab/default.nix new file mode 100644 index 000000000000..4e5846faba56 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/podgrab/default.nix @@ -0,0 +1,31 @@ +{ lib, fetchFromGitHub, buildGoModule, nixosTests }: + +buildGoModule rec { + pname = "podgrab"; + version = "unstable-2021-04-14"; + + src = fetchFromGitHub { + owner = "akhilrex"; + repo = pname; + rev = "3179a875b8b638fb86d0e829d12a9761c1cd7f90"; + sha256 = "sha256-vhxIm20ZUi+RusrAsSY54tv/D570/oMO5qLz9dNqgqo="; + }; + + vendorHash = "sha256-xY9xNuJhkWPgtqA/FBVIp7GuWOv+3nrz6l3vaZVLlIE="; + + postInstall = '' + mkdir -p $out/share/ + cp -r $src/client $out/share/ + cp -r $src/webassets $out/share/ + ''; + + passthru.tests = { inherit (nixosTests) podgrab; }; + + meta = with lib; { + description = "A self-hosted podcast manager to download episodes as soon as they become live"; + mainProgram = "podgrab"; + homepage = "https://github.com/akhilrex/podgrab"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ ambroisie ]; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/qremotecontrol-server/0001-fix-qt5-build-include-QDataStream.patch b/nixpkgs/pkgs/servers/misc/qremotecontrol-server/0001-fix-qt5-build-include-QDataStream.patch new file mode 100644 index 000000000000..0d6c9f15f3db --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/qremotecontrol-server/0001-fix-qt5-build-include-QDataStream.patch @@ -0,0 +1,26 @@ +From 922d3dd36ac72b29ea21c4c728a922b43b19400e Mon Sep 17 00:00:00 2001 +From: Francesco Gazzetta <fgaz@fgaz.me> +Date: Tue, 14 Jun 2022 17:55:43 +0200 +Subject: [PATCH] Another Qt5 fix + +--- + qtsingleapplication/qtlocalpeer.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/qtsingleapplication/qtlocalpeer.cpp b/qtsingleapplication/qtlocalpeer.cpp +index 4a84036..e6ccc72 100644 +--- a/qtsingleapplication/qtlocalpeer.cpp ++++ b/qtsingleapplication/qtlocalpeer.cpp +@@ -41,6 +41,9 @@ + + #include "qtlocalpeer.h" + #include <QCoreApplication> ++#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) ++#include <QDataStream> ++#endif + #include <QTime> + + #if defined(Q_OS_WIN) +-- +2.36.0 + diff --git a/nixpkgs/pkgs/servers/misc/qremotecontrol-server/default.nix b/nixpkgs/pkgs/servers/misc/qremotecontrol-server/default.nix new file mode 100644 index 000000000000..5fba2c0a382f --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/qremotecontrol-server/default.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, fetchgit +, qmake +, wrapQtAppsHook +, qtbase +, xorg +}: + +stdenv.mkDerivation { + pname = "qremotecontrol-server"; + version = "unstable-2014-11-05"; # basically 2.4.2 + qt5 + + src = fetchgit { + url = "https://git.code.sf.net/p/qrc/gitcode"; + rev = "8f1c55eac10ac8af974c3c20157d90ef57f7308a"; + sha256 = "sha256-AfFScec5/emG/f+yc5Zn37USIEWzGP/sBifE6Kx8d0E="; + }; + + patches = [ + ./0001-fix-qt5-build-include-QDataStream.patch + ]; + + nativeBuildInputs = [ + qmake + wrapQtAppsHook + ]; + + buildInputs = [ + qtbase + xorg.libXtst + ]; + + postPatch = '' + substituteInPlace QRemoteControl-Server.pro \ + --replace /usr $out + ''; + + meta = with lib; { + license = licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ fgaz ]; + homepage = "https://sourceforge.net/projects/qrc/"; + description = "Remote control your desktop from your mobile"; + mainProgram = "qremotecontrol-server"; + longDescription = '' + With QRemoteControl installed on your desktop you can easily control + your computer via WiFi from your mobile. By using the touch pad of your + Phone you can for example open the internet browser and navigate to + the pages you want to visit, use the music player or your media center + without being next to your PC or laptop. Summarizing QRemoteControl + allows you to do almost everything you would be able to do with a + mouse and a keyboard, but from a greater distance. To make these + replacements possible QRemoteControl offers you a touch pad, a + keyboard, multimedia keys and buttons for starting applications. Even + powering on the computer via Wake On Lan is supported. + ''; + # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs + broken = stdenv.isDarwin; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/shell2http/default.nix b/nixpkgs/pkgs/servers/misc/shell2http/default.nix new file mode 100644 index 000000000000..f4dbaf9e1020 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/shell2http/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +, testers +, shell2http +}: + +buildGoModule rec { + pname = "shell2http"; + version = "1.17.0"; + + src = fetchFromGitHub { + owner = "msoap"; + repo = "shell2http"; + rev = "v${version}"; + hash = "sha256-CU7ENLx5C1qCO1f9m0fl/AmUzmtmj6IjMlx9WNqAnS0="; + }; + + vendorHash = "sha256-K/0ictKvX0sl/5hFDKjTkpGMze0x9fJA98RXNsep+DM="; + + nativeBuildInputs = [ + installShellFiles + ]; + + ldflags = [ + "-s" + "-w" + "-X=main.version=${version}" + ]; + + postInstall = '' + installManPage shell2http.1 + ''; + + passthru.tests = { + version = testers.testVersion { + package = shell2http; + }; + }; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Executing shell commands via HTTP server"; + mainProgram = "shell2http"; + homepage = "https://github.com/msoap/shell2http"; + changelog = "https://github.com/msoap/shell2http/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/starcharts/default.nix b/nixpkgs/pkgs/servers/misc/starcharts/default.nix new file mode 100644 index 000000000000..c866f18b2c6a --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/starcharts/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "starcharts"; + version = "1.9.1"; + + src = fetchFromGitHub { + owner = "caarlos0"; + repo = "starcharts"; + rev = "v${version}"; + hash = "sha256-RLGKf5+HqJlZUhA5C3cwDumIhlbXcOr5iitI+7GZPBc="; + }; + + vendorHash = "sha256-BlVjGG6dhh7VO9driT0rnpbW6lORojiV+YhrV1Zlj4M="; + + ldflags = [ + "-s" + "-w" + "-X=main.version=${version}" + ]; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Plot your repository stars over time"; + mainProgram = "starcharts"; + homepage = "https://github.com/caarlos0/starcharts"; + changelog = "https://github.com/caarlos0/starcharts/releases/tag/${src.rev}"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/subsonic/default.nix b/nixpkgs/pkgs/servers/misc/subsonic/default.nix new file mode 100644 index 000000000000..8e04dcb1cb98 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/subsonic/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, jre }: + +stdenv.mkDerivation rec { + pname = "subsonic"; + version = "6.1.6"; + + src = fetchurl { + url = "mirror://sourceforge/subsonic/subsonic-${version}-standalone.tar.gz"; + sha256 = "180qdk8mnc147az8v9rmc1kgf8b13mmq88l195gjdwiqpflqzdyz"; + }; + + inherit jre; + + # Create temporary directory to extract tarball into to satisfy Nix's need + # for a directory to be created in the unpack phase. + unpackPhase = '' + runHook preUnpack + mkdir ${pname}-${version} + tar -C ${pname}-${version} -xzf $src + runHook postUnpack + ''; + installPhase = '' + runHook preInstall + mkdir $out + cp -r ${pname}-${version}/* $out + runHook postInstall + ''; + + meta = with lib; { + homepage = "http://subsonic.org"; + description = "Personal media streamer"; + license = licenses.unfree; + maintainers = with maintainers; [ telotortium ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/taskserver/default.nix b/nixpkgs/pkgs/servers/misc/taskserver/default.nix new file mode 100644 index 000000000000..bbd2a4a70da4 --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/taskserver/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchurl, cmake, libuuid, gnutls, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "taskserver"; + version = "1.1.0"; + + src = fetchurl { + url = "http://www.taskwarrior.org/download/taskd-${version}.tar.gz"; + sha256 = "1d110q9vw8g5syzihxymik7hd27z1592wkpz55kya6lphzk8i13v"; + }; + + patchPhase = '' + pkipath=$out/share/taskd/pki + mkdir -p $pkipath + cp -r pki/* $pkipath + echo "patching paths in pki/generate" + sed -i "s#^\.#$pkipath#" $pkipath/generate + for f in $pkipath/generate* ;do + i=$(basename $f) + echo patching $i + sed -i \ + -e 's/which/type -p/g' \ + -e 's#^\. ./vars#if test -e ./vars;then . ./vars; else echo "cannot find ./vars - copy the template from '$pkipath'/vars into the working directory";exit 1; fi#' $f + + echo wrapping $i + makeWrapper $pkipath/$i $out/bin/taskd-pki-$i \ + --prefix PATH : ${lib.makeBinPath [ gnutls ]} + done + ''; + + buildInputs = [ libuuid gnutls ]; + nativeBuildInputs = [ cmake makeWrapper ]; + + meta = { + description = "Server for synchronising Taskwarrior clients"; + homepage = "https://taskwarrior.org"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ matthiasbeyer makefu ]; + }; +} diff --git a/nixpkgs/pkgs/servers/misc/virtiofsd/default.nix b/nixpkgs/pkgs/servers/misc/virtiofsd/default.nix new file mode 100644 index 000000000000..027235986c5e --- /dev/null +++ b/nixpkgs/pkgs/servers/misc/virtiofsd/default.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, rustPlatform, fetchFromGitLab, libcap_ng, libseccomp }: + +rustPlatform.buildRustPackage rec { + pname = "virtiofsd"; + version = "1.10.1"; + + src = fetchFromGitLab { + owner = "virtio-fs"; + repo = "virtiofsd"; + rev = "v${version}"; + sha256 = "sha256-qHrgNuPDEtFzucE6ACPemUcjEqOvbo4xV0ru4bP3ATE="; + }; + + separateDebugInfo = true; + + cargoHash = "sha256-BVl4Inr7ZLnilkPVTD2cjJx9RuqB0Mg230o2c2TLw3I="; + + LIBCAPNG_LIB_PATH = "${lib.getLib libcap_ng}/lib"; + LIBCAPNG_LINK_TYPE = + if stdenv.hostPlatform.isStatic then "static" else "dylib"; + + buildInputs = [ libcap_ng libseccomp ]; + + postConfigure = '' + sed -i "s|/usr/libexec|$out/bin|g" 50-virtiofsd.json + ''; + + postInstall = '' + install -Dm644 50-virtiofsd.json "$out/share/qemu/vhost-user/50-virtiofsd.json" + ''; + + meta = with lib; { + homepage = "https://gitlab.com/virtio-fs/virtiofsd"; + description = "vhost-user virtio-fs device backend written in Rust"; + maintainers = with maintainers; [ qyliss astro ]; + mainProgram = "virtiofsd"; + platforms = platforms.linux; + license = with licenses; [ asl20 /* and */ bsd3 ]; + }; +} |