about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/sgml+xml/schemas/xml-dtd/docbook/generic.nix
blob: 3d6edd300ec3546d9561e492d950b4d073e5e3c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ lib, stdenv, unzip, src, name, postInstall ? "true", meta ? {}, findXMLCatalogs }:

stdenv.mkDerivation {
  inherit src name postInstall;

  nativeBuildInputs = [unzip];
  propagatedNativeBuildInputs = [ findXMLCatalogs ];

  unpackPhase = ''
    mkdir -p $out/xml/dtd/docbook
    cd $out/xml/dtd/docbook
    unpackFile $src
  '';

  installPhase = ''
    find . -type f -exec chmod -x {} \;
    runHook postInstall
  '';

  meta = meta // {
    platforms = lib.platforms.unix;
  };
}