From 9f60de28de44ea01da25b4cf1305fb63962effd0 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 21 Jan 2019 15:46:03 -0800 Subject: Init --- .gitignore | 3 +++ Main.hs | 4 ++++ Makefile | 12 ++++++++++++ biz.nix | 23 +++++++++++++++++++++++ biz.org | 13 +++++++++++++ default.nix | 2 ++ pkgs.nix | 5 +++++ shell.nix | 5 +++++ 8 files changed, 67 insertions(+) create mode 100644 .gitignore create mode 100644 Main.hs create mode 100644 Makefile create mode 100644 biz.nix create mode 100644 biz.org create mode 100644 default.nix create mode 100644 pkgs.nix create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4afc410 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +*.exe +*.hi \ No newline at end of file diff --git a/Main.hs b/Main.hs new file mode 100644 index 0000000..e552769 --- /dev/null +++ b/Main.hs @@ -0,0 +1,4 @@ +module Main where + +main :: IO () +main = putStrLn "Hello World" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a815cc7 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +biz.exe: Main.hs + ghc -O -i. -o $@ $< + +tags: TAGS + +TAGS: FORCE + hasktags -b -c . + +clean: FORCE + rm -f *.o *.exe *.hi + +.PHONY: FORCE diff --git a/biz.nix b/biz.nix new file mode 100644 index 0000000..debf4d1 --- /dev/null +++ b/biz.nix @@ -0,0 +1,23 @@ +{ stdenv +, mkDerivation +, base +}: + +mkDerivation { + pname = "biz"; + version = "0"; + src = ./.; + isExecutable = true; + libraryHaskellDepends = [ + base + ]; + executableHaskellDepends = [ + base + ]; + testHaskellDepends = [ + base + ]; + homepage = "https://git.sr.ht/~ben/biz"; + description = "biz"; + license = stdenv.lib.licenses.bsd3; +} diff --git a/biz.org b/biz.org new file mode 100644 index 0000000..4def4c4 --- /dev/null +++ b/biz.org @@ -0,0 +1,13 @@ +* Influenced by books +:PROPERTIES: +:ID: 06f115e1-8938-499c-9ef5-758e907209d7 +:END: +** TODO Make a one-page test site +:PROPERTIES: +:ID: 5dd0656e-4e87-4b63-886b-3f95de2504de +:END: +List recommended books by: +- [ ] Steve Jobs +- [ ] Obama +- [ ] Warren Buffet +- [ ] Michael Jordan (or other sports icon) diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..4a13943 --- /dev/null +++ b/default.nix @@ -0,0 +1,2 @@ +{ nixpkgs ? import {}, compiler ? "ghc863" }: +nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./biz.nix { } diff --git a/pkgs.nix b/pkgs.nix new file mode 100644 index 0000000..b87407a --- /dev/null +++ b/pkgs.nix @@ -0,0 +1,5 @@ +{ + url = "https://github.com/nixos/nixpkgs.git"; + ref = "release-18.09"; + rev = "da81531c1d76b4c24b944f6cf69b7025770662c1"; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..9707164 --- /dev/null +++ b/shell.nix @@ -0,0 +1,5 @@ +{ nixpkgs ? import (fetchGit (import ./pkgs.nix)) {} +, compiler ? "ghc862" +}: + +(import ./default.nix { inherit nixpkgs compiler; }).env -- cgit v1.2.3