nixpkgs/pkgs/applications/virtualization/vpcs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, testers
, vpcs
}:
2017-09-11 18:48:13 +02:00
stdenv.mkDerivation (finalAttrs: {
2017-09-11 18:48:13 +02:00
pname = "vpcs";
version = "0.8.3";
2017-09-11 18:48:13 +02:00
src = fetchFromGitHub {
owner = "GNS3";
repo = "vpcs";
rev = "v${finalAttrs.version}";
hash = "sha256-OKi4sC4fmKtkJkkpHZ6OfeIDaBafVrJXGXh1R6gLPFY=";
2017-09-11 18:48:13 +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 = ''
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
'';
enableParallelBuilding = true;
passthru = {
tests.version = testers.testVersion {
package = vpcs;
command = "vpcs -v";
};
};
meta = with lib; {
description = "A simple virtual PC simulator";
2017-09-11 18:48:13 +02:00
longDescription = ''
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
'';
inherit (finalAttrs.src.meta) homepage;
2017-09-11 18:48:13 +02:00
license = licenses.bsd2;
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "vpcs";
maintainers = with maintainers; [ anthonyroussel ];
2017-09-11 18:48:13 +02:00
};
})