nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 21.11 142 lines 3.9 kB view raw
1{ stdenv, nix, perlPackages, buildEnv 2, makeWrapper, autoconf, automake, libtool, unzip, pkg-config, sqlite, libpqxx_6 3, top-git, mercurial, darcs, subversion, breezy, openssl, bzip2, libxslt 4, perl, postgresql, nukeReferences, git, boehmgc, nlohmann_json 5, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, xz, gnutar 6, rpm, dpkg, cdrkit, pixz, lib, boost, autoreconfHook, src ? null, version ? null 7, migration ? false, patches ? [] 8, tests ? {}, mdbook 9}: 10 11with stdenv; 12 13if lib.versions.major nix.version == "1" 14 then throw "This Hydra version doesn't support Nix 1.x" 15else 16 17let 18 perlDeps = buildEnv { 19 name = "hydra-perl-deps"; 20 paths = with perlPackages; lib.closePropagation 21 [ ModulePluggable 22 CatalystActionREST 23 CatalystAuthenticationStoreDBIxClass 24 CatalystDevel 25 CatalystDispatchTypeRegex 26 CatalystPluginAccessLog 27 CatalystPluginAuthorizationRoles 28 CatalystPluginCaptcha 29 CatalystPluginPrometheusTiny 30 CatalystPluginSessionStateCookie 31 CatalystPluginSessionStoreFastMmap 32 CatalystPluginSmartURI 33 CatalystPluginStackTrace 34 CatalystRuntime 35 CatalystTraitForRequestProxyBase 36 CatalystViewDownload 37 CatalystViewJSON 38 CatalystViewTT 39 CatalystXScriptServerStarman 40 CatalystXRoleApplicator 41 CryptPassphrase 42 CryptPassphraseArgon2 43 CryptRandPasswd 44 DBDPg 45 DBDSQLite 46 DataDump 47 DateTime 48 DigestSHA1 49 EmailMIME 50 EmailSender 51 FileSlurp 52 IOCompress 53 IPCRun 54 JSON 55 JSONAny 56 JSONXS 57 LWP 58 LWPProtocolHttps 59 NetAmazonS3 60 NetPrometheus 61 NetStatsd 62 PadWalker 63 PrometheusTinyShared 64 Readonly 65 SQLSplitStatement 66 SetScalar 67 Starman 68 StringCompareConstantTime 69 SysHostnameLong 70 TermSizeAny 71 TextDiff 72 TextTable 73 XMLSimple 74 YAML 75 nix 76 nix.perl-bindings 77 git 78 boehmgc 79 ]; 80 }; 81in stdenv.mkDerivation rec { 82 pname = "hydra"; 83 84 inherit stdenv src version patches; 85 86 buildInputs = 87 [ makeWrapper autoconf automake libtool unzip nukeReferences sqlite libpqxx_6 88 top-git mercurial /*darcs*/ subversion breezy openssl bzip2 libxslt 89 perlDeps perl nix 90 postgresql # for running the tests 91 nlohmann_json 92 boost 93 ]; 94 95 hydraPath = lib.makeBinPath ( 96 [ sqlite subversion openssh nix coreutils findutils pixz 97 gzip bzip2 xz gnutar unzip git top-git mercurial /*darcs*/ gnused breezy 98 ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] ); 99 100 nativeBuildInputs = [ autoreconfHook pkg-config mdbook ]; 101 102 configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; 103 104 NIX_CFLAGS_COMPILE = "-pthread"; 105 106 shellHook = '' 107 PATH=$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$(pwd)/src/hydra-evaluator:$PATH 108 PERL5LIB=$(pwd)/src/lib:$PERL5LIB; 109 ''; 110 111 enableParallelBuilding = true; 112 113 preCheck = '' 114 patchShebangs . 115 export LOGNAME=''${LOGNAME:-foo} 116 ''; 117 118 postInstall = '' 119 mkdir -p $out/nix-support 120 for i in $out/bin/*; do 121 read -n 4 chars < $i 122 if [[ $chars =~ ELF ]]; then continue; fi 123 wrapProgram $i \ 124 --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ 125 --prefix PATH ':' $out/bin:$hydraPath \ 126 --set HYDRA_RELEASE ${version} \ 127 --set HYDRA_HOME $out/libexec/hydra \ 128 --set NIX_RELEASE ${nix.name or "unknown"} 129 done 130 ''; # */ 131 132 dontStrip = true; 133 134 passthru = { inherit perlDeps migration tests; }; 135 136 meta = with lib; { 137 description = "Nix-based continuous build system"; 138 license = licenses.gpl3; 139 platforms = platforms.linux; 140 maintainers = with maintainers; [ ma27 ]; 141 }; 142}