2022-12-19 11:12:39 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, installShellFiles, makeWrapper, nixosTests, python3 }:
|
2020-11-21 19:33:28 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wsdd";
|
2023-03-24 16:00:56 +00:00
|
|
|
version = "0.7.1";
|
2020-11-21 19:33:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "christgau";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-24 16:00:56 +00:00
|
|
|
hash = "sha256-xfZVGi3OxuRI+Zh6L3Ru4J4j5BB1EAN3fllRCVA/c5o=";
|
2020-11-21 19:33:28 +00:00
|
|
|
};
|
|
|
|
|
2022-12-19 11:12:39 +00:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
2020-11-21 19:33:28 +00:00
|
|
|
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
2020-12-31 18:12:23 +00:00
|
|
|
patches = [
|
2021-09-26 08:44:37 +00:00
|
|
|
# Increase timeout to socket urlopen
|
|
|
|
# See https://github.com/christgau/wsdd/issues/80#issuecomment-76848906
|
|
|
|
./increase_timeout.patch
|
2020-12-31 18:12:23 +00:00
|
|
|
];
|
|
|
|
|
2020-11-21 19:33:28 +00:00
|
|
|
installPhase = ''
|
2022-12-19 11:12:39 +00:00
|
|
|
install -Dm0555 src/wsdd.py $out/bin/wsdd
|
2023-03-24 16:00:56 +00:00
|
|
|
installManPage man/wsdd.8
|
2020-11-21 19:33:28 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|