nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 60 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 installShellFiles, 6 boost, 7 zlib, 8 openssl, 9 upnpSupport ? true, 10 miniupnpc, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "i2pd"; 15 version = "2.57.0"; 16 17 src = fetchFromGitHub { 18 owner = "PurpleI2P"; 19 repo = "i2pd"; 20 tag = version; 21 hash = "sha256-+LywTG+AXOas6fXF1pXjBkqa+fUbaWNMA3EqCEZfc/A="; 22 }; 23 24 postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) '' 25 substituteInPlace Makefile.osx \ 26 --replace-fail "-msse" "" 27 ''; 28 29 buildInputs = [ 30 boost 31 zlib 32 openssl 33 ] 34 ++ lib.optional upnpSupport miniupnpc; 35 36 nativeBuildInputs = [ 37 installShellFiles 38 ]; 39 40 makeFlags = [ 41 "USE_UPNP=${if upnpSupport then "yes" else "no"}" 42 ]; 43 44 enableParallelBuilding = true; 45 46 installPhase = '' 47 install -D i2pd $out/bin/i2pd 48 install --mode=444 -D 'contrib/i2pd.service' "$out/etc/systemd/system/i2pd.service" 49 installManPage 'debian/i2pd.1' 50 ''; 51 52 meta = with lib; { 53 homepage = "https://i2pd.website"; 54 description = "Minimal I2P router written in C++"; 55 license = licenses.bsd3; 56 maintainers = with maintainers; [ edwtjo ]; 57 platforms = platforms.unix; 58 mainProgram = "i2pd"; 59 }; 60}