2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3, fetchpatch }:
|
2020-11-21 19:33:28 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wsdd";
|
|
|
|
version = "0.6.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "christgau";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0444xh1r5wd0zfch1hg1f9s4cw68srrm87hqx16qvlgx6jmz5j0p";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
2020-12-31 18:12:23 +00:00
|
|
|
patches = [
|
2021-01-19 21:20:11 +00:00
|
|
|
(fetchpatch {
|
2020-12-31 18:12:23 +00:00
|
|
|
# https://github.com/christgau/wsdd/issues/72
|
2021-01-19 21:20:11 +00:00
|
|
|
name = "fix_send_messages_using_correct_socket.patch";
|
|
|
|
url = "https://github.com/christgau/wsdd/commit/1ed74fe73a9fe2e2720859e2822116d65e4ffa5b.patch";
|
|
|
|
sha256 = "1n9bqvh20nhnvnc5pxvzf9kk8nky6rmbmfryg65lfmr1hmg676zg";
|
2020-12-31 18:12:23 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-11-21 19:33:28 +00:00
|
|
|
installPhase = ''
|
|
|
|
install -Dm0755 src/wsdd.py $out/bin/wsdd
|
|
|
|
wrapProgram $out/bin/wsdd --prefix PYTHONPATH : "$PYTHONPATH"
|
|
|
|
'';
|
|
|
|
|
2020-11-23 14:13:22 +00:00
|
|
|
passthru = {
|
|
|
|
tests.samba-wsdd = nixosTests.samba-wsdd;
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-11-21 19:33:28 +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;
|
|
|
|
};
|
|
|
|
}
|