summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/virtualization/vpcs
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-11-16 12:30:14 +0000
committerOrivej Desh <orivej@gmx.fr>2017-11-16 12:30:39 +0000
commit41e0d4b68d15e771002afb09690bd0305c04bfea (patch)
treef91e4fa20cd5b12fce62de54d4f5d3849ff4808d /pkgs/applications/virtualization/vpcs
parent231822338065f826ec4741d41cc6f2a6df82dc36 (diff)
vpcs: fix build with glibc 2.26
Tracking issue: #31696
Diffstat (limited to 'pkgs/applications/virtualization/vpcs')
-rw-r--r--pkgs/applications/virtualization/vpcs/default.nix11
-rw-r--r--pkgs/applications/virtualization/vpcs/vpcs-0.8-glibc-2.26.patch14
2 files changed, 20 insertions, 5 deletions
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