Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 71 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 openssl, 6 libX11, 7 krb5, 8 libXcursor, 9 libtasn1, 10 nettle, 11 gnutls, 12 pkg-config, 13 autoreconfHook, 14 libiconv, 15 fetchpatch, 16 enableCredssp ? (!stdenv.hostPlatform.isDarwin), 17}: 18 19stdenv.mkDerivation (finalAttrs: { 20 pname = "rdesktop"; 21 version = "1.9.0"; 22 23 src = fetchFromGitHub { 24 owner = "rdesktop"; 25 repo = "rdesktop"; 26 tag = "v${finalAttrs.version}"; 27 hash = "sha256-6Kx3giHMDc+5XfPCtjJ3NysCmTnb0TGrR8Mj0bgM0+g="; 28 }; 29 30 nativeBuildInputs = [ 31 pkg-config 32 autoreconfHook 33 ]; 34 buildInputs = [ 35 openssl 36 libX11 37 libXcursor 38 libtasn1 39 nettle 40 gnutls 41 ] 42 ++ lib.optional enableCredssp krb5 43 ++ lib.optional stdenv.hostPlatform.isDarwin libiconv; 44 45 configureFlags = [ 46 "--with-ipv6" 47 "--with-openssl=${openssl.dev}" 48 "--disable-smartcard" 49 ] 50 ++ lib.optional (!enableCredssp) "--disable-credssp"; 51 52 patches = [ 53 ./rdesktop-configure-c99.patch 54 (fetchpatch { 55 url = "https://github.com/rdesktop/rdesktop/commit/105c8cb69facf26238cd48f14ca9dbc0ff6be6bd.patch"; 56 hash = "sha256-3/y7JaKDyULhlzwP3bsA8kOq7g4AvWUi50gxkCZ8sbU="; 57 }) 58 (fetchpatch { 59 url = "https://github.com/rdesktop/rdesktop/commit/53ba87dc174175e98332e22355ad8662c02880d6.patch"; 60 hash = "sha256-ORGHdabSu9kVkNovweqFVS53dx6NbiryPlgi6Qp83BA="; 61 }) 62 ]; 63 64 meta = { 65 description = "Open source client for Windows Terminal Services"; 66 mainProgram = "rdesktop"; 67 homepage = "http://www.rdesktop.org/"; 68 platforms = lib.platforms.linux ++ lib.platforms.darwin; 69 license = lib.licenses.gpl2; 70 }; 71})