2023-01-25 13:44:00 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, mage }:
|
2021-11-29 21:09:47 +01:00
|
|
|
|
2023-01-25 13:44:00 +01:00
|
|
|
buildGoModule rec {
|
2021-11-29 21:09:47 +01:00
|
|
|
pname = "dave";
|
|
|
|
version = "0.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "micromata";
|
|
|
|
repo = "dave";
|
|
|
|
rev = "v${version}";
|
2023-01-25 13:44:00 +01:00
|
|
|
hash = "sha256-wvsW4EwMWAgEV+LPeMhHL4AsuyS5TDMmpD9D4F1nVM4=";
|
2021-11-29 21:09:47 +01:00
|
|
|
};
|
|
|
|
|
2023-01-25 13:44:00 +01:00
|
|
|
deleteVendor = true;
|
|
|
|
vendorHash = "sha256-iyq2DGdbdfJIRNkGAIKTk1LLDydpVX3juQFaG6H5vJQ=";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Add Go Modules support:
|
|
|
|
# - Based on https://github.com/micromata/dave/commit/46ae146dd2e95d57be35fa01885ea2c55fd8c279.
|
|
|
|
# - Bump golang.org/x/sys for Darwin.
|
|
|
|
./go-modules.patch
|
|
|
|
];
|
2021-11-29 21:09:47 +01:00
|
|
|
|
|
|
|
subPackages = [ "cmd/dave" "cmd/davecli" ];
|
|
|
|
|
2023-01-25 13:44:00 +01:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs" ];
|
2021-11-29 21:09:47 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/micromata/dave";
|
2023-01-25 13:44:00 +01:00
|
|
|
description = "A totally simple and very easy to configure stand alone webdav server";
|
2021-11-29 21:09:47 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lunik1 ];
|
|
|
|
};
|
|
|
|
}
|