depot/third_party/nixpkgs/pkgs/by-name/ap/apt-mirror/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

46 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, perl
, wget
, makeWrapper
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
pname = "apt-mirror";
version = "0.5.4";
src = fetchFromGitHub {
owner = "apt-mirror";
repo = "apt-mirror";
rev = finalAttrs.version;
hash = "sha256-GNsyXP/O56Y+8QhoSfMm+ig5lK/K3Cm085jxRt9ZRmI=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ];
makeFlags = [
"DESTDIR=$(out)"
"PREFIX=''"
];
postInstall = ''
wrapProgram $out/bin/apt-mirror \
--prefix PATH : ${lib.makeBinPath [wget]}
'';
passthru.updateScript = nix-update-script {};
meta = with lib; {
description = "Tool that provides the ability to mirror any parts of apt sources";
homepage = "https://github.com/apt-mirror/apt-mirror";
changelog = "https://github.com/apt-mirror/apt-mirror/blob/${finalAttrs.src.rev}/CHANGELOG";
license = licenses.gpl2Only;
maintainers = with maintainers; [ arthsmn ];
mainProgram = "apt-mirror";
platforms = platforms.all;
};
})