From ac7b85fdc2a2d89fa17c20e48a2df74c0e7e50bc Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Tue, 14 May 2024 23:30:43 +0200 Subject: [PATCH] packaged mac-telnet --- flake.nix | 1 + mods/mac-telnet.nix | 35 +++++++++++++++++++++++++++++++++++ nur.nix | 1 + 3 files changed, 37 insertions(+) create mode 100644 mods/mac-telnet.nix diff --git a/flake.nix b/flake.nix index ebc5a8e..a950469 100644 --- a/flake.nix +++ b/flake.nix @@ -422,6 +422,7 @@ #}); cbm = nixpkgs.legacyPackages.x86_64-linux.callPackage ./mods/cbm.nix { }; + mac-telnet = nixpkgs.legacyPackages.x86_64-linux.callPackage ./mods/mac-telnet.nix { }; run-vm = specialArgs.pkgs.writeScriptBin "run-vm" '' ${self.nixosConfigurations.hpm.config.system.build.vm}/bin/run-hpm-vm -m 4G -cpu host -smp 4 ''; diff --git a/mods/mac-telnet.nix b/mods/mac-telnet.nix new file mode 100644 index 0000000..3799a7a --- /dev/null +++ b/mods/mac-telnet.nix @@ -0,0 +1,35 @@ +{ stdenv +, fetchFromGitHub +, autoreconfHook +, lib +, openssl +}: + +stdenv.mkDerivation rec { + pname = "cbm"; + version = "0.3.2"; + + src = fetchFromGitHub { + owner = "haakonnessjoen"; + repo = "MAC-Telnet"; + rev = "master"; + sha256 = "sha256-8DgVlxvRHh5u0Tl9K0i1m7DUqg9h7uL94M7ZaBx3c5s="; + }; + + nativeBuildInputs = [ + autoreconfHook + openssl + ]; + + configureFlags = [ + "--without-config" + ]; + + meta = with lib; { + description = "Open source MAC Telnet client and server for connecting to Mikrotik RouterOS routers and Posix devices using MAC addresses"; + homepage = "http://lunatic.no/2010/10/routeros-mac-telnet-application-for-linux-users/"; + license = licenses.gpl2Only; + #maintainers = [ ]; + platforms = platforms.all; + }; +} diff --git a/nur.nix b/nur.nix index d0a821d..f3894dc 100644 --- a/nur.nix +++ b/nur.nix @@ -3,4 +3,5 @@ { pkgs ? import { } }: { cbm = pkgs.callPackage ./mods/cbm.nix {}; + mac-telnet = pkgs.callPackage ./mods/mac-telnet.nix {}; }