uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
48
pkgs/servers/maddy/default.nix
Normal file
48
pkgs/servers/maddy/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, coreutils, installShellFiles, scdoc, nixosTests }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "maddy";
|
||||
version = "0.5.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "foxcpp";
|
||||
repo = "maddy";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-FWoPAb/aHaQLxT+UUUoViCmLvauVuAzUyOmRNB8F72U=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-rcHboPfs2mWg3sgsLmN1IPoppmuDcsx0bQICp6EzYsQ=";
|
||||
|
||||
ldflags = [ "-s" "-w" "-X github.com/foxcpp/maddy.Version=${version}" ];
|
||||
|
||||
subPackages = [ "cmd/maddy" "cmd/maddyctl" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles scdoc ];
|
||||
|
||||
postInstall = ''
|
||||
for f in docs/man/*.scd; do
|
||||
local page="docs/man/$(basename "$f" .scd)"
|
||||
scdoc < "$f" > "$page"
|
||||
installManPage "$page"
|
||||
done
|
||||
|
||||
mkdir -p $out/lib/systemd/system
|
||||
|
||||
substitute dist/systemd/maddy.service $out/lib/systemd/system/maddy.service \
|
||||
--replace "/usr/local/bin/maddy" "$out/bin/maddy" \
|
||||
--replace "/bin/kill" "${coreutils}/bin/kill"
|
||||
|
||||
substitute dist/systemd/maddy@.service $out/lib/systemd/system/maddy@.service \
|
||||
--replace "/usr/local/bin/maddy" "$out/bin/maddy" \
|
||||
--replace "/bin/kill" "${coreutils}/bin/kill"
|
||||
'';
|
||||
|
||||
passthru.tests.nixos = nixosTests.maddy;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Composable all-in-one mail server";
|
||||
homepage = "https://maddy.email";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ nickcao ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue