mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ lib, stdenv, fetchurl
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "libxpdf-3.02pl4";
|
|
|
|
src = fetchurl {
|
|
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz";
|
|
sha256 = "000zq4ddbwyxiki4vdwpmxbnw5n9hsg9hvwra2p33hslyib7sfmk";
|
|
};
|
|
|
|
patches = [
|
|
(fetchurl {
|
|
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl1.patch";
|
|
sha256 = "1wxv9l0d2kkwi961ihpdwi75whdvk7cgqxkbfym8cjj11fq17xjq";
|
|
})
|
|
(fetchurl {
|
|
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch";
|
|
sha256 = "1nfrgsh9xj0vryd8h65myzd94bjz117y89gq0hzji9dqn23xihfi";
|
|
})
|
|
(fetchurl {
|
|
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl3.patch";
|
|
sha256 = "0jskkv8x6dqr9zj4azaglas8cziwqqrkbbnzrpm2kzrvsbxyhk2r";
|
|
})
|
|
(fetchurl {
|
|
url = "ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl4.patch";
|
|
sha256 = "1c48h7aizx0ngmzlzw0mpja1w8vqyy3pg62hyxp7c60k86al715h";
|
|
})
|
|
./xpdf-3.02-protection.patch
|
|
./libxpdf.patch
|
|
];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/goo
|
|
mkdir -p $out/lib/fofi
|
|
mkdir -p $out/lib/xpdf
|
|
mkdir -p $out/include
|
|
|
|
cp -v goo/libGoo.a $out/lib/goo
|
|
cp -v fofi/libfofi.a $out/lib/fofi
|
|
cp -v xpdf/libxpdf.a $out/lib/xpdf
|
|
|
|
cp -v *.h $out/include
|
|
cp -v goo/*.h $out/include
|
|
cp -v fofi/*.h $out/include
|
|
cp -v xpdf/*.h $out/include
|
|
'';
|
|
|
|
meta = with lib; {
|
|
platforms = platforms.unix;
|
|
license = licenses.gpl2;
|
|
};
|
|
}
|