2021-06-10 18:37:52 +00:00
|
|
|
{ stdenv, lib, fetchgit, pkg-config, git, libmicrohttpd }:
|
2019-10-04 20:15:10 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fileshare";
|
|
|
|
version = "0.2.4";
|
|
|
|
|
|
|
|
src = fetchgit {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "https://git.tkolb.de/Public/fileshare.git";
|
2019-10-04 20:15:10 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "03jrhk4vj6bc2w3lsrfjpfflb4laihysgs5i4cv097nr5cz32hyk";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,$(shell git rev-parse --short HEAD),/${version},g' Makefile
|
|
|
|
'';
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config git ];
|
2021-06-10 18:37:52 +00:00
|
|
|
buildInputs = [ libmicrohttpd ];
|
2019-10-04 20:15:10 +00:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "BUILD=release" ];
|
2019-10-04 20:15:10 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bin/release/fileshare $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-04 20:15:10 +00:00
|
|
|
description = "Small HTTP Server for quickly sharing files over the network";
|
|
|
|
longDescription = "Fileshare is a simple tool for sharing the contents of a directory via a webserver and optionally allowing uploads.";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://git.tkolb.de/Public/fileshare";
|
2019-10-04 20:15:10 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.esclear ];
|
|
|
|
platforms = platforms.linux;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "fileshare";
|
2019-10-04 20:15:10 +00:00
|
|
|
};
|
2020-04-01 01:11:51 +00:00
|
|
|
}
|