nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, buildGoModule, fetchFromGitHub, mage }:
2
3buildGoModule rec {
4 pname = "dave";
5 version = "0.4.0";
6
7 src = fetchFromGitHub {
8 owner = "micromata";
9 repo = "dave";
10 rev = "v${version}";
11 hash = "sha256-wvsW4EwMWAgEV+LPeMhHL4AsuyS5TDMmpD9D4F1nVM4=";
12 };
13
14 deleteVendor = true;
15 vendorHash = "sha256-iyq2DGdbdfJIRNkGAIKTk1LLDydpVX3juQFaG6H5vJQ=";
16
17 patches = [
18 # Add Go Modules support:
19 # - Based on https://github.com/micromata/dave/commit/46ae146dd2e95d57be35fa01885ea2c55fd8c279.
20 # - Bump golang.org/x/sys for Darwin.
21 ./go-modules.patch
22 ];
23
24 subPackages = [ "cmd/dave" "cmd/davecli" ];
25
26 ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs" ];
27
28 meta = with lib; {
29 homepage = "https://github.com/micromata/dave";
30 description = "A totally simple and very easy to configure stand alone webdav server";
31 license = licenses.asl20;
32 maintainers = with maintainers; [ lunik1 ];
33 };
34}