2023-09-22 17:21:51 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, vpcs
|
|
|
|
}:
|
2017-09-11 18:48:13 +02:00
|
|
|
|
2023-09-22 17:21:51 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2017-09-11 18:48:13 +02:00
|
|
|
pname = "vpcs";
|
2023-09-22 17:21:51 +02:00
|
|
|
version = "0.8.3";
|
2017-09-11 18:48:13 +02:00
|
|
|
|
2020-12-18 20:30:46 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GNS3";
|
2023-09-22 17:21:51 +02:00
|
|
|
repo = "vpcs";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-OKi4sC4fmKtkJkkpHZ6OfeIDaBafVrJXGXh1R6gLPFY=";
|
2017-09-11 18:48:13 +02:00
|
|
|
};
|
|
|
|
|
2023-09-22 17:21:51 +02:00
|
|
|
sourceRoot = "${finalAttrs.src.name}/src";
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
MKOPT="CC=${stdenv.cc.targetPrefix}cc" ./mk.sh ${stdenv.buildPlatform.linuxArch}
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
2017-09-11 18:48:13 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2023-09-22 17:21:51 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D -m555 vpcs $out/bin/vpcs
|
|
|
|
install -D -m444 ../man/vpcs.1 $out/share/man/man1/vpcs.1
|
|
|
|
|
|
|
|
runHook postInstall
|
2017-09-11 18:48:13 +02:00
|
|
|
'';
|
|
|
|
|
2017-11-16 13:30:14 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-09-22 17:21:51 +02:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = vpcs;
|
|
|
|
command = "vpcs -v";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-12-18 20:30:46 +01:00
|
|
|
description = "A simple virtual PC simulator";
|
2017-09-11 18:48:13 +02:00
|
|
|
longDescription = ''
|
2020-12-18 20:30:46 +01:00
|
|
|
The VPCS (Virtual PC Simulator) can simulate up to 9 PCs. You can
|
|
|
|
ping/traceroute them, or ping/traceroute the other hosts/routers from the
|
|
|
|
VPCS when you study the Cisco routers in the dynamips.
|
2017-09-11 18:48:13 +02:00
|
|
|
'';
|
2023-09-22 17:21:51 +02:00
|
|
|
inherit (finalAttrs.src.meta) homepage;
|
2017-09-11 18:48:13 +02:00
|
|
|
license = licenses.bsd2;
|
2023-09-22 17:21:51 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
mainProgram = "vpcs";
|
|
|
|
maintainers = with maintainers; [ anthonyroussel ];
|
2017-09-11 18:48:13 +02:00
|
|
|
};
|
2023-09-22 17:21:51 +02:00
|
|
|
})
|