Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 installShellFiles,
6 makeWrapper,
7 nixosTests,
8 python3,
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "wsdd";
13 version = "0.9";
14
15 src = fetchFromGitHub {
16 owner = "christgau";
17 repo = "wsdd";
18 tag = "v${finalAttrs.version}";
19 hash = "sha256-i3+Mw1l/kTRQT/CxRKvaEfdEh2qcEQp1Wa90Vk3JUMM=";
20 };
21
22 outputs = [
23 "out"
24 "man"
25 ];
26
27 nativeBuildInputs = [
28 installShellFiles
29 makeWrapper
30 ];
31
32 buildInputs = [ python3 ];
33
34 installPhase = ''
35 install -Dm0555 src/wsdd.py $out/bin/wsdd
36 installManPage man/wsdd.8
37 wrapProgram $out/bin/wsdd --prefix PYTHONPATH : "$PYTHONPATH"
38 '';
39
40 passthru = {
41 tests.samba-wsdd = nixosTests.samba-wsdd;
42 };
43
44 meta = {
45 homepage = "https://github.com/christgau/wsdd";
46 description = "Web Service Discovery (WSD) host daemon for SMB/Samba";
47 maintainers = with lib.maintainers; [ izorkin ];
48 license = lib.licenses.mit;
49 platforms = lib.platforms.all;
50 mainProgram = "wsdd";
51 };
52})