2023-02-02 18:25:31 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, mage }:
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
buildGoModule rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "dave";
|
|
|
|
version = "0.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "micromata";
|
|
|
|
repo = "dave";
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-wvsW4EwMWAgEV+LPeMhHL4AsuyS5TDMmpD9D4F1nVM4=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00: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-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/dave" "cmd/davecli" ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/micromata/dave";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Totally simple and very easy to configure stand alone webdav server";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lunik1 ];
|
|
|
|
};
|
|
|
|
}
|