forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / build-support / fetchipfs / default.nix
blobda94200206ba373f1c827db6c6cec772238726ce
1 { lib
2 , stdenv
3 , curl
4 }:
5 lib.fetchers.withNormalizedHash { hashTypes = [ "sha1" "sha256" "sha512" ]; } (
6   { ipfs
7   , url            ? ""
8   , curlOpts       ? ""
9   , outputHash
10   , outputHashAlgo
11   , meta           ? {}
12   , port           ? "8080"
13   , postFetch      ? ""
14   , preferLocalBuild ? true
15   }:
16   stdenv.mkDerivation {
17     name = ipfs;
18     builder = ./builder.sh;
19     nativeBuildInputs = [ curl ];
21     # New-style output content requirements.
22     inherit outputHash outputHashAlgo;
23     outputHashMode = "recursive";
25     inherit curlOpts
26             postFetch
27             ipfs
28             url
29             port
30             meta;
32     # Doing the download on a remote machine just duplicates network
33     # traffic, so don't do that.
34     inherit preferLocalBuild;
35   }