mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
61462c94e6
Apparently everyone just copied those variables, instead of creating a library constant for them. Some even removed the comment. -.-
37 lines
778 B
Nix
37 lines
778 B
Nix
{ stdenv, curl, adc_user, adc_pass }:
|
|
|
|
{ # Path to fetch.
|
|
path
|
|
|
|
# Hash of the downloaded file
|
|
, sha256
|
|
|
|
, # Additional curl options needed for the download to succeed.
|
|
curlOpts ? ""
|
|
|
|
, # Name of the file. If empty, use the basename of `path'.
|
|
name ? ""
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
url = "https://developer.apple.com/downloads/download.action?path=${path}";
|
|
|
|
name = if name != "" then name else baseNameOf path;
|
|
builder = ./builder.sh;
|
|
|
|
buildInputs = [ curl ];
|
|
|
|
meta = {
|
|
# Password-guarded files from ADC are certainly unfree, as far as we're concerned!
|
|
license = stdenv.lib.licenses.unfree;
|
|
};
|
|
|
|
outputHashAlgo = "sha256";
|
|
outputHash = sha256;
|
|
outputHashMode = "flat";
|
|
|
|
inherit curlOpts adc_user adc_pass;
|
|
|
|
preferLocalBuild = true;
|
|
}
|