Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, installShellFiles 3, tcl 4, libiconv 5, fetchurl 6, buildPackages 7, zlib 8, openssl 9, readline 10, withInternalSqlite ? true 11, sqlite 12, ed 13, which 14, tcllib 15, withJson ? true 16}: 17 18stdenv.mkDerivation (finalAttrs: { 19 pname = "fossil"; 20 version = "2.22"; 21 22 src = fetchurl { 23 url = "https://www.fossil-scm.org/home/tarball/version-${finalAttrs.version}/fossil-${finalAttrs.version}.tar.gz"; 24 hash = "sha256-gdgj/29dF1s4TfqE7roNBS2nOjfNZs1yt4bnFnEhDWs="; 25 }; 26 27 # required for build time tool `./tools/translate.c` 28 depsBuildBuild = [ buildPackages.stdenv.cc ]; 29 30 nativeBuildInputs = [ installShellFiles tcl tcllib ]; 31 32 buildInputs = [ zlib openssl readline which ed ] 33 ++ lib.optional stdenv.isDarwin libiconv 34 ++ lib.optional (!withInternalSqlite) sqlite; 35 36 enableParallelBuilding = true; 37 38 doCheck = stdenv.hostPlatform == stdenv.buildPlatform; 39 40 configureFlags = 41 lib.optional (!withInternalSqlite) "--disable-internal-sqlite" 42 ++ lib.optional withJson "--json"; 43 44 preBuild = '' 45 export USER=nonexistent-but-specified-user 46 ''; 47 48 installPhase = '' 49 mkdir -p $out/bin 50 INSTALLDIR=$out/bin make install 51 52 installManPage fossil.1 53 installShellCompletion --name fossil.bash tools/fossil-autocomplete.bash 54 ''; 55 56 meta = with lib; { 57 description = "Simple, high-reliability, distributed software configuration management"; 58 longDescription = '' 59 Fossil is a software configuration management system. Fossil is 60 software that is designed to control and track the development of a 61 software project and to record the history of the project. There are 62 many such systems in use today. Fossil strives to distinguish itself 63 from the others by being extremely simple to setup and operate. 64 ''; 65 homepage = "https://www.fossil-scm.org/"; 66 license = licenses.bsd2; 67 maintainers = with maintainers; [ maggesi viric ]; 68 platforms = platforms.all; 69 }; 70})