tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
putty: build on windows
Matthew Bauer
7 years ago
b744586c
0fb3edec
+18
-5
1 changed file
expand all
collapse all
unified
split
pkgs
applications
networking
remote
putty
default.nix
+18
-5
pkgs/applications/networking/remote/putty/default.nix
···
1
1
{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool
2
2
-
, gtk2, halibut, ncurses, perl }:
2
2
+
, gtk2, halibut, ncurses, perl
3
3
+
, hostPlatform, lib }:
3
4
4
5
stdenv.mkDerivation rec {
5
6
version = "0.70";
···
13
14
sha256 = "1gmhwwj1y7b5hgkrkxpf4jddjpk9l5832zq5ibhsiicndsfs92mv";
14
15
};
15
16
16
16
-
preConfigure = ''
17
17
+
preConfigure = lib.optionalString hostPlatform.isUnix ''
17
18
perl mkfiles.pl
18
19
( cd doc ; make );
19
20
sed -e '/AM_PATH_GTK(/d' \
···
21
22
-e '/AC_OUTPUT/iAM_PROG_AR' -i configure.ac
22
23
./mkauto.sh
23
24
cd unix
25
25
+
'' + lib.optionalString hostPlatform.isWindows ''
26
26
+
cd windows
24
27
'';
25
28
29
29
+
TOOLPATH = stdenv.cc.targetPrefix;
30
30
+
makefile = if hostPlatform.isWindows then "Makefile.mgw" else null;
31
31
+
32
32
+
installPhase = if hostPlatform.isWindows then ''
33
33
+
for exe in *.exe; do
34
34
+
install -D $exe $out/bin/$exe
35
35
+
done
36
36
+
'' else null;
37
37
+
26
38
nativeBuildInputs = [ autoconf automake halibut libtool perl pkgconfig ];
27
27
-
buildInputs = [ gtk2 ncurses ];
39
39
+
buildInputs = []
40
40
+
++ lib.optionals hostPlatform.isUnix [ gtk2 ncurses ];
28
41
enableParallelBuilding = true;
29
42
30
30
-
meta = with stdenv.lib; {
43
43
+
meta = with lib; {
31
44
description = "A Free Telnet/SSH Client";
32
45
longDescription = ''
33
46
PuTTY is a free implementation of Telnet and SSH for Windows and Unix
···
36
49
'';
37
50
homepage = https://www.chiark.greenend.org.uk/~sgtatham/putty/;
38
51
license = licenses.mit;
39
39
-
platforms = platforms.linux;
52
52
+
platforms = platforms.unix ++ platforms.windows;
40
53
};
41
54
}