biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / version-management / fossil / default.nix
blob15d6bc84caa59bc032f546a85bd3236d052620f1
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
18 stdenv.mkDerivation (finalAttrs: {
19   pname = "fossil";
20   version = "2.23";
22   src = fetchurl {
23     url = "https://www.fossil-scm.org/home/tarball/version-${finalAttrs.version}/fossil-${finalAttrs.version}.tar.gz";
24     hash = "sha256-dfgI6BNRAYqXFnRtnvGh/huxkEcz6LQYZDiB04GYhZM=";
25   };
27   # required for build time tool `./tools/translate.c`
28   depsBuildBuild = [ buildPackages.stdenv.cc ];
30   nativeBuildInputs = [ installShellFiles tcl tcllib ];
32   buildInputs = [ zlib openssl readline which ed ]
33     ++ lib.optional stdenv.isDarwin libiconv
34     ++ lib.optional (!withInternalSqlite) sqlite;
36   enableParallelBuilding = true;
38   doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
40   configureFlags =
41     lib.optional (!withInternalSqlite) "--disable-internal-sqlite"
42     ++ lib.optional withJson "--json";
44   preBuild = ''
45     export USER=nonexistent-but-specified-user
46   '';
48   installPhase = ''
49     mkdir -p $out/bin
50     INSTALLDIR=$out/bin make install
52     installManPage fossil.1
53     installShellCompletion --name fossil.bash tools/fossil-autocomplete.bash
54   '';
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     mainProgram = "fossil";
70   };