nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildGoModule,
5 installShellFiles,
6}:
7
8buildGoModule (finalAttrs: {
9 pname = "duf";
10 version = "0.9.1";
11
12 src = fetchFromGitHub {
13 owner = "muesli";
14 repo = "duf";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-d/co7EaDk0m/oYxWFATxQYCdH3Z9r8eTtOOo+M+HD4o=";
17 };
18
19 vendorHash = "sha256-Br2jagMynnzH77GNA7NeWbM5qSHbhfW5Bo7X2b6OX28=";
20
21 ldflags = [
22 "-s"
23 "-w"
24 "-X=main.Version=${finalAttrs.version}"
25 ];
26
27 nativeBuildInputs = [ installShellFiles ];
28
29 postInstall = ''
30 installManPage duf.1
31 '';
32
33 meta = {
34 homepage = "https://github.com/muesli/duf/";
35 description = "Disk Usage/Free Utility";
36 license = lib.licenses.mit;
37 maintainers = with lib.maintainers; [ sigmasquadron ];
38 mainProgram = "duf";
39 };
40})