summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2017-08-25 14:59:49 +0200
committerLluís Batlle i Rossell <viric@viric.name>2017-08-25 14:59:49 +0200
commit55821dc576b535c2aa33ba535f6ad31c8f5df3ef (patch)
tree25318c95256600238930a00bd9b7d6184e2256d9
parent30c15c9149a6ea37533cd4b7cc8f231bd1f21780 (diff)
downloadnixpkgs-55821dc576b535c2aa33ba535f6ad31c8f5df3ef.tar
nixpkgs-55821dc576b535c2aa33ba535f6ad31c8f5df3ef.tar.gz
nixpkgs-55821dc576b535c2aa33ba535f6ad31c8f5df3ef.tar.bz2
nixpkgs-55821dc576b535c2aa33ba535f6ad31c8f5df3ef.tar.lz
nixpkgs-55821dc576b535c2aa33ba535f6ad31c8f5df3ef.tar.xz
nixpkgs-55821dc576b535c2aa33ba535f6ad31c8f5df3ef.tar.zst
nixpkgs-55821dc576b535c2aa33ba535f6ad31c8f5df3ef.zip
git-lfs: adding old 1.5.6 (supports old server protocols)
Some git-lfs servers may not be ready for 2.x clients.
-rw-r--r--pkgs/applications/version-management/git-lfs/1.nix35
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 38 insertions, 1 deletions
diff --git a/pkgs/applications/version-management/git-lfs/1.nix b/pkgs/applications/version-management/git-lfs/1.nix
new file mode 100644
index 00000000000..24c22d423d5
--- /dev/null
+++ b/pkgs/applications/version-management/git-lfs/1.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "git-lfs-${version}";
+  version = "1.5.6";
+  rev = "0d02fb7d9a1c599bbf8c55e146e2845a908e04e0";
+  
+  goPackagePath = "github.com/git-lfs/git-lfs";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "git-lfs";
+    repo = "git-lfs";
+    sha256 = "0wddry1lqjccf4522fvhx6grx8h57xsz17lkaf5aybnrgw677w3d";
+  };
+
+  # Tests fail with 'lfstest-gitserver.go:46: main redeclared in this block'
+  excludedPackages = [ "test" ];
+
+  preBuild = ''
+    pushd go/src/github.com/git-lfs/git-lfs
+      go generate ./commands
+    popd
+  '';
+
+  postInstall = ''
+    rm -v $bin/bin/{man,script}
+  '';
+  meta = with stdenv.lib; {
+    description = "Git extension for versioning large files";
+    homepage    = https://git-lfs.github.com/;
+    license     = [ licenses.mit ];
+    maintainers = [ maintainers.twey ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3a3591a83bb..d5c8f3d2af0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2134,7 +2134,9 @@ with pkgs;
 
   git-crecord = callPackage ../applications/version-management/git-crecord { };
 
-  git-lfs = callPackage ../applications/version-management/git-lfs { };
+  git-lfs = lowPrio (callPackage ../applications/version-management/git-lfs { });
+
+  git-lfs1 = callPackage ../applications/version-management/git-lfs/1.nix { };
 
   git-ftp = callPackage ../development/tools/git-ftp { };