nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 curl,
5}:
6lib.fetchers.withNormalizedHash
7 {
8 hashTypes = [
9 "sha1"
10 "sha256"
11 "sha512"
12 ];
13 }
14 (
15 {
16 ipfs,
17 url ? "",
18 curlOpts ? "",
19 outputHash,
20 outputHashAlgo,
21 meta ? { },
22 port ? "8080",
23 postFetch ? "",
24 preferLocalBuild ? true,
25 }:
26 stdenv.mkDerivation {
27 name = ipfs;
28 builder = ./builder.sh;
29 nativeBuildInputs = [ curl ];
30
31 # New-style output content requirements.
32 inherit outputHash outputHashAlgo;
33 outputHashMode = "recursive";
34
35 inherit
36 curlOpts
37 postFetch
38 ipfs
39 url
40 port
41 meta
42 ;
43
44 # Doing the download on a remote machine just duplicates network
45 # traffic, so don't do that.
46 inherit preferLocalBuild;
47 }
48 )