diff --git a/pkgs/applications/virtualization/vpcs/default.nix b/pkgs/applications/virtualization/vpcs/default.nix index cac997e43b56..af344eb82cf5 100644 --- a/pkgs/applications/virtualization/vpcs/default.nix +++ b/pkgs/applications/virtualization/vpcs/default.nix @@ -6,26 +6,27 @@ stdenv.mkDerivation rec { version = "0.8"; src = fetchurl { + name = "${name}.tar.bz2"; url = "mirror://sourceforge/project/${pname}/${version}/${name}-src.tbz"; sha256 = "14y9nflcyq486vvw0na0fkfmg5dac004qb332v4m5a0vaz8059nw"; }; - unpackCmd = "tar -xjf $src"; + patches = [ ./vpcs-0.8-glibc-2.26.patch ]; buildInputs = [ glibc.static ]; - buildPhase = '' + buildPhase = ''( cd src ./mk.sh ${buildPlatform.platform.kernelArch} - ''; + )''; installPhase = '' - cd .. - install -D -m555 src/vpcs $out/bin/vpcs; install -D -m444 man/vpcs.1 $out/share/man/man1/vpcs.1; ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Virtual PC simulator"; longDescription = '' diff --git a/pkgs/applications/virtualization/vpcs/vpcs-0.8-glibc-2.26.patch b/pkgs/applications/virtualization/vpcs/vpcs-0.8-glibc-2.26.patch new file mode 100644 index 000000000000..d94a39ccd64d --- /dev/null +++ b/pkgs/applications/virtualization/vpcs/vpcs-0.8-glibc-2.26.patch @@ -0,0 +1,14 @@ +diff --git a/src/getopt.h b/src/getopt.h +index 4394aa2..bf59e10 100644 +--- a/src/getopt.h ++++ b/src/getopt.h +@@ -49,9 +49,6 @@ extern int optind; + extern int opterr; + extern int optopt; + +-#ifndef FreeBSD +-int getopt(int argc, char** argv, char* optstr); +-#endif + int arg_to_int(const char* arg, int min, int max, int defalt); + + #ifdef __cplusplus