nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 33 lines 785 B view raw
1{ lib, stdenv, fetchurl, libxcrypt }: 2 3stdenv.mkDerivation rec { 4 pname = "thttpd"; 5 version = "2.29"; 6 7 src = fetchurl { 8 url = "https://acme.com/software/thttpd/${pname}-${version}.tar.gz"; 9 sha256 = "15x3h4b49wgfywn82i3wwbf38mdns94mbi4ma9xiwsrjv93rzh4r"; 10 }; 11 12 prePatch = '' 13 sed -i -e 's/getline/getlineX/' extras/htpasswd.c 14 sed -i -e 's/chmod 2755/chmod 755/' extras/Makefile.in 15 ''; 16 17 buildInputs = [ 18 libxcrypt 19 ]; 20 21 preInstall = '' 22 mkdir -p "$out/man/man1" 23 sed -i -e 's/-o bin -g bin *//' Makefile 24 sed -i -e '/chgrp/d' extras/Makefile 25 ''; 26 27 meta = { 28 description = "Tiny/turbo/throttling HTTP server"; 29 homepage = "http://www.acme.com/software/thttpd/"; 30 license = lib.licenses.bsd2; 31 platforms = lib.platforms.linux; 32 }; 33}