summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2020-03-26 00:35:40 -0400
committerGitHub <noreply@github.com>2020-03-26 00:35:40 -0400
commit259f3b3b68f730088dde3e6f7ba327afcd9eb5d5 (patch)
treecb71aaa784a0bdb2cd335823d1f4cd75db3c9ea4 /pkgs/build-support/fetchgit
parenta0c0ae3af02b21ce07bafa2cc028d5bdcafc8c6c (diff)
downloadnixpkgs-259f3b3b68f730088dde3e6f7ba327afcd9eb5d5.tar
nixpkgs-259f3b3b68f730088dde3e6f7ba327afcd9eb5d5.tar.gz
nixpkgs-259f3b3b68f730088dde3e6f7ba327afcd9eb5d5.tar.bz2
nixpkgs-259f3b3b68f730088dde3e6f7ba327afcd9eb5d5.tar.lz
nixpkgs-259f3b3b68f730088dde3e6f7ba327afcd9eb5d5.tar.xz
nixpkgs-259f3b3b68f730088dde3e6f7ba327afcd9eb5d5.tar.zst
nixpkgs-259f3b3b68f730088dde3e6f7ba327afcd9eb5d5.zip
Revert "fetchzip, fetchgit: cleanup handling of optional features and whitespace"
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rw-r--r--pkgs/build-support/fetchgit/default.nix2
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git25
2 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix
index ee662154cc7..0405951a9e4 100644
--- a/pkgs/build-support/fetchgit/default.nix
+++ b/pkgs/build-support/fetchgit/default.nix
@@ -1,4 +1,4 @@
-{ stdenvNoCC, git, cacert }: let
+{stdenvNoCC, git, cacert}: let
   urlToName = url: rev: let
     inherit (stdenvNoCC.lib) removeSuffix splitString last;
     base = last (splitString ":" (baseNameOf (removeSuffix "/" url)));
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 4761c978035..abba76bd1ac 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -1,5 +1,6 @@
-#!/usr/bin/env bash
-set -eo pipefail
+#! /usr/bin/env bash
+
+set -e -o pipefail
 
 url=
 rev=
@@ -37,17 +38,17 @@ usage(){
     echo  >&2 "syntax: nix-prefetch-git [options] [URL [REVISION [EXPECTED-HASH]]]
 
 Options:
-      --out path         Path where the output would be stored.
-      --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.
+      --out path      Path where the output would be stored.
+      --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.
       --fetch-submodules Fetch submodules.
-      --builder          Clone as fetchgit does, but url, rev, and out option are mandatory.
-      --quiet            Only print the final json summary.
+      --builder       Clone as fetchgit does, but url, rev, and out option are mandatory.
+      --quiet         Only print the final json summary.
 "
     exit 1
 }