Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] - perl packages for devShell.networkSub to run switch_config_loader #804

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
6 changes: 6 additions & 0 deletions nix/dev-shells/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ inputs.nixpkgs.lib.genAttrs

networkSub = with pkgs; [
perl
perlPackages.libnet
perlPackages.Expect
perlPackages.TermReadKey
perlPackages.NetSFTPForeign
scale-network.perlNetArp
scale-network.perlNetInterface
ghostscript
];
in
Expand Down
2 changes: 2 additions & 0 deletions nix/packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ inputs.nixpkgs.lib.genAttrs
massflash
scaleInventory
serverspec
perlNetArp
perlNetInterface
;
})
13 changes: 13 additions & 0 deletions nix/packages/perl-net-arp/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
perlPackages,
fetchurl,
}:

perlPackages.buildPerlPackage {
pname = "NetArp";
version = "1.0.12";
src = fetchurl {
url = "mirror://cpan/authors/id/C/CR/CRAZYDJ/Net-ARP-1.0.12.tar.gz";
hash = "sha256-KK2GBaOh4PhoqYmIJvVGHYCSPm66GtXgRzfmDoug7HA=";
};
}
29 changes: 29 additions & 0 deletions nix/packages/perl-net-interface/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
perlPackages,
fetchurl,
linuxHeaders,
which
}:

perlPackages.buildPerlPackage {
pname = "NetInterface";
version = "1.016";
buildInputs = [ linuxHeaders which ];
doCheck = false;

CPPFLAGS="-Iusr/include";

postPatch = ''
mkdir -p usr/include/sys/
cp -pr ${linuxHeaders}/include usr/
ln -s ${linuxHeaders}/include/linux/socket.h usr/include/sys/socket.h
ls -lahR usr/
echo "aaaaaaaa"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are seen
You are heard
Your feelings are valid.

echo $CPPFLAGS
'';

src = fetchurl {
url = "mirror://cpan/authors/id/M/MI/MIKER/Net-Interface-1.016.tar.gz";
hash = "sha256-e+RGk14BPQ7dPTcfkvuQo7s4q+mVYoidgXiVMSnlNQg=";
};
}
Loading