summaryrefslogtreecommitdiff
path: root/isabat.nix
blob: 8d00447ba5d7d80b58cab3172ee58dcfa970c693 (plain)
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
let
  sources = import ./nix/sources.nix;
  pkgs = import sources.nixpkgs {};
  isabelle-unicode = import ./default.nix;
in

with pkgs;
stdenv.mkDerivation {
  pname = "isabat";
  version = "0.1";

  src = ./isabat;

  phases = [ "buildPhase" ];

  buildPhase = ''
    cp $src isabat
    substituteInPlace isabat \
      --replace isabelle2unicode "${isabelle-unicode}/bin/isabelle2unicode"
    substituteInPlace isabat \
      --replace " bat " " ${pkgs.bat}/bin/bat "
    mkdir -p $out/bin
    cp isabat $out/bin
  '';
}