diff options
Diffstat (limited to '')
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | crates.nix | 6 | ||||
-rw-r--r-- | default.nix | 21 | ||||
-rw-r--r-- | isabat.nix | 8 |
4 files changed, 24 insertions, 13 deletions
@@ -1,2 +1,2 @@ target/* -result +result* diff --git a/crates.nix b/crates.nix new file mode 100644 index 0000000..2f69268 --- /dev/null +++ b/crates.nix @@ -0,0 +1,6 @@ +{pkgs, naersk}: + +naersk.buildPackage { + name = "isabelle-unicode"; + src = ./.; +} diff --git a/default.nix b/default.nix index 964a95a..f807fa6 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,17 @@ let - sources = import ./nix/sources.nix; - pkgs = import sources.nixpkgs {}; - naersk = pkgs.callPackage sources.naersk {}; -in naersk.buildPackage { - name = "isabelle-unicode"; - src = ./.; + sources = import ./nix/sources.nix; +in + +{ pkgs ? import sources.nixpkgs {} +, naersk ? pkgs.callPackage sources.naersk {} +, ... }: + +rec { + isabelle-rust-utils = import ./crates.nix { + inherit pkgs naersk; + }; + + isabat = import ./isabat.nix { + inherit pkgs isabelle-rust-utils; + }; } @@ -1,8 +1,4 @@ -let - sources = import ./nix/sources.nix; - pkgs = import sources.nixpkgs {}; - isabelle-unicode = import ./default.nix; -in +{pkgs, isabelle-rust-utils}: with pkgs; stdenv.mkDerivation { @@ -16,7 +12,7 @@ stdenv.mkDerivation { buildPhase = '' cp $src isabat substituteInPlace isabat \ - --replace isabelle2unicode "${isabelle-unicode}/bin/isabelle2unicode" + --replace isabelle2unicode "${isabelle-rust-utils}/bin/isabelle2unicode" substituteInPlace isabat \ --replace " bat " " ${pkgs.bat}/bin/bat " mkdir -p $out/bin |