2021-09-28 08:13:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3 }:
|
2020-11-24 20:58:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wsdd";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.7.0";
|
2020-11-24 20:58:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "christgau";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-9cwzkF2mg6yOIsurLMXTLoEIOsKbPIWMicpWBQ0XVhE=";
|
2020-11-24 20:58:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
patches = [
|
2021-09-28 08:13:01 +00:00
|
|
|
# Increase timeout to socket urlopen
|
|
|
|
# See https://github.com/christgau/wsdd/issues/80#issuecomment-76848906
|
|
|
|
./increase_timeout.patch
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
installPhase = ''
|
|
|
|
install -Dm0755 src/wsdd.py $out/bin/wsdd
|
|
|
|
wrapProgram $out/bin/wsdd --prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests.samba-wsdd = nixosTests.samba-wsdd;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-24 20:58:05 +00:00
|
|
|
homepage = "https://github.com/christgau/wsdd";
|
|
|
|
description = "A Web Service Discovery (WSD) host daemon for SMB/Samba";
|
|
|
|
maintainers = with maintainers; [ izorkin ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|