cisco-packet-tracer: init at 7.3.1 and 8.0.1
Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
parent
e83a6a94fa
commit
cc0ac2c9d4
3 changed files with 225 additions and 0 deletions
90
pkgs/applications/networking/cisco-packet-tracer/7.nix
Normal file
90
pkgs/applications/networking/cisco-packet-tracer/7.nix
Normal file
|
@ -0,0 +1,90 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, buildFHSUserEnvBubblewrap
|
||||
, callPackage
|
||||
, copyDesktopItems
|
||||
, dpkg
|
||||
, lndir
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, requireFile
|
||||
}:
|
||||
|
||||
let
|
||||
version = "7.3.1";
|
||||
|
||||
ptFiles = stdenv.mkDerivation {
|
||||
name = "PacketTracer7drv";
|
||||
inherit version;
|
||||
|
||||
dontUnpack = true;
|
||||
src = requireFile {
|
||||
name = "PacketTracer_${builtins.replaceStrings ["."] [""] version}_amd64.deb";
|
||||
sha256 = "c39802d15dd61d00ba27fb8c116da45fd8562ab4b49996555ad66b88deace27f";
|
||||
url = "https://www.netacad.com";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
dpkg-deb -x $src $out
|
||||
makeWrapper "$out/opt/pt/bin/PacketTracer7" "$out/bin/packettracer7" \
|
||||
--prefix LD_LIBRARY_PATH : "$out/opt/pt/bin"
|
||||
'';
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "cisco-pt7.desktop";
|
||||
desktopName = "Cisco Packet Tracer 7";
|
||||
icon = "${ptFiles}/opt/pt/art/app.png";
|
||||
exec = "packettracer7 %f";
|
||||
mimeType = "application/x-pkt;application/x-pka;application/x-pkz;";
|
||||
};
|
||||
|
||||
fhs = buildFHSUserEnvBubblewrap {
|
||||
name = "packettracer7";
|
||||
runScript = "${ptFiles}/bin/packettracer7";
|
||||
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
alsa-lib
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
glib
|
||||
libglvnd
|
||||
libpulseaudio
|
||||
libudev0-shim
|
||||
libxkbcommon
|
||||
libxml2
|
||||
libxslt
|
||||
nspr
|
||||
nss
|
||||
xorg.libICE
|
||||
xorg.libSM
|
||||
xorg.libX11
|
||||
xorg.libXScrnSaver
|
||||
];
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
pname = "ciscoPacketTracer7";
|
||||
inherit version;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
${lndir}/bin/lndir -silent ${fhs} $out
|
||||
'';
|
||||
|
||||
desktopItems = [ desktopItem ];
|
||||
|
||||
nativeBuildInputs = [ copyDesktopItems ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Network simulation tool from Cisco";
|
||||
homepage = "https://www.netacad.com/courses/packet-tracer";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ lucasew ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
131
pkgs/applications/networking/cisco-packet-tracer/8.nix
Normal file
131
pkgs/applications/networking/cisco-packet-tracer/8.nix
Normal file
|
@ -0,0 +1,131 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, alsa-lib
|
||||
, autoPatchelfHook
|
||||
, buildFHSUserEnvBubblewrap
|
||||
, callPackage
|
||||
, copyDesktopItems
|
||||
, dbus
|
||||
, dpkg
|
||||
, expat
|
||||
, fontconfig
|
||||
, glib
|
||||
, libdrm
|
||||
, libglvnd
|
||||
, libpulseaudio
|
||||
, libudev0-shim
|
||||
, libxkbcommon
|
||||
, libxml2
|
||||
, libxslt
|
||||
, lndir
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, nspr
|
||||
, nss
|
||||
, requireFile
|
||||
, xorg
|
||||
}:
|
||||
|
||||
let
|
||||
version = "8.0.1";
|
||||
|
||||
ptFiles = stdenv.mkDerivation {
|
||||
name = "PacketTracer8Drv";
|
||||
inherit version;
|
||||
|
||||
dontUnpack = true;
|
||||
src = requireFile {
|
||||
name = "CiscoPacketTracer_${builtins.replaceStrings ["."] [""] version}_Ubuntu_64bit.deb";
|
||||
sha256 = "77a25351b016faed7c78959819c16c7013caa89c6b1872cb888cd96edd259140";
|
||||
url = "https://www.netacad.com";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
alsa-lib
|
||||
autoPatchelfHook
|
||||
dbus
|
||||
dpkg
|
||||
expat
|
||||
fontconfig
|
||||
glib
|
||||
libdrm
|
||||
libglvnd
|
||||
libpulseaudio
|
||||
libudev0-shim
|
||||
libxkbcommon
|
||||
libxml2
|
||||
libxslt
|
||||
makeWrapper
|
||||
nspr
|
||||
nss
|
||||
] ++ (with xorg; [
|
||||
libICE
|
||||
libSM
|
||||
libX11
|
||||
libxcb
|
||||
libXcomposite
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXi
|
||||
libXrandr
|
||||
libXrender
|
||||
libXScrnSaver
|
||||
xcbutilimage
|
||||
xcbutilkeysyms
|
||||
xcbutilrenderutil
|
||||
xcbutilwm
|
||||
]);
|
||||
|
||||
installPhase = ''
|
||||
dpkg-deb -x $src $out
|
||||
chmod 755 "$out"
|
||||
makeWrapper "$out/opt/pt/bin/PacketTracer" "$out/bin/packettracer" \
|
||||
--prefix LD_LIBRARY_PATH : "$out/opt/pt/bin"
|
||||
|
||||
# Keep source archive cached, to avoid re-downloading
|
||||
ln -s $src $out/usr/share/
|
||||
'';
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "cisco-pt8.desktop";
|
||||
desktopName = "Cisco Packet Tracer 8";
|
||||
icon = "${ptFiles}/opt/pt/art/app.png";
|
||||
exec = "packettracer8 %f";
|
||||
mimeType = "application/x-pkt;application/x-pka;application/x-pkz;";
|
||||
};
|
||||
|
||||
fhs = buildFHSUserEnvBubblewrap {
|
||||
name = "packettracer8";
|
||||
runScript = "${ptFiles}/bin/packettracer";
|
||||
targetPkgs = pkgs: [ libudev0-shim ];
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p "$out/share/applications"
|
||||
cp "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||
'';
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
pname = "ciscoPacketTracer8";
|
||||
inherit version;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
${lndir}/bin/lndir -silent ${fhs} $out
|
||||
'';
|
||||
|
||||
desktopItems = [ desktopItem ];
|
||||
nativeBuildInputs = [ copyDesktopItems ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Network simulation tool from Cisco";
|
||||
homepage = "https://www.netacad.com/courses/packet-tracer";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ lucasew ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
|
@ -24078,6 +24078,10 @@ with pkgs;
|
|||
|
||||
clapper = callPackage ../applications/video/clapper { };
|
||||
|
||||
ciscoPacketTracer7 = callPackage ../applications/networking/cisco-packet-tracer/7.nix { };
|
||||
|
||||
ciscoPacketTracer8 = callPackage ../applications/networking/cisco-packet-tracer/8.nix { };
|
||||
|
||||
claws-mail-gtk2 = callPackage ../applications/networking/mailreaders/claws-mail {
|
||||
inherit (xorg) libSM;
|
||||
useGtk3 = false;
|
||||
|
|
Loading…
Reference in a new issue