-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
60 lines (57 loc) · 1.52 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
description = "MAC-Telnet for Posix systems";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
flake-utils,
nixpkgs,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
drv = self.packages.${system}.mactelnet;
in {
packages = with pkgs; rec {
mactelnet = stdenv.mkDerivation {
name = "mactelnet";
src = fetchFromGitHub {
owner = "haakonnessjoen";
repo = "MAC-Telnet";
rev = "c3dc4515b1aff09372cdb04aef393437dc2d8f60";
sha256 = "sha256-EKs0x5YsmmVD/2Qrqzi3/OXHQc5VSPs+aJa7cLHtAD8=";
};
nativeBuildInputs = [
autoconf
automake
autoreconfHook
gettext
libtool
openssl
pkg-config
];
installPhase = ''
cd src
mkdir -p $out/bin;
install -t $out/bin mactelnet macping mndp;
mkdir -p $out/sbin;
install -t $out/sbin mactelnetd;
'';
};
default = mactelnet;
};
apps = rec {
macping = flake-utils.lib.mkApp {
inherit drv;
name = "macping";
};
mactelnet = flake-utils.lib.mkApp {inherit drv;};
mndp = flake-utils.lib.mkApp {
inherit drv;
name = "mndp";
};
default = mactelnet;
};
});
}