summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-10-27 09:48:52 -0700
committerBen Sima <ben@bsima.me>2019-10-27 12:14:40 -0700
commitc790672cc244ac4caba1bda3572829a6c6862891 (patch)
tree2706bb8044f7b14840c5f90f215b79b433e81045
parent44df4ba39f65c3afd84bee6b03f47d9b061e9038 (diff)
move everything to namespace directories
-rw-r--r--.gitignore4
-rw-r--r--.gitlab-ci.yml21
-rw-r--r--README.md66
-rw-r--r--apex/Bs.hs6
-rw-r--r--apex/Cmdwave.hs10
-rw-r--r--apex/Duree.hs6
-rw-r--r--bild/.keep0
-rw-r--r--com/influencedbybooks.nix (renamed from mode/ibb.nix)4
-rw-r--r--com/influencedbybooks/aero.hs (renamed from aero/Ibb.hs)8
-rw-r--r--com/influencedbybooks/apex.hs (renamed from apex/Ibb.hs)10
-rw-r--r--com/influencedbybooks/core.hs (renamed from lore/Biz/Ibb/Core.hs)6
-rw-r--r--com/influencedbybooks/default.nix (renamed from pack/ibb.nix)1
-rw-r--r--com/influencedbybooks/influencers.hs (renamed from lore/Biz/Ibb/Influencers.hs)4
-rw-r--r--com/influencedbybooks/keep.hs (renamed from lore/Biz/Ibb/Keep.hs)6
-rw-r--r--com/influencedbybooks/look.hs (renamed from lore/Biz/Ibb/Look.hs)4
-rw-r--r--com/influencedbybooks/move.hs (renamed from lore/Biz/Ibb/Move.hs)6
-rw-r--r--com/simatime.nix60
-rw-r--r--com/simatime/alpha.hs (renamed from lore/Alpha.hs)2
-rw-r--r--com/simatime/bild.scm145
-rw-r--r--com/simatime/core.scm (renamed from lore/core.scm)16
-rw-r--r--com/simatime/dev.nix20
-rw-r--r--com/simatime/dev/configuration.nix (renamed from depo/hikuj-zupip/configuration.nix)0
-rw-r--r--com/simatime/dev/hardware.nix (renamed from depo/hikuj-zupip/hardware.nix)0
-rw-r--r--com/simatime/fathom.nix (renamed from mode/fathom.nix)22
-rw-r--r--com/simatime/firefox.nix (renamed from depo/nutin-madaj/firefox.nix)0
-rw-r--r--com/simatime/git.nix (renamed from depo/nutin-madaj/git.nix)2
-rw-r--r--com/simatime/go.hs (renamed from lore/Control/Concurrent/Go.hs)2
-rw-r--r--com/simatime/hardware.nix (renamed from depo/nutin-madaj/hardware-configuration.nix)0
-rw-r--r--com/simatime/idea/duree-pitch.org (renamed from idea/duree-pitch.org)0
-rw-r--r--com/simatime/idea/flash.org (renamed from idea/flash.org)0
-rw-r--r--com/simatime/keys/ben.pub (renamed from keys/ben.pub)0
-rw-r--r--com/simatime/keys/deploy.pub (renamed from keys/deploy.pub)0
-rw-r--r--com/simatime/keys/nick.pub (renamed from keys/nick.pub)0
-rw-r--r--com/simatime/language/bs.hs (renamed from lore/Language/Bs.hs)0
-rw-r--r--com/simatime/language/bs/cli.hs (renamed from lore/Language/Bs/Cli.hs)0
-rw-r--r--com/simatime/language/bs/eval.hs (renamed from lore/Language/Bs/Eval.hs)0
-rw-r--r--com/simatime/language/bs/expr.hs (renamed from lore/Language/Bs/Expr.hs)0
-rw-r--r--com/simatime/language/bs/parser.hs (renamed from lore/Language/Bs/Parser.hs)0
-rw-r--r--com/simatime/language/bs/primitives.hs (renamed from lore/Language/Bs/Primitives.hs)0
-rw-r--r--com/simatime/language/bs/repl.hs (renamed from lore/Language/Bs/Repl.hs)0
-rw-r--r--com/simatime/language/bs/test.hs (renamed from lore/Language/Bs/Test.hs)0
-rw-r--r--com/simatime/mail.nix (renamed from depo/nutin-madaj/mail.nix)0
-rw-r--r--com/simatime/network.hs (renamed from lore/Network/RemoteData.hs)2
-rw-r--r--com/simatime/networking.nix (renamed from depo/nutin-madaj/networking.nix)0
-rw-r--r--com/simatime/nixpkgs.nix (renamed from pack/nixpkgs.nix)0
-rw-r--r--com/simatime/packages.nix (renamed from depo/packages.nix)0
-rw-r--r--com/simatime/repl.scm34
-rw-r--r--com/simatime/sema.hs (renamed from lore/Control/Concurrent/Sima.hs)2
-rw-r--r--com/simatime/shuffle.hs (renamed from lore/System/Random/Shuffle.hs)0
-rw-r--r--com/simatime/users.nix (renamed from depo/users.nix)2
-rw-r--r--com/simatime/web.nix (renamed from depo/nutin-madaj/web.nix)0
-rw-r--r--com/simatime/znc.nix (renamed from depo/nutin-madaj/znc.nix)2
-rw-r--r--default.nix60
-rw-r--r--depo/default.nix6
-rw-r--r--depo/hikuj-zupip/default.nix23
-rw-r--r--depo/nutin-madaj/default.nix94
-rw-r--r--lore/Biz/Ibb.hs9
-rw-r--r--lore/bild.nix56
-rw-r--r--lore/sicp/meta.scm20
-rw-r--r--lore/sicp/set.scm42
-rw-r--r--nixpkgs.nix5
-rw-r--r--pack/bs.nix39
-rw-r--r--pack/buildeasy.nix30
-rw-r--r--pack/cmdwave.nix30
-rw-r--r--pack/default.nix12
-rw-r--r--pack/duree.nix33
-rw-r--r--pack/fathom.nix18
-rw-r--r--pack/overlay.nix3
68 files changed, 411 insertions, 542 deletions
diff --git a/.gitignore b/.gitignore
index cfa2ad1..e8e7a6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,9 +2,7 @@
*.exe
*.hi
result*
-dist
-dist-newstyle
-bild/*
+_bild
TAGS
.tex
.pdf
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index f429ee2..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-stages:
- - build
-
-before_script:
- - nix --version
- - nix-channel --list
- - pwd
- - ls -al
-
-
-build-pack:
- stage: build
- script: nix-build -A pack
- tags:
- - nix
-
-build-depo:
- stage: build
- script: nix-build -A depo
- tags:
- - nix
diff --git a/README.md b/README.md
index f3f3a28..355a12e 100644
--- a/README.md
+++ b/README.md
@@ -1,40 +1,27 @@
-# Source layout
+# Source Layout
- aero browser apps, compiled with ghcjs
- apex server-side api stuff, compiled with ghc
- bild temporary storage for build artifacts
- chip executable scripts in python, bash
- depo for deployment, machine-specific nix code
- lore shared libraries, compiled with either ghc/js
- mode nixos modules; services and modular config
- pack nix packages & external packages that we import
- soar s3/spaces assets, like images, via git-annex
+The source tree maps to the DNS namespace that we own. The purpose of this
+mapping is to keep things organized hierarchically in how they are deployed on
+the Internet. The main 'common' space is `com.simatime`, everything else should
+be related to the application.
-This isn't totally in place yet, but it's something to work toward.
+Development aspects should be localized to their sub-namespaces as much as
+possible. Only after sufficient iteration such that interfaces are solidified
+and functionality is well-established should some code be promoted up the
+namespace hierarchy.
-The main source directory is `lore`. Stuff in `aero` and `apex` should be small
-functions specific to the server/client.
+Boundaries and interfaces between namespaces should be small and
+well-defined. Likewise, the functionality and purpose of a particular namespace
+should be small and well-defined. Following the unix principle of "do one thing
+and do it well" is advised.
-The two special locations are `soar` and `bild`. The former is for images and
-other assets to be synced to digital ocean's object storage. The latter's
-contents are gitignore'd and can be deleted at any time because they will just
-be rebuilt later.
+Namespaces refer to conceptual boundaries. Implementations can be in any number
+of languages, indicated by the file extension. For example, we can have
+`com.example.api.hs` and `com.example.api.scm` in order to have an API client in
+both Haskell and Scheme. Building `com.example.api` should compile both pieces
+of code.
-# Development
-
-To get a development shell, for example to work on ibb, you can do:
-
- $ nix-shell -A pack.ibb
- $ chip/make ibb
-
-The build system topology is defined in `./default.nix`, so follow the import
-paths there to see what's available for building and installing locally. For
-example, to build `ibb`: `nix-build -A pack.ibb`. Or, to build the main app
-server with all dependencies and configuration: `nix-build -A
-depo.nutin-madaj.system`. Omitting `.system` will also build a VM that you can
-run locally for testing.
-
-## Goals of the developer workflow:
+# Goals of the developer workflow:
- have minimal ceremony
- default to asynchrony, but allow for synchronous work when necessary
@@ -45,19 +32,16 @@ run locally for testing.
Ideally, each contributor should be able to go off grid for a day or a week or
more, continue working offline, submit their work when finished, and have no or
-minimal conflicts. This also refers to the resiliance of the production systems.
+minimal conflicts. This also refers to the resilience of the production systems.
We should never need "out of office" email auto-replies, or urgent contact. No
-pager duy, no daily standups. Yes, this policy will affect what code we write,
+pager duty, no daily stand-ups. Yes, this policy will affect what code we write,
not just how we write it; that is by design.
-# Deployment
-
-To build the production server config locally:
+## Org
- nix-build -A depo.nutin-madaj.system
+## Git
-To push the built closure and switch to the new configuration (will ask for ssh
-passphrase 2x):
+## Email
- chip/push nutin-madaj
+## IRC
diff --git a/apex/Bs.hs b/apex/Bs.hs
deleted file mode 100644
index 0f57bc3..0000000
--- a/apex/Bs.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-module Bs where
-
-import Language.Bs.Cli (run)
-
-main :: IO ()
-main = run
diff --git a/apex/Cmdwave.hs b/apex/Cmdwave.hs
deleted file mode 100644
index dfd9fcb..0000000
--- a/apex/Cmdwave.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-module Cmdwave where
-
-import Sound.Pulse.Simple
-
-main :: IO ()
-main = do
- s <- simpleNew Nothing "example" Record Nothing "this is an example application"
- (SampleSpec (F32 LittleEndian) 44100 1) Nothing Nothing
- _ <- simpleRead s $ 44100*10 :: IO [Float]
- simpleFree s
diff --git a/apex/Duree.hs b/apex/Duree.hs
deleted file mode 100644
index 4552834..0000000
--- a/apex/Duree.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-module Duree where
-
-import Database.MongoDB
-
-main :: IO ()
-main = putStrLn "hi"
diff --git a/bild/.keep b/bild/.keep
deleted file mode 100644
index e69de29..0000000
--- a/bild/.keep
+++ /dev/null
diff --git a/mode/ibb.nix b/com/influencedbybooks.nix
index ffc7cb4..f9d0f36 100644
--- a/mode/ibb.nix
+++ b/com/influencedbybooks.nix
@@ -31,8 +31,8 @@ in
Influenced By Books website
'';
serviceConfig = {
- WorkingDirectory=pkgs.ibb;
- KillSignal="INT";
+ WorkingDirectory = pkgs.ibb;
+ KillSignal = "INT";
Type = "simple";
Restart = "on-abort";
RestartSec = "10";
diff --git a/aero/Ibb.hs b/com/influencedbybooks/aero.hs
index 705abef..92d071d 100644
--- a/aero/Ibb.hs
+++ b/com/influencedbybooks/aero.hs
@@ -3,11 +3,11 @@
{-# LANGUAGE NoImplicitPrelude #-}
-- | Front-end
-module Ibb where
+module Com.InfluencedByBooks.Aero where
-import Alpha
-import Biz.Ibb.Move (move)
-import Biz.Ibb.Core (Action(..), see, init)
+import Com.Simatime.Alpha
+import Com.InfluencedByBooks.Move (move)
+import Com.InfluencedByBooks.Core (Action(..), see, init)
import Miso (App(..), defaultEvents, miso)
main :: IO ()
diff --git a/apex/Ibb.hs b/com/influencedbybooks/apex.hs
index 00fa349..fd4766b 100644
--- a/apex/Ibb.hs
+++ b/com/influencedbybooks/apex.hs
@@ -8,12 +8,12 @@
{-# LANGUAGE TypeOperators #-}
-- | Server
-module Ibb where
+module Com.InfluencedByBooks.Apex where
-import Alpha
-import Biz.Ibb
-import qualified Biz.Ibb.Keep as Keep
-import qualified Biz.Ibb.Look as Look
+import Com.Simatime Alpha
+import Com.InfluencedByBooks.Core
+import qualified Com.InfluencedByBooks.Keep as Keep
+import qualified Com.InfluencedByBooks.Look as Look
import qualified Clay
import qualified Data.Text.Lazy as Lazy
import qualified Data.Text.Lazy.Encoding as Lazy
diff --git a/lore/Biz/Ibb/Core.hs b/com/influencedbybooks/core.hs
index ff00060..9bd2353 100644
--- a/lore/Biz/Ibb/Core.hs
+++ b/com/influencedbybooks/core.hs
@@ -5,16 +5,16 @@
{-# LANGUAGE OverloadedStrings #-}
-- | Main app logic
-module Biz.Ibb.Core where
+module Com.InfluencedByBooks.Core where
-import Alpha
+import Com.Simatime.Alpha
import Data.Aeson hiding (Success)
import Data.Data (Data, Typeable)
import Data.Text (Text)
import GHC.Generics (Generic)
import Miso
import Miso.String
-import Network.RemoteData
+import Com.Simatime.Network
import Servant.API
import Servant.Links
diff --git a/pack/ibb.nix b/com/influencedbybooks/default.nix
index 12f8eb4..f2ff1ec 100644
--- a/pack/ibb.nix
+++ b/com/influencedbybooks/default.nix
@@ -1,3 +1,4 @@
+# TODO: translate this back to regular nix?
{
name = "ibb";
deps = {
diff --git a/lore/Biz/Ibb/Influencers.hs b/com/influencedbybooks/influencers.hs
index c31e962..2583770 100644
--- a/lore/Biz/Ibb/Influencers.hs
+++ b/com/influencedbybooks/influencers.hs
@@ -2,9 +2,9 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
-module Biz.Ibb.Influencers where
+module Com.InfluencedByBooks.Influencers where
-import Biz.Ibb.Core
+import Com.InfluencedByBooks.Core
allPeople :: [Person]
allPeople =
diff --git a/lore/Biz/Ibb/Keep.hs b/com/influencedbybooks/keep.hs
index ad7dcbc..0bc527a 100644
--- a/lore/Biz/Ibb/Keep.hs
+++ b/com/influencedbybooks/keep.hs
@@ -10,9 +10,9 @@
-- `Biz.Keep`. I could wrap all the safecopy stuff in my own template haskell
-- like `$(keep ''MyType)`.
--
-module Biz.Ibb.Keep where
+module Com.InfluencedByBooks.Keep where
-import Biz.Ibb.Core (Person(..), Book(..))
+import Com.InfluencedByBooks.Core (Person(..), Book(..))
import Control.Monad.State (get, put)
import Control.Monad.Reader (ask)
import Data.Acid (Update, makeAcidic)
@@ -24,7 +24,7 @@ import Data.SafeCopy
import Data.Text (Text)
import qualified Data.Text as Text
-import qualified Biz.Ibb.Influencers as Influencers
+import qualified Com.InfluencedByBooks.Influencers as Influencers
-- * Keep
diff --git a/lore/Biz/Ibb/Look.hs b/com/influencedbybooks/look.hs
index 9017ba2..d61fc11 100644
--- a/lore/Biz/Ibb/Look.hs
+++ b/com/influencedbybooks/look.hs
@@ -2,9 +2,9 @@
{-# LANGUAGE NoImplicitPrelude #-}
-- | The look and feel of Ibb
-module Biz.Ibb.Look where
+module Com.InfluencedByBooks.Look where
-import Alpha
+import Com.Simatime.Alpha
import Clay
import qualified Clay.Stylesheet as Stylesheet
import qualified Clay.Render as Clay
diff --git a/lore/Biz/Ibb/Move.hs b/com/influencedbybooks/move.hs
index 0d83e8a..2c0ee37 100644
--- a/lore/Biz/Ibb/Move.hs
+++ b/com/influencedbybooks/move.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE OverloadedStrings #-}
-- | App update logic
-module Biz.Ibb.Move (
+module Com.InfluencedByBooks.Move (
move
-- * Server interactions
, fetchPeople
@@ -10,11 +10,11 @@ module Biz.Ibb.Move (
import Alpha
import Data.Aeson
-import Biz.Ibb.Core as Core
+import Com.InfluencedByBooks.Core as Core
import JavaScript.Web.XMLHttpRequest (Request(..), Method(GET), RequestData(NoData), contents, xhrByteString)
import Miso
import Miso.String
-import Network.RemoteData
+import Com.Simatime.Network
move :: Action -> Model -> Effect Action Model
move Nop m = noEff m
diff --git a/com/simatime.nix b/com/simatime.nix
new file mode 100644
index 0000000..e26219a
--- /dev/null
+++ b/com/simatime.nix
@@ -0,0 +1,60 @@
+{ nixos }:
+
+/*
+
+com.simatime - cloud infrastructure server.
+
+This serves the git repo, mailserver, znc bouncer, user sites, and so on.
+
+Currently also used as a catch-all production/staging server, until I get real
+stuff deployed.
+
+*/
+
+{
+ service =
+ let
+ nixos-mailserver = builtins.fetchTarball {
+ url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.1/nixos-mailserver-v2.2.1.tar.gz";
+ sha256 = "03d49v8qnid9g9rha0wg2z6vic06mhp0b049s3whccn1axvs2zzx";
+ };
+ in nixos {
+ system = "x86_64-linux";
+ configuration = {
+ imports = [
+ ./simatime/hardware.nix
+ ./simatime/networking.nix
+
+ # common infra
+ ./simatime/users.nix
+ ./simatime/packages.nix
+
+ # configured modules
+ ./simatime/git.nix
+ ./simatime/mail.nix
+ ./simatime/web.nix
+ ./simatime/znc.nix
+
+ # third party
+ nixos-mailserver
+ ];
+
+ nixpkgs.config.allowUnfree = true;
+
+ programs.mosh = {
+ enable = true;
+ withUtempter = true;
+ };
+
+ services.openssh = {
+ enable = true;
+ passwordAuthentication = false;
+ };
+
+ security.sudo.wheelNeedsPassword = true;
+ boot.cleanTmpDir = true;
+ };
+ };
+
+ dev = import ./simatime/dev.nix { inherit nixos; };
+}
diff --git a/lore/Alpha.hs b/com/simatime/alpha.hs
index bae7fa5..438b97a 100644
--- a/lore/Alpha.hs
+++ b/com/simatime/alpha.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE NoImplicitPrelude #-}
-- | Commonly useful functions, a Prelude replacement.
-module Alpha (
+module Com.Simatime.Alpha (
-- * Re-export Protolude
module X
-- * General functions
diff --git a/com/simatime/bild.scm b/com/simatime/bild.scm
new file mode 100644
index 0000000..11403e8
--- /dev/null
+++ b/com/simatime/bild.scm
@@ -0,0 +1,145 @@
+;; bild - a simple build tool
+;;
+;;; Commentary:
+;;
+;; Design constraints
+;;
+;; - only input is a namespace, no subcommands, no packages
+;; - no need to write specific build rules
+;; - one rule for hs, one for rs, one for scm, and so on
+;; - no need to distinguish between exe and lib, just have a single output
+;; - never concerned with deployment/packaging - leave that to another tool (scp? tar?))
+;;
+;; Features
+;;
+;; - namespace maps to filesystem
+;; - no need for `bild -l` for listing available targets. Use `ls` or `tree`
+;; - you build namespaces, not files/modules/packages/etc
+;; - namespace maps to language modules
+;; - build settings can be set in the file comments
+;; - pwd is always considered the the source directory, no `src` vs `doc` etc.
+;; - build methods automaticatly detected with file extensions
+;; - flags modify the way to interact with the build
+;; - -s = jump into a shell and/or repl
+;; - -p = turn on profiling
+;; - -t = limit build by type
+;; - -e = exclude some regex in the ns tree
+;; - -o = optimize level
+;;
+;; Example Commands
+;;
+;; bild [-rpt] <target..>
+;;
+;; The general scheme is to build the things described by the targets. A target
+;; is a namespace. You can list as many as you want, but you must list at least
+;; one. It could just be `.` for the current directory. Build outputs will go
+;; into the _bild directory in the root of the project.
+;;
+;; bild biz.web
+;;
+;; Or `bild biz/web`. This shows building a file at ./biz/web.hs, this will
+;; translate to something like `ghc --make Biz.Web`.
+;;
+;; bild -r <target>
+;;
+;; Starts a repl/shell for target.
+;; - if target.hs, load ghci
+;; - if target.scm, load scheme repl
+;; - if target.clj, load a clojure repl
+;; - if target.nix, load nix-shell
+;; - and so on.
+;;
+;; bild -p <target>
+;;
+;; build target with profiling (if available)
+;;
+;; bild -t nix target
+;;
+;; only build target.nix, not target.hs and so on (in the case of multiple
+;; targets with the same name but different extension).
+;;
+;; Here is an example integration with GHC. Given the following command-line
+;; invocation to compile the namespace 'com.simatime.bild' which depends on
+;; 'com.simatime.lib':
+;;
+;; ghc com/simatime/bild.hs -i com/simatime/lib.hs -o _bild/bild -v \
+;; -main-is Com.Simatime.Bild.main
+;;
+;; The general template of which is:
+;;
+;; ghc <source> -i <deps..> -o <target> -main-is <target>.main
+;;
+;; Some definitions:
+;;
+;; - <source> is some source file
+;; - <deps..> is the stack of dependencies
+;; - <target> is the target namespace, indicated by 'bild <target>'
+;;
+;; To fill out the build template, we can parse the file for known
+;; namespaces. The general recipe is:
+;;
+;; 1. Create a list of namespaces in my git repo. This can be cached, or I can
+;; integrate with git somehow.
+;; 2. Read the <source> file corresponding to <target>
+;; 3. Look for 'import <namespace>', where <namespace> is a namespace in the
+;; aforementioned cache.
+;; 4. If found, then save current build as a continuation and compile
+;; <namespace>. Result gets put on the dependency stack
+;; 5. When finished, return to building <target>
+;;
+;; Once the build command template is filled out, we can create the nix expression.
+;;
+;; TODO
+;;
+;; Questions
+;;
+;; - how to import (third-party) dependencies?
+;; 1 just don't have them...? yeah right
+;; 2 the target.nix could be the build description for target.hs
+;; 3 just use a default.nix for the com.whatever
+;; 4 have a deps.nix file
+;; 5 list them in the file with other settings
+;; - how to handle multiple output formats?
+;; - e.g. that ghcjs and ghc take the same input files...
+;; - say you have a .md file, you want to bild it to pdf, html, and more. What do?
+;; - i guess the nix file could return a set of drvs instead of a single drv
+;; - the top of the file should
+;;
+;;; Code:
+
+(define-module (com simatime bild)
+ #:use-module ((ice-9 ftw) #:prefix ftw:)
+ #:export (ns?
+ ns->path))
+
+(define ns? symbol?)
+
+(define (ns->path ns)
+ ;; in place of a spec
+ (when (ns? ns)
+ (string-fold
+ (lambda (a b)
+ (if (eq? a #\.)
+ (string-concatenate (list b (string #\/)))
+ (string-concatenate (list b (string a)))))
+ ""
+ (symbol->string ns))))
+
+(define ns->module-name (ns)
+ TODO)
+
+(define (ns sym)
+ (define-module (ns->module-name)))
+
+(define (prn a) (display a) (newline))
+
+;; todo
+;;
+;; - find buildable files given a namespace
+;; - select a build method based on ext
+;; - run the build
+(define (find-buildable ns)
+ (ftw:ftw ns
+ (lambda (a b c)
+ (map prn (list a b c))
+ #t)))
diff --git a/lore/core.scm b/com/simatime/core.scm
index 3d411c4..6a4f09d 100644
--- a/lore/core.scm
+++ b/com/simatime/core.scm
@@ -1,4 +1,8 @@
-;; standard library for bs
+(define-module (com simatime core))
+
+;;
+;; old core, do i still need this?
+;;
(define (not x) (if x #f #t))
(define (null? obj) (if (eqv? obj '()) #t #f))
@@ -57,3 +61,13 @@
(define (assoc obj alist) (fold (mem* (curry equal? obj) car) #f alist))
(define (map f lst) (foldr (lambda (x y) (cons (f x) y)) '() lst))
(define (filter pred lst) (foldr (lambda (x y) (if (pred x) (cons x y) y)) '() lst))
+
+
+;;
+;; clojure-like stuff
+;;
+
+(define (pr . a)
+ (for-each display args))
+
+(define (prn . a) (apply pr a) (newline))
diff --git a/com/simatime/dev.nix b/com/simatime/dev.nix
new file mode 100644
index 0000000..a45a92b
--- /dev/null
+++ b/com/simatime/dev.nix
@@ -0,0 +1,20 @@
+{ nixos }:
+
+/*
+
+com.simatime.dev - main development/build server. Lives in ben's apartment in
+Mountain View.
+
+*/
+
+nixos {
+ system = "x86_64-linux";
+ configuration = {
+ imports = [
+ ./users.nix
+ ./packages.nix
+ ./dev/hardware.nix
+ ./dev/configuration.nix
+ ];
+ };
+}
diff --git a/depo/hikuj-zupip/configuration.nix b/com/simatime/dev/configuration.nix
index b313a36..b313a36 100644
--- a/depo/hikuj-zupip/configuration.nix
+++ b/com/simatime/dev/configuration.nix
diff --git a/depo/hikuj-zupip/hardware.nix b/com/simatime/dev/hardware.nix
index fc0e7a0..fc0e7a0 100644
--- a/depo/hikuj-zupip/hardware.nix
+++ b/com/simatime/dev/hardware.nix
diff --git a/mode/fathom.nix b/com/simatime/fathom.nix
index dee34b9..40e8b0b 100644
--- a/mode/fathom.nix
+++ b/com/simatime/fathom.nix
@@ -3,14 +3,30 @@
, config
, pkgs
, modulesPath
+, stdenv
}:
with lib;
let
- cfg = config.services.fathom;
-in
-{
+ cfg = config.services.fathom
+ pkgs.fathom = stdenv.mkDerivation rec {
+ name = "fathom-v${version}";
+ version = "1.2.1";
+ src = builtins.fetchurl {
+ url = "https://github.com/usefathom/fathom/releases/download/v${version}/fathom_${version}_linux_amd64.tar.gz";
+ sha256 = "0sfpxh2xrvz992k0ynib57zzpcr0ikga60552i14m13wppw836nh";
+ };
+ sourceRoot = ".";
+ dontBuild = true;
+ installPhase = ''
+ mkdir -p $out/bin
+ cp fathom $out/bin
+ cp LICENSE $out
+ cp README.md $out
+ '';
+ };
+in {
options.services.fathom = {
enable = lib.mkEnableOption "Enable the Fathom Analytics service";
diff --git a/depo/nutin-madaj/firefox.nix b/com/simatime/firefox.nix
index 12316fb..12316fb 100644
--- a/depo/nutin-madaj/firefox.nix
+++ b/com/simatime/firefox.nix
diff --git a/depo/nutin-madaj/git.nix b/com/simatime/git.nix
index e61abb4..51e46b6 100644
--- a/depo/nutin-madaj/git.nix
+++ b/com/simatime/git.nix
@@ -12,7 +12,7 @@
extraGitoliteRc = ''
$RC{SITE_INFO} = 'a computer is a bicycle for the mind.';
'';
- adminPubkey = builtins.readFile ../../keys/ben.pub;
+ adminPubkey = builtins.readFile ./keys/ben.pub;
};
};
}
diff --git a/lore/Control/Concurrent/Go.hs b/com/simatime/go.hs
index 711611f..1b32230 100644
--- a/lore/Control/Concurrent/Go.hs
+++ b/com/simatime/go.hs
@@ -2,7 +2,7 @@
-- https://stackoverflow.com/questions/4522387/how-can-i-emulate-gos-channels-with-haskell
-- but this version encodes end-of-stream on the communication channel, as a Nothing
-module Control.Concurrent.Go
+module Com.Simatime.Go
( chan
, readCh
, (-<-)
diff --git a/depo/nutin-madaj/hardware-configuration.nix b/com/simatime/hardware.nix
index 8c88cb7..8c88cb7 100644
--- a/depo/nutin-madaj/hardware-configuration.nix
+++ b/com/simatime/hardware.nix
diff --git a/idea/duree-pitch.org b/com/simatime/idea/duree-pitch.org
index d4d9d6f..d4d9d6f 100644
--- a/idea/duree-pitch.org
+++ b/com/simatime/idea/duree-pitch.org
diff --git a/idea/flash.org b/com/simatime/idea/flash.org
index 1c392f0..1c392f0 100644
--- a/idea/flash.org
+++ b/com/simatime/idea/flash.org
diff --git a/keys/ben.pub b/com/simatime/keys/ben.pub
index c661508..c661508 100644
--- a/keys/ben.pub
+++ b/com/simatime/keys/ben.pub
diff --git a/keys/deploy.pub b/com/simatime/keys/deploy.pub
index 664a2d9..664a2d9 100644
--- a/keys/deploy.pub
+++ b/com/simatime/keys/deploy.pub
diff --git a/keys/nick.pub b/com/simatime/keys/nick.pub
index 4dc08fb..4dc08fb 100644
--- a/keys/nick.pub
+++ b/com/simatime/keys/nick.pub
diff --git a/lore/Language/Bs.hs b/com/simatime/language/bs.hs
index a810706..a810706 100644
--- a/lore/Language/Bs.hs
+++ b/com/simatime/language/bs.hs
diff --git a/lore/Language/Bs/Cli.hs b/com/simatime/language/bs/cli.hs
index 4c48c86..4c48c86 100644
--- a/lore/Language/Bs/Cli.hs
+++ b/com/simatime/language/bs/cli.hs
diff --git a/lore/Language/Bs/Eval.hs b/com/simatime/language/bs/eval.hs
index 290170b..290170b 100644
--- a/lore/Language/Bs/Eval.hs
+++ b/com/simatime/language/bs/eval.hs
diff --git a/lore/Language/Bs/Expr.hs b/com/simatime/language/bs/expr.hs
index a39c7b6..a39c7b6 100644
--- a/lore/Language/Bs/Expr.hs
+++ b/com/simatime/language/bs/expr.hs
diff --git a/lore/Language/Bs/Parser.hs b/com/simatime/language/bs/parser.hs
index 3044a60..3044a60 100644
--- a/lore/Language/Bs/Parser.hs
+++ b/com/simatime/language/bs/parser.hs
diff --git a/lore/Language/Bs/Primitives.hs b/com/simatime/language/bs/primitives.hs
index c074c59..c074c59 100644
--- a/lore/Language/Bs/Primitives.hs
+++ b/com/simatime/language/bs/primitives.hs
diff --git a/lore/Language/Bs/Repl.hs b/com/simatime/language/bs/repl.hs
index 64ffaa2..64ffaa2 100644
--- a/lore/Language/Bs/Repl.hs
+++ b/com/simatime/language/bs/repl.hs
diff --git a/lore/Language/Bs/Test.hs b/com/simatime/language/bs/test.hs
index 4a40036..4a40036 100644
--- a/lore/Language/Bs/Test.hs
+++ b/com/simatime/language/bs/test.hs
diff --git a/depo/nutin-madaj/mail.nix b/com/simatime/mail.nix
index 81bddc2..81bddc2 100644
--- a/depo/nutin-madaj/mail.nix
+++ b/com/simatime/mail.nix
diff --git a/lore/Network/RemoteData.hs b/com/simatime/network.hs
index 2fe6557..e47e891 100644
--- a/lore/Network/RemoteData.hs
+++ b/com/simatime/network.hs
@@ -1,7 +1,7 @@
-- | A port of Kris Jenkins' RemoteData Elm module
-- <https://github.com/krisajenkins/remotedata>.
--
-module Network.RemoteData where
+module Com.Simatime.Network where
data RemoteData a b
= NotAsked
diff --git a/depo/nutin-madaj/networking.nix b/com/simatime/networking.nix
index 4cfd73d..4cfd73d 100644
--- a/depo/nutin-madaj/networking.nix
+++ b/com/simatime/networking.nix
diff --git a/pack/nixpkgs.nix b/com/simatime/nixpkgs.nix
index 5d8dc56..5d8dc56 100644
--- a/pack/nixpkgs.nix
+++ b/com/simatime/nixpkgs.nix
diff --git a/depo/packages.nix b/com/simatime/packages.nix
index 2c522f6..2c522f6 100644
--- a/depo/packages.nix
+++ b/com/simatime/packages.nix
diff --git a/com/simatime/repl.scm b/com/simatime/repl.scm
new file mode 100644
index 0000000..3d2f6d9
--- /dev/null
+++ b/com/simatime/repl.scm
@@ -0,0 +1,34 @@
+(define-module (com simatime repl)
+ #:use-module ((ice-9 ftw) #:prefix ftw:)
+ #:export (pr prn pwd ls cd))
+
+
+;;
+;; shell-like stuff
+;;
+(use-modules ((ice-9 ftw) #:prefix ftw:))
+
+(define (pwd)
+ (regexp-substitute/global
+ #f "/home/ben" (getcwd) 'pre "~" 'post))
+
+(define (ls)
+ (ftw:scandir (getcwd)))
+
+(define (cd path)
+ (chdir path)
+ (ls))
+
+
+;;
+;; repl customization
+;;
+
+;; (use-modules (system repl common))
+;; (repl-default-option-set!
+;; 'prompt
+;; (lambda (repl)
+;; (format #f "\n[~a@~a:~a]\nλ> "
+;; (getenv "USER")
+;; (vector-ref (uname) 1)
+;; (pwd))))
diff --git a/lore/Control/Concurrent/Sima.hs b/com/simatime/sema.hs
index b69c0bb..f0f75da 100644
--- a/lore/Control/Concurrent/Sima.hs
+++ b/com/simatime/sema.hs
@@ -1,4 +1,4 @@
-module Control.Concurrent.Sima
+module Com.Simatime.Sema
( mapPool
)
where
diff --git a/lore/System/Random/Shuffle.hs b/com/simatime/shuffle.hs
index 02cd3e0..02cd3e0 100644
--- a/lore/System/Random/Shuffle.hs
+++ b/com/simatime/shuffle.hs
diff --git a/depo/users.nix b/com/simatime/users.nix
index cd73996..daac9d6 100644
--- a/depo/users.nix
+++ b/com/simatime/users.nix
@@ -1,7 +1,7 @@
{ ... }:
let
- key = f: builtins.readFile (../keys/. + ("/" + f));
+ key = f: builtins.readFile (./keys/. + ("/" + f));
in
{
users = {
diff --git a/depo/nutin-madaj/web.nix b/com/simatime/web.nix
index d6be348..d6be348 100644
--- a/depo/nutin-madaj/web.nix
+++ b/com/simatime/web.nix
diff --git a/depo/nutin-madaj/znc.nix b/com/simatime/znc.nix
index 0449893..bdbe3af 100644
--- a/depo/nutin-madaj/znc.nix
+++ b/com/simatime/znc.nix
@@ -37,7 +37,7 @@ N.B.: generate znc passwords with 'nix-shell -p znc --command "znc --makepass"'
"#guix" = { Detached = true; };
"#haskell" = {};
"#haskell-miso" = { Detached = true; };
- "#hledger" = {}
+ "#hledger" = {};
"#hnix" = { Detached = true; };
"#home-manager" = { Detached = true; };
"#ledger" = {};
diff --git a/default.nix b/default.nix
index b894aa2..55f96e7 100644
--- a/default.nix
+++ b/default.nix
@@ -1,9 +1,59 @@
let
- nixpkgs-tar = builtins.fetchTarball (import ./pack/nixpkgs.nix);
+ nixpkgs-tar = builtins.fetchTarball (import ./nixpkgs.nix);
nixpkgs = import "${nixpkgs-tar}" {};
nixos = import "${nixpkgs-tar}/nixos";
-in
-{
- depo = import ./depo { inherit nixos; };
- pack = import ./pack { inherit nixpkgs; };
+
+ # a common build function
+ #
+ bild = file:
+ with nixpkgs;
+ let
+ pack = import file;
+
+ depsToPackageSet = packageSet: deps:
+ map (s: builtins.getAttr s packageSet) deps;
+
+ ghc844_ = pkgs.haskell.packages.ghc844.override (oldAttrs: {
+ overrides = with pkgs.haskell.lib; self: super: {
+ clay = dontCheck super.clay;
+ };
+ });
+
+ ghc = ghc844_.ghcWithPackages (hp: depsToPackageSet hp
+ # we need hinotify for chip/make
+ ([ "hinotify" ] ++ pack.deps.both ++ pack.deps.apex));
+
+ ghcjs_ = pkgs.haskell.packages.ghcjs.override (oldAttrs: {
+ overrides = with pkgs.haskell.lib; self: super: {
+ clay = dontCheck super.clay;
+ http-types = dontCheck super.http-types;
+ tasty-quickcheck = dontCheck super.tasty-quickcheck;
+ scientific = dontCheck super.scientific; # takes forever
+ servant = dontCheck super.servant;
+ comonad = dontCheck super.comonad;
+ QuickCheck = dontCheck super.QuickCheck;
+ };
+ });
+
+ ghcjs = ghcjs_.ghcWithPackages (hp:
+ depsToPackageSet hp (pack.deps.both ++ pack.deps.aero));
+
+ make = ./chip/make;
+ in stdenv.mkDerivation {
+ name = pack.name;
+ version = "0";
+ src = ../.;
+ nativeBuildInputs = [
+ ghc ghcjs
+ ];
+ strictDeps = true;
+ buildPhase = "${ghc}/bin/runhaskell ${make} ${pack.name}";
+ installPhase = ''
+ mkdir -p $out/bin
+ cp bild/${pack.name} $out/bin/${pack.name}
+ '';
+ };
+in {
+ com.simatime = import ./com/simatime.nix { inherit nixos; };
+ com.influencedbybooks = import ./com/influencedbybooks/default.nix {};
}
diff --git a/depo/default.nix b/depo/default.nix
deleted file mode 100644
index e2c5d6a..0000000
--- a/depo/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ nixos }:
-
-{
- nutin-madaj = import ./nutin-madaj { inherit nixos; };
- hikuj-zupip = import ./hikuj-zupip { inherit nixos; };
-}
diff --git a/depo/hikuj-zupip/default.nix b/depo/hikuj-zupip/default.nix
deleted file mode 100644
index 31de11f..0000000
--- a/depo/hikuj-zupip/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ nixos }:
-
-/*
-
-hidor-kahih - main development/build server. Lives in ben's living room.
-
-*/
-
-nixos {
- system = "x86_64-linux";
- configuration = {
- nixpkgs.overlays = [
- (import ../../pack/overlay.nix)
- ];
-
- imports = [
- ./hardware.nix
- ../users.nix
- ../packages.nix
- ./configuration.nix
- ];
- };
-}
diff --git a/depo/nutin-madaj/default.nix b/depo/nutin-madaj/default.nix
deleted file mode 100644
index 4d9dd02..0000000
--- a/depo/nutin-madaj/default.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{ nixos }:
-
-/*
-
-nutin-madaj - cloud infrastructure server.
-
-This serves the git repo, mailserver, znc bouncer, user sites, and so on.
-
-Currently also used as a catch-all production/staging server, until I get real
-stuff deployed.
-
-*/
-
-let
- nixos-mailserver = builtins.fetchTarball {
- url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.1/nixos-mailserver-v2.2.1.tar.gz";
- sha256 = "03d49v8qnid9g9rha0wg2z6vic06mhp0b049s3whccn1axvs2zzx";
- };
- ibbPort = "3000";
- fathomPort = "3030";
-in
-nixos {
- system = "x86_64-linux";
- configuration = {
- imports = [
- ./hardware-configuration.nix
- ./networking.nix
-
- # common infra
- ../users.nix
- ../packages.nix
-
- # configured modules
- ./git.nix
- ./mail.nix
- ./web.nix
- ./znc.nix
-
- # our custom modules
- #../../mode/ibb.nix
- #../../mode/fathom.nix
-
- # third party
- nixos-mailserver
- ];
-
- nixpkgs.config.allowUnfree = true;
- nixpkgs.overlays = [
- (import ../../pack/overlay.nix)
- ];
-
- programs.mosh = {
- enable = true;
- withUtempter = true;
- };
-
- services.openssh = {
- enable = true;
- passwordAuthentication = false;
- };
-
- security.sudo.wheelNeedsPassword = true;
-
- # our custom apps
- #services = {
- # ibb = {
- # enable = false;
- # port = ibbPort;
- # };
- # # TODO: move this nginx config into mode/ibb.nix
- # nginx.virtualHosts."influencedbybooks.com" = {
- # forceSSL = true;
- # enableACME = true;
- # locations = {
- # "/" = {
- # proxyPass = "http://localhost:${ibbPort}";
- # };
- # };
- # };
- # fathom = {
- # enable = true;
- # port = fathomPort;
- # dataDir = "/var/lib/fathom";
- # };
- # nginx.virtualHosts."stats.simatime.com" = {
- # locations."/".proxyPass = "http://localhost:${fathomPort}";
- # forceSSL = true;
- # enableACME = true;
- # };
- #};
-
- boot.cleanTmpDir = true;
- };
-}
diff --git a/lore/Biz/Ibb.hs b/lore/Biz/Ibb.hs
deleted file mode 100644
index dd99654..0000000
--- a/lore/Biz/Ibb.hs
+++ /dev/null
@@ -1,9 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-
--- | Main app logic
-module Biz.Ibb (
- module X
- ) where
-
-import Biz.Ibb.Core as X
-import Biz.Ibb.Influencers as X
diff --git a/lore/bild.nix b/lore/bild.nix
deleted file mode 100644
index 589fda9..0000000
--- a/lore/bild.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- # a common build function
- #
- # see example usage in pack/ibb.nix. this is not set in stone, obviously. we
- # should figure out how to use overlays, for one.
- #
- bild = file: { nixpkgs }:
- with nixpkgs;
- let
- pack = import file;
-
- depsToPackageSet = packageSet: deps:
- map (s: builtins.getAttr s packageSet) deps;
-
- ghc844_ = pkgs.haskell.packages.ghc844.override (oldAttrs: {
- overrides = with pkgs.haskell.lib; self: super: {
- clay = dontCheck super.clay;
- };
- });
-
- ghc = ghc844_.ghcWithPackages (hp: depsToPackageSet hp
- # we need hinotify for chip/make
- ([ "hinotify" ] ++ pack.deps.both ++ pack.deps.apex));
-
- ghcjs_ = pkgs.haskell.packages.ghcjs.override (oldAttrs: {
- overrides = with pkgs.haskell.lib; self: super: {
- clay = dontCheck super.clay;
- http-types = dontCheck super.http-types;
- tasty-quickcheck = dontCheck super.tasty-quickcheck;
- scientific = dontCheck super.scientific; # takes forever
- servant = dontCheck super.servant;
- comonad = dontCheck super.comonad;
- QuickCheck = dontCheck super.QuickCheck;
- };
- });
-
- ghcjs = ghcjs_.ghcWithPackages (hp:
- depsToPackageSet hp (pack.deps.both ++ pack.deps.aero));
-
- make = ../chip/make;
- in
- stdenv.mkDerivation {
- name = pack.name;
- version = "0";
- src = ../.;
- nativeBuildInputs = [
- ghc ghcjs
- ];
- strictDeps = true;
- buildPhase = "${ghc}/bin/runhaskell ${make} ${pack.name}";
- installPhase = ''
- mkdir -p $out/bin
- cp bild/${pack.name} $out/bin/${pack.name}
- '';
- };
-}
diff --git a/lore/sicp/meta.scm b/lore/sicp/meta.scm
deleted file mode 100644
index 94dc784..0000000
--- a/lore/sicp/meta.scm
+++ /dev/null
@@ -1,20 +0,0 @@
-(define (eval exp env)
- (cond
- ((self-evaluating? exp) exp)
- ((variable? exp) (lookup-variable-value exp env))
- ((quoted? exp) (text-of-quotation exp))
- ((assignment? exp) (eval-assignment exp env))
- ((definition? exp) (eval-definition exp env))
- ((if? exp) (eval-if exp env))
- ((lambda? exp)
- (make-procedure (lambda-parameters exp)
- (lambda-body exp)
- env))
- ((begin? exp)
- (eval-sequence (begin-actions exp) env))
- ((cond? exp) (eval (cond->if exp) env))
- ((application? exp)
- (apply (eval (operator exp) env)
- (list-of-values (operands exp) env)))
- (else
- (error "Unknown expression type -- EVAL" exp))))
diff --git a/lore/sicp/set.scm b/lore/sicp/set.scm
deleted file mode 100644
index 3d60c5c..0000000
--- a/lore/sicp/set.scm
+++ /dev/null
@@ -1,42 +0,0 @@
-;; A set module, based on binary trees (from sicp)
-
-(define (entry tree) (car tree))
-(define (left-branch tree) (cadr tree))
-(define (right-branch tree) (caddr tree))
-
-(define (make-tree entry left right)
- (list entry left right))
-
-(define (element-of-set? x set)
- (cond ((null? set) #f)
- ((= x (entry set)) #t)
- ((< x (entry set))
- (element-of-set? x (left-branch set)))
- ((> x (entry set))
- (element-of-set? x (right-branch set)))))
-
-(define (adjoin-set x set)
- (cond ((null? set) (make-tree x '() '()))
- ((= x (entry set)) set)
- ((< x (entry set))
- (make-tree (entry set)
- (adjoin-set x (left-branch set))
- (right-branch set)))
- ((> x (entry set))
- (make-tree (entry set)
- (left-branch set)
- (adjoin-set x (right-branch set))))))
-
-(define (intersection-set set1 set2)
- (if (or (null? set1) (null? set2))
- '()
- (let ((x1 (car set1))
- (x2 (car set2)))
- (cond ((= x1 x2)
- (cons x1
- (intersection-set (cdr set1)
- (cdr set2))))
- ((< x1 x2)
- (intersection-set (cdr set1) set2))
- ((< x2 x1)
- (intersection-set set1 (cdr set2)))))))
diff --git a/nixpkgs.nix b/nixpkgs.nix
new file mode 100644
index 0000000..5d8dc56
--- /dev/null
+++ b/nixpkgs.nix
@@ -0,0 +1,5 @@
+# generated with ~/bin/nix-pin
+{
+ url = "https://github.com/NixOS/nixpkgs/archive/0715f2f1a9b3a1c15ddf3f7386a6d58c9a1bbe2d.tar.gz";
+ sha256 = "0awm087hnsx0x5phxna5a0cm9ir6m7vha94b0q0zq5lb24clgr6s";
+}
diff --git a/pack/bs.nix b/pack/bs.nix
deleted file mode 100644
index d869dd1..0000000
--- a/pack/bs.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{ nixpkgs }:
-with nixpkgs;
-let
- ghc = pkgs.haskell.packages.ghc844.ghcWithPackages (hp: with hp; [
- hinotify
-
- containers
- directory
- haskeline
- HTTP
- mtl
- optparse-applicative
- parsec
- protolude
- text
- transformers
- wl-pprint-text
- ]);
- entrypoint = "Bs";
-in
-stdenv.mkDerivation rec {
- name = "bs";
- version = "0";
- src = ../.;
- nativeBuildInputs = [
- ghc
- ];
- strictDeps = true;
- buildPhase = ''
- ${ghc}/bin/ghc \
- -iapex -ilore \
- -main-is ${entrypoint} --make apex/${entrypoint}.hs \
- -o bild/${name}
- '';
- installPhase = ''
- mkdir -p $out/bin
- cp bild/${name} $out/bin/${name}
- '';
-}
diff --git a/pack/buildeasy.nix b/pack/buildeasy.nix
deleted file mode 100644
index f5b0963..0000000
--- a/pack/buildeasy.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- # n.b.: 'buildeasy' is already taken by webuildeasy.com. we might want to find
- # another name.
- #
- name = "buildeasy";
- deps = {
- both = [
- "miso"
- "protolude"
- "servant"
- "text"
- ];
- apex = [
- "acid-state"
- "blaze-html"
- "blaze-markup"
- "bytestring"
- "ixset"
- "safecopy"
- "scotty"
- "servant-server"
- "text"
- ];
- aero = [
- "aeson"
- "containers"
- "ghcjs-base"
- ];
- };
-}
diff --git a/pack/cmdwave.nix b/pack/cmdwave.nix
deleted file mode 100644
index a26945c..0000000
--- a/pack/cmdwave.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ nixpkgs }:
-with nixpkgs;
-let
- ghc = pkgs.haskell.packages.ghc844.ghcWithPackages (hp: with hp; [
- hinotify
-
- protolude
- pulse-simple
- ]);
- entrypoint = "Cmdwave";
-in
-stdenv.mkDerivation rec {
- name = "cmdwave";
- version = "0";
- src = ../.;
- nativeBuildInputs = [
- ghc
- ];
- strictDeps = true;
- buildPhase = ''
- ${ghc}/bin/ghc \
- -iapex -ilore \
- -main-is ${entrypoint} --make apex/${entrypoint}.hs \
- -o bild/${name}
- '';
- installPhase = ''
- mkdir -p $out/bin
- cp bild/${name} $out/bin/${name}
- '';
-}
diff --git a/pack/default.nix b/pack/default.nix
deleted file mode 100644
index ece0378..0000000
--- a/pack/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ nixpkgs }:
-
-with import ../lore/bild.nix;
-
-{
- bs = import ./bs.nix { inherit nixpkgs; };
- cmdwave = import ./cmdwave.nix { inherit nixpkgs; };
- duree = import ./duree.nix { inherit nixpkgs; };
- fathom = import ./fathom.nix { inherit nixpkgs; };
- ibb = bild ./ibb.nix { inherit nixpkgs; };
- buildeasy = bild ./buildeasy.nix { inherit nixpkgs; };
-}
diff --git a/pack/duree.nix b/pack/duree.nix
deleted file mode 100644
index 84b82da..0000000
--- a/pack/duree.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ nixpkgs }:
-with nixpkgs;
-let
- ghc = pkgs.haskell.packages.ghc844.ghcWithPackages (hp: with hp; [
- hinotify
-
- mongoDB
- mtl
- protolude
- text
- transformers
- ]);
- entrypoint = "Duree";
-in
-stdenv.mkDerivation rec {
- name = "duree";
- version = "0";
- src = ../.;
- nativeBuildInputs = [
- ghc
- ];
- strictDeps = true;
- buildPhase = ''
- ${ghc}/bin/ghc \
- -iapex -ilore \
- -main-is ${entrypoint} --make apex/${entrypoint}.hs \
- -o bild/${name}
- '';
- installPhase = ''
- mkdir -p $out/bin
- cp bild/${name} $out/bin/${name}
- '';
-}
diff --git a/pack/fathom.nix b/pack/fathom.nix
deleted file mode 100644
index a845eb6..0000000
--- a/pack/fathom.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ nixpkgs }:
-with nixpkgs;
-stdenv.mkDerivation rec {
- name = "fathom-v${version}";
- version = "1.2.1";
- src = builtins.fetchurl {
- url = "https://github.com/usefathom/fathom/releases/download/v${version}/fathom_${version}_linux_amd64.tar.gz";
- sha256 = "0sfpxh2xrvz992k0ynib57zzpcr0ikga60552i14m13wppw836nh";
- };
- sourceRoot = ".";
- dontBuild = true;
- installPhase = ''
- mkdir -p $out/bin
- cp fathom $out/bin
- cp LICENSE $out
- cp README.md $out
- '';
-}
diff --git a/pack/overlay.nix b/pack/overlay.nix
deleted file mode 100644
index b19eeb7..0000000
--- a/pack/overlay.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-self: super:
-
-import ./default.nix { nixpkgs = super; }