Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 58 lines 1.4 kB view raw
1{ 2 stdenv, 3 lib, 4 gitaly, 5 fetchFromGitLab, 6 curl, 7 pcre2, 8 zlib, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "gitaly-git"; 13 version = "2.49.0.gl2"; 14 15 # `src` attribute for nix-update 16 src = fetchFromGitLab { 17 owner = "gitlab-org"; 18 repo = "git"; 19 rev = "v${version}"; 20 hash = "sha256-1y94T5UBG7s76ENsUmaXRXngSKmqIAT0nq1u+QjSWaY="; 21 }; 22 23 # we actually use the gitaly build system 24 unpackPhase = '' 25 cp -r ${gitaly.src} source 26 chmod -R +w source 27 28 mkdir -p source/_build/deps 29 30 cp -r ${src} source/_build/deps/git-distribution 31 chmod -R +w source/_build/deps/git-distribution 32 33 # FIXME? maybe just patch the makefile? 34 echo -n 'v${version} DEVELOPER=1 DEVOPTS=no-error USE_LIBPCRE=YesPlease NO_PERL=YesPlease NO_EXPAT=YesPlease NO_TCLTK=YesPlease NO_GETTEXT=YesPlease NO_PYTHON=YesPlease' > source/_build/deps/git-distribution.version 35 echo -n 'v${version}' > source/_build/deps/git-distribution/version 36 ''; 37 sourceRoot = src.name; 38 39 buildFlags = [ "git" ]; 40 41 buildInputs = [ 42 curl 43 pcre2 44 zlib 45 ]; 46 47 # The build phase already installs it all 48 GIT_PREFIX = placeholder "out"; 49 dontInstall = true; 50 51 meta = { 52 homepage = "https://git-scm.com/"; 53 description = "Distributed version control system - with Gitaly patches"; 54 license = lib.licenses.gpl2Only; 55 platforms = lib.platforms.all; 56 teams = [ lib.teams.gitlab ]; 57 }; 58}