fetchsvn
pkgs.fetchsvn
Functor
Docs pulled from | This Revision | 3 days ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
{
url,
rev ? "HEAD",
name ? repoToName url rev,
sha256 ? "",
hash ? "",
ignoreExternals ? false,
ignoreKeywords ? false,
preferLocalBuild ? true,
}:
assert sshSupport -> openssh != null;
if hash != "" && sha256 != "" then
throw "Only one of sha256 or hash can be set"
else
stdenvNoCC.mkDerivation {
inherit name;
builder = ./builder.sh;
nativeBuildInputs = [
cacert
subversion
glibcLocales
]
++ lib.optional sshSupport openssh;
SVN_SSH = if sshSupport then "${buildPackages.openssh}/bin/ssh" else null;
outputHashAlgo = if hash != "" then null else "sha256";
outputHashMode = "recursive";
outputHash =
if hash != "" then
hash
else if sha256 != "" then
sha256
else
lib.fakeSha256;
inherit
url
rev
ignoreExternals
ignoreKeywords
;
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
inherit preferLocalBuild;
}