nixpkgs/pkgs/tools/package-management/pacman/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, pkgconfig, m4, perl, libarchive, openssl, zlib, bzip2,
2019-12-03 03:44:39 +00:00
lzma, curl, runtimeShell }:
2018-02-28 03:21:00 +00:00
stdenv.mkDerivation rec {
pname = "pacman";
2019-12-03 03:44:39 +00:00
version = "5.2.1";
2018-02-28 03:21:00 +00:00
src = fetchurl {
2019-12-03 03:44:39 +00:00
url = "https://sources.archlinux.org/other/${pname}/${pname}-${version}.tar.gz";
sha256 = "04pkb8qvkldrayfns8cx4fljl4lyys1dqvlf7b5kkl2z4q3w8c0r";
2018-02-28 03:21:00 +00:00
};
2019-05-05 11:30:23 +01:00
enableParallelBuilding = true;
configureFlags = [
# trying to build docs fails with a2x errors, unable to fix through asciidoc
"--disable-doc"
2019-05-05 11:39:07 +01:00
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-scriptlet-shell=${runtimeShell}"
];
2018-02-28 03:21:00 +00:00
2019-05-05 11:39:07 +01:00
installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];
nativeBuildInputs = [ pkgconfig m4 ];
buildInputs = [ curl perl libarchive openssl zlib bzip2 lzma ];
2018-02-28 03:21:00 +00:00
2018-09-10 01:42:59 +01:00
postFixup = ''
substituteInPlace $out/bin/repo-add \
--replace bsdtar "${libarchive}/bin/bsdtar"
'';
2018-02-28 03:21:00 +00:00
meta = with lib; {
description = "A simple library-based package manager";
homepage = "https://www.archlinux.org/pacman/";
2018-02-28 03:21:00 +00:00
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ mt-caret ];
};
}