From 2dcbb4482de2c352b76372b389fda20c63075295 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 13 Oct 2015 18:25:01 +0200 Subject: Introduced redo to buildsystem & fixed thermoprint --- .gitignore | 4 +++- default.nix | 6 +++--- default.result.do | 12 ++++++++++++ thermoprint/thermoprint.nix | 4 ++-- 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 default.result.do diff --git a/.gitignore b/.gitignore index c4a847d..fd040a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -/result +/.redo +/*.result +/*.result-link diff --git a/default.nix b/default.nix index 65ea673..6b9e8ab 100644 --- a/default.nix +++ b/default.nix @@ -2,8 +2,8 @@ }: rec { - # servant = pkgs.haskellPackages.callPackage ./servant/servant.nix { - # inherit thermoprint; - # }; + servant = pkgs.haskellPackages.callPackage ./servant/servant.nix { + inherit thermoprint; + }; thermoprint = pkgs.haskellPackages.callPackage ./thermoprint/thermoprint.nix {}; } diff --git a/default.result.do b/default.result.do new file mode 100644 index 0000000..f7cf7ef --- /dev/null +++ b/default.result.do @@ -0,0 +1,12 @@ +find $2 -name '*.hs' -print0 | xargs --null redo-ifchange + +# Recording cross-component dependencies +case $2 in + servant) + redo-ifchange thermoprint.result + ;; +esac + +nix-build -A $2 -o $2.result-link 1>&2 + +exec readlink $2.result-link \ No newline at end of file diff --git a/thermoprint/thermoprint.nix b/thermoprint/thermoprint.nix index 9e90f15..5453c35 100644 --- a/thermoprint/thermoprint.nix +++ b/thermoprint/thermoprint.nix @@ -7,8 +7,8 @@ mkDerivation { pname = "thermoprint"; version = "0.0.0"; src = ./.; - isLibrary = false; - isExecutable = true; + isLibrary = true; + isExecutable = false; executableHaskellDepends = [ base ]; -- cgit v1.2.3