summaryrefslogtreecommitdiff
path: root/isabat.nix
diff options
context:
space:
mode:
authorstuebinm2021-09-04 16:08:26 +0200
committerstuebinm2021-09-04 16:08:26 +0200
commit531dc149df8c1ba62ee7875f819a94d789935385 (patch)
treebf9b9a169eb7cb6aae0ea258905d8b2e053f8f55 /isabat.nix
parentc914a1532b86b95b89e48ef8a1e43657194ff0dd (diff)
add isabat script
This just calls the isabelle2nix util and pipes its output directly into bat, resulting in a somewhat usable cli tool for .thy files.
Diffstat (limited to 'isabat.nix')
-rw-r--r--isabat.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/isabat.nix b/isabat.nix
new file mode 100644
index 0000000..7fc05f2
--- /dev/null
+++ b/isabat.nix
@@ -0,0 +1,22 @@
+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"
+ cp isabat $out
+ '';
+}