diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:37:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:41:30 +0000 |
commit | 6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch) | |
tree | 035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/build-support/fetchgit | |
parent | da7500bc026e937ac7fce7b50f67a0e1765737a7 (diff) | |
parent | e4134747f5666bcab8680aff67fa3b63384f9a0f (diff) | |
download | nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2 nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip |
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/build-support/fetchgit')
-rwxr-xr-x | nixpkgs/pkgs/build-support/fetchgit/nix-prefetch-git | 1 | ||||
-rw-r--r-- | nixpkgs/pkgs/build-support/fetchgit/private.nix | 26 |
2 files changed, 1 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/build-support/fetchgit/nix-prefetch-git b/nixpkgs/pkgs/build-support/fetchgit/nix-prefetch-git index 931be1a37007..8020ba46f3f1 100755 --- a/nixpkgs/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/nixpkgs/pkgs/build-support/fetchgit/nix-prefetch-git @@ -42,6 +42,7 @@ Options: --url url Any url understood by 'git clone'. --rev ref Any sha1 or references (such as refs/heads/master) --hash h Expected hash. + --branch-name Branch name to check out into --deepClone Clone the entire repository. --no-deepClone Make a shallow clone of just the required ref. --leave-dotGit Keep the .git directories. diff --git a/nixpkgs/pkgs/build-support/fetchgit/private.nix b/nixpkgs/pkgs/build-support/fetchgit/private.nix deleted file mode 100644 index 6731cf87fbd1..000000000000 --- a/nixpkgs/pkgs/build-support/fetchgit/private.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ fetchgit, runCommand, makeWrapper, openssh }: args: derivation ((fetchgit args).drvAttrs // { - SSH_AUTH_SOCK = if (builtins.tryEval <ssh-auth-sock>).success - then builtins.toString <ssh-auth-sock> - else null; - - GIT_SSH = let - config = let - sshConfigFile = if (builtins.tryEval <ssh-config-file>).success - then <ssh-config-file> - else builtins.trace '' - Please set your nix-path such that ssh-config-file points to a file that will allow ssh to access private repositories. The builder will not be able to see any running ssh agent sessions unless ssh-auth-sock is also set in the nix-path. - - Note that the config file and any keys it points to must be readable by the build user, which depending on your nix configuration means making it readable by the build-users-group, the user of the running nix-daemon, or the user calling the nix command which started the build. Similarly, if using an ssh agent ssh-auth-sock must point to a socket the build user can access. - - You may need StrictHostKeyChecking=no in the config file. Since ssh will refuse to use a group-readable private key, if using build-users you will likely want to use something like IdentityFile /some/directory/%u/key and have a directory for each build user accessible to that user. - '' "/var/lib/empty/config"; - in builtins.toString sshConfigFile; - - ssh-wrapped = runCommand "fetchgit-ssh" { - nativeBuildInputs = [ makeWrapper ]; - } '' - mkdir -p $out/bin - makeWrapper ${openssh}/bin/ssh $out/bin/ssh --prefix PATH : "$out/bin" --add-flags "-F ${config}" "$@" - ''; - in "${ssh-wrapped}/bin/ssh"; -}) |