summary refs log tree commit diff
path: root/pkgs/build-support/fetchfossil/default.nix
blob: 27933b47178a6077b130c5fbd10eb5d1be5c5cad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{stdenv, fossil}:

{name ? null, url, rev, sha256}:

stdenv.mkDerivation {
  name = "fossil-archive" + (if name != null then "-${name}" else "");
  builder = ./builder.sh;
  nativeBuildInputs = [fossil];

  # Envvar docs are hard to find. A link for the future:
  # https://www.fossil-scm.org/index.html/doc/trunk/www/env-opts.md
  impureEnvVars = [ "http_proxy" ];

  outputHashAlgo = "sha256";
  outputHashMode = "recursive";
  outputHash = sha256;

  inherit url rev;
  preferLocalBuild = true;
}