Files
nixpkgs/pkgs/by-name/fi/fileshare/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.3 KiB
Nix

{
stdenv,
lib,
fetchFromGitea,
pkg-config,
git,
libmicrohttpd,
}:
stdenv.mkDerivation rec {
pname = "fileshare";
version = "0.2.4";
src = fetchFromGitea {
domain = "git.tkolb.de";
owner = "Public";
repo = "fileshare";
rev = "v${version}";
sha256 = "sha256-00MxPivZngQ2I7Hopz2MipJFnbvSZU0HF2wZucmEWQ4=";
};
postPatch = ''
sed -i 's,$(shell git rev-parse --short HEAD),/${version},g' Makefile
substituteInPlace Makefile \
--replace-fail pkg-config "${stdenv.cc.targetPrefix}pkg-config" \
--replace-fail gcc "${stdenv.cc.targetPrefix}cc"
'';
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
nativeBuildInputs = [
pkg-config
git
];
buildInputs = [ libmicrohttpd ];
makeFlags = [ "BUILD=release" ];
installPhase = ''
mkdir -p $out/bin
cp bin/release/fileshare $out/bin
'';
meta = with lib; {
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.";
homepage = "https://git.tkolb.de/Public/fileshare";
license = licenses.mit;
maintainers = [ maintainers.esclear ];
platforms = platforms.linux;
mainProgram = "fileshare";
};
}