Merge pull request #95635 from Profpatsch/bgnet-fix

bgnet: 3.0.21 -> 3.1.2
This commit is contained in:
Florian Klink 2020-08-17 21:18:45 +02:00 committed by GitHub
commit 4391dcb742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,27 +1,30 @@
{ stdenv, lib, fetchurl, python, zip, fop }:
{ stdenv, lib, fetchFromGitHub, python3, pandoc }:
stdenv.mkDerivation {
pname = "bgnet";
version = "3.0.21";
# to be found in the Makefile
version = "3.1.2";
src = fetchurl {
url = "https://beej.us/guide/bgnet/bgnet.tgz";
sha256 = "00ggr5prc5i3w9gaaw2sadfq6haq7lmh0vdilaxx8xz9z5znxvyv";
src = fetchFromGitHub {
owner = "beejjorgensen";
repo = "bgnet";
rev = "782a785a35d43c355951b8151628d7c64e4d0346";
sha256 = "19w0r3zr71ydd29amqwn8q3npgrpy5kkshyshyji2hw5hky6iy92";
};
buildInputs = [ python zip fop ];
preBuild = ''
sed -i "s/#disable=1/disable=1/" bin/bgvalidate
buildPhase = ''
# build scripts need some love
patchShebangs .
patchShebangs bin/preproc
make -C src bgnet.html
'';
installPhase = ''
mkdir -p $out
mv * $out/
install -Dm644 src/bgnet.html $out/share/doc/bgnet/html/index.html
'';
nativeBuildInputs = [ python3 pandoc ];
meta = {
description = "Beejs Guide to Network Programming";
homepage = "https://beej.us/guide/bgnet/";