mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 12:23:02 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{ stdenv
|
|
, lib
|
|
, gitaly
|
|
, fetchFromGitLab
|
|
, curl
|
|
, pcre2
|
|
, zlib
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gitaly-git";
|
|
version = "2.45.2";
|
|
|
|
# `src` attribute for nix-update
|
|
src = fetchFromGitLab {
|
|
owner = "gitlab-org";
|
|
repo = "git";
|
|
rev = "v${version}";
|
|
hash = "sha256-R4K5b4d1DQw+pwoOCAK4EJtVPXQDPossTUmVv0LJtUs=";
|
|
};
|
|
|
|
# we actually use the gitaly build system
|
|
unpackPhase = ''
|
|
cp -r ${gitaly.src} source
|
|
chmod -R +w source
|
|
|
|
mkdir -p source/_build/deps
|
|
|
|
cp -r ${src} source/_build/deps/git-distribution
|
|
chmod -R +w source/_build/deps/git-distribution
|
|
|
|
# FIXME? maybe just patch the makefile?
|
|
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
|
|
echo -n 'v${version}' > source/_build/deps/git-distribution/version
|
|
'';
|
|
sourceRoot = "source";
|
|
|
|
buildFlags = [ "git" ];
|
|
|
|
buildInputs = [
|
|
curl
|
|
pcre2
|
|
zlib
|
|
];
|
|
|
|
# The build phase already installs it all
|
|
GIT_PREFIX = placeholder "out";
|
|
dontInstall = true;
|
|
|
|
meta = {
|
|
homepage = "https://git-scm.com/";
|
|
description = "Distributed version control system - with Gitaly patches";
|
|
license = lib.licenses.gpl2Only;
|
|
platforms = lib.platforms.all;
|
|
maintainers = lib.teams.gitlab.members;
|
|
};
|
|
}
|