summary refs log tree commit diff
path: root/pkgs/tools/typesetting/tex/disser/default.nix
blob: 28bcfcd97fe108d433c4047213ae8178041a8a94 (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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
x@{builderDefsPackage
  , unzip, texLive, texLiveCMSuper, texLiveAggregationFun
  , ...}:
builderDefsPackage
(a :  
let 
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
    ["texLive" "texLiveCMSuper" "texLiveAggregationFun"];

  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames))
    ++ [(a.texLiveAggregationFun {paths=[a.texLive a.texLiveCMSuper];})];
  sourceInfo = rec {
    baseName="disser";
    version="1.3.0";
    name="${baseName}-${version}";
    project="${baseName}";
    url="mirror://sourceforge/project/${project}/${baseName}/${version}/${name}.zip";
    hash="1iab3va6xw53l8xzmd83kbnzqah9f6imzzfd3c2054q53p0ndlim";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  inherit (sourceInfo) name version;
  inherit buildInputs;

  /* doConfigure should be removed if not needed */
  phaseNames = ["setVars" "doMakeInstall"];

  setVars = a.noDepEntry ''
    export HOME="$TMPDIR"
  '';

  makeFlags = ["DESTDIR=$out/share/texmf-dist"];
      
  meta = {
    description = "Russian PhD thesis LaTeX package";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    platforms = with a.lib.platforms;
      linux; # platform-independent
    license = "free"; # LaTeX Project Public License
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://sourceforge.net/projects/disser/files/disser/";
    };
  };
}) x