summaryrefslogtreecommitdiffstats
path: root/pkgs/servers/fileshare
diff options
context:
space:
mode:
authorDaniel Albert <esclear@users.noreply.github.com>2019-10-04 22:15:10 +0200
committerMatthieu Coudron <coudron@iij.ad.jp>2019-10-06 17:32:34 +0900
commita4ae914695faa5f23c2b4db848540b4728460207 (patch)
tree5ac1d5e5864cfc2ec0b57f33bbdb9bd8e13ddbfb /pkgs/servers/fileshare
parent2a25b5c3cbeab4692879c47eae3166abf5aadc67 (diff)
fileshare: init at 0.2.4
Fileshare is a simple tool for sharing the contents of a directory via a webserver and optionally allowing uploads.
Diffstat (limited to 'pkgs/servers/fileshare')
-rw-r--r--pkgs/servers/fileshare/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/servers/fileshare/default.nix b/pkgs/servers/fileshare/default.nix
new file mode 100644
index 000000000000..357237e1e291
--- /dev/null
+++ b/pkgs/servers/fileshare/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchgit, pkgconfig, git, libmicrohttpd }:
+
+stdenv.mkDerivation rec {
+ pname = "fileshare";
+ version = "0.2.4";
+
+ src = fetchgit {
+ url = https://git.tkolb.de/Public/fileshare.git;
+ rev = "v${version}";
+ sha256 = "03jrhk4vj6bc2w3lsrfjpfflb4laihysgs5i4cv097nr5cz32hyk";
+ };
+
+ postPatch = ''
+ sed -i 's,$(shell git rev-parse --short HEAD),/${version},g' Makefile
+ '';
+
+ nativeBuildInputs = [ pkgconfig git ];
+ buildInputs = [ libmicrohttpd ];
+
+ makeFlags = "BUILD=release";
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp bin/release/fileshare $out/bin
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A 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.";
+ homepage = https://git.tkolb.de/Public/fileshare;
+ license = licenses.mit;
+ maintainers = [ maintainers.esclear ];
+ platforms = platforms.linux;
+ };
+} \ No newline at end of file