summaryrefslogtreecommitdiffstats
path: root/pkgs/rust/tincr/default.nix
blob: 6a532c1c0d336a69c68edc6dab58c645810aae64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ fetchFromGitHub, installShellFiles, runCommand }:

let
  pin = (builtins.fromJSON (builtins.readFile ../../../sources.json)).tincr;
in

{
  name = "tincr";
  src = fetchFromGitHub {
    owner = "Mic92";
    repo = "tincr";
    inherit (pin) rev hash;
  };
  # Without tinc-ffi and fuzz, which are for tests.
  members = [ "tincd" "tinc-tools" ];
  # From the source as built, which can be a checkout instead.
  extraPaths = { src }: [
    (runCommand "tincr-man" {
      nativeBuildInputs = [ installShellFiles ];
    } /* sh */ ''
      installManPage ${src}/man/*.[0-9]
    '')
  ];
  # tinc-crypto asks for a vendored OpenSSL on Android only, but the plan
  # enables the feature everywhere.
  crateOverrides.openssl-sys = args: {
    features = builtins.filter (feature: feature != "vendored") args.features;
  };
}