summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--default.nix14
-rw-r--r--install.nix5
3 files changed, 16 insertions, 14 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e07ff6f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+
+.PHONY: all
+all:
+
+.PHONY: clean
+clean:
+ @find -maxdepth 1 -type f \( -name \*.o -o -name \*.hi \) -exec rm -v \{\} \;
+
+.PHONY: install
+install:
+ nix-env --arg target "$$(cabal2nix .)" -f install.nix -i
diff --git a/default.nix b/default.nix
deleted file mode 100644
index 3953722..0000000
--- a/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ pkgs ? import <nixpkgs> {}
-, src ? ./.
-, name ? "much"
-}:
-let
- inherit (pkgs.haskellngPackages) buildLocalCabalWithArgs callPackage;
-in
-buildLocalCabalWithArgs {
- inherit src name;
- args = {
- email-header = callPackage ./nix/email-header.nix {};
- mime-mail = callPackage ./nix/mime-mail.nix {};
- };
-}
diff --git a/install.nix b/install.nix
new file mode 100644
index 0000000..1af984c
--- /dev/null
+++ b/install.nix
@@ -0,0 +1,5 @@
+{ nixpkgs ? import <nixpkgs> {}
+, target
+}:
+
+nixpkgs.pkgs.haskellngPackages.callPackage target {}