pkgs: extract lohr from 'services/lohr'

This commit is contained in:
Bruno BELANYI 2021-04-19 17:58:53 +00:00
parent b06f265291
commit e6d46b3c59
3 changed files with 24 additions and 5 deletions

View file

@ -1,4 +1,6 @@
{ pkgs }:
{
lohr = pkgs.callPackage ./lohr { };
podgrab = pkgs.callPackage ./podgrab { };
}

21
pkgs/lohr/default.nix Normal file
View file

@ -0,0 +1,21 @@
{ fetchFromGitHub, lib, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "lohr";
version = "0.4.0";
src = fetchFromGitHub {
owner = "alarsyo";
repo = "lohr";
rev = "v${version}";
sha256 = "sha256-MplTVJG+SoeLMXQP+ix/zM3OSHuQmZnunn900YnyCBw=";
};
cargoSha256 = "sha256-iuMJj8tqetlmdfsrfudnU1afwUzjls/UdYLq1u0gr+g=";
meta = with lib; {
description = "Git mirroring daemon";
homepage = "https://github.com/alarsyo/lohr";
license = with licenses; [ mit asl20 ];
platforms = platforms.unix;
};
}

View file

@ -7,11 +7,7 @@ let
domain = config.networking.domain;
lohrDomain = "lohr.${config.networking.domain}";
lohrPkg =
let
flake = builtins.getFlake "github:alarsyo/lohr?rev=6c4a496ede8d7209be13d2bd597eef0789992fc3";
in
flake.defaultPackage."x86_64-linux"; # FIXME: use correct system
lohrPkg = pkgs.ambroisie.lohr;
in
{
options.my.services.lohr = with lib; {