diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | default.nix | 6 | ||||
-rw-r--r-- | default.result.do | 12 | ||||
-rw-r--r-- | thermoprint/thermoprint.nix | 4 |
4 files changed, 20 insertions, 6 deletions
@@ -1 +1,3 @@ | |||
1 | /result | 1 | /.redo |
2 | /*.result | ||
3 | /*.result-link | ||
diff --git a/default.nix b/default.nix index 65ea673..6b9e8ab 100644 --- a/default.nix +++ b/default.nix | |||
@@ -2,8 +2,8 @@ | |||
2 | }: | 2 | }: |
3 | 3 | ||
4 | rec { | 4 | rec { |
5 | # servant = pkgs.haskellPackages.callPackage ./servant/servant.nix { | 5 | servant = pkgs.haskellPackages.callPackage ./servant/servant.nix { |
6 | # inherit thermoprint; | 6 | inherit thermoprint; |
7 | # }; | 7 | }; |
8 | thermoprint = pkgs.haskellPackages.callPackage ./thermoprint/thermoprint.nix {}; | 8 | thermoprint = pkgs.haskellPackages.callPackage ./thermoprint/thermoprint.nix {}; |
9 | } | 9 | } |
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 @@ | |||
1 | find $2 -name '*.hs' -print0 | xargs --null redo-ifchange | ||
2 | |||
3 | # Recording cross-component dependencies | ||
4 | case $2 in | ||
5 | servant) | ||
6 | redo-ifchange thermoprint.result | ||
7 | ;; | ||
8 | esac | ||
9 | |||
10 | nix-build -A $2 -o $2.result-link 1>&2 | ||
11 | |||
12 | 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 { | |||
7 | pname = "thermoprint"; | 7 | pname = "thermoprint"; |
8 | version = "0.0.0"; | 8 | version = "0.0.0"; |
9 | src = ./.; | 9 | src = ./.; |
10 | isLibrary = false; | 10 | isLibrary = true; |
11 | isExecutable = true; | 11 | isExecutable = false; |
12 | executableHaskellDepends = [ | 12 | executableHaskellDepends = [ |
13 | base | 13 | base |
14 | ]; | 14 | ]; |