This is an attempt to install clever-tools in a Nix environment.
nix-env -i -f default.nix
| #!/usr/bin/env nix-shell | |
| #!nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (p: [ p.pandoc p.pretty-show ])" | |
| {-# OPTIONS_GHC -Wall #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| import Control.Monad ((<=<)) | |
| import Control.Monad.IO.Class (liftIO) |
| let pkgs = import nixpkgs (import archive {}).nixpkgsArgs; | |
| src = { | |
| url = https://github.com/input-output-hk/haskell.nix/archive/78f4e25f5c45c135d1798fca423420e8baa7589b.tar.gz; | |
| sha256 = "1348y11ixypqwi0pcsqyx6n2097569x92mpgr7fk33sm2v6imvn3"; | |
| }; | |
| archive = builtins.fetchTarball src; | |
| nixpkgs = fetchTarball { | |
| name = "nixpkgs"; | |
| url = "https://github.com/NixOS/nixpkgs/archive/cac363c661817666e43d047addfaa722610d425f.tar.gz"; | |
| sha256 = "0fi8hgddy8qh2jrsa40jw7jxnr5lrhq2ji6a2xbndllivhzc31kf"; |
| .PHONY: build | |
| build: | |
| nix build -f ci.nix hmacaroons.components.library | |
| .PHONY: test | |
| test: | |
| nix build -f ci.nix --out-link result-tests hmacaroons.components.tests | |
| result-tests/bin/test | |
| .PHONY: doc |
| # nix-env -i -f ./stack2nix.nix | |
| let | |
| inherit (import <nixpkgs> {}) fetchFromGitHub; | |
| nixpkgs = fetchFromGitHub { | |
| owner = "NixOS"; | |
| repo = "nixpkgs-channels"; | |
| # Last revision of haskell-packages before bump of cabal2nix to 2.11 | |
| # and satisfying hpack >=0.29.6 | |
| rev = "78e2045f6d747655062ed2ceee595b878e488488"; | |
| sha256 = "0v9i8x5kh6x09ngzbzizn9cbf939vbsbw3wsa81ba57y3c1z3zj7"; |
This is an attempt to install clever-tools in a Nix environment.
nix-env -i -f default.nix
| -- msgpack-aeson for msgpack instance derived from aeson instances | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| module Servant.MessagePack | |
| ( MessagePack | |
| ) where | |
| import Data.Aeson (FromJSON, ToJSON) |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash -e | |
| NODE_ARCHIVE_REPOSITORY=http://nodejs.org/dist/latest/ | |
| # Move to a temp directory | |
| BUILD_DIR=$(mktemp -t -d "nodejs-installer.XXXXX") | |
| cd $BUILD_DIR | |
| archive=$(curl "${NODE_ARCHIVE_REPOSITORY}SHASUMS.txt" 2>/dev/null | egrep "node-v[0-9.]*.tar.gz" | cut -f3 -d" ") | |
| download_archive="$NODE_ARCHIVE_REPOSITORY$archive" |
| #!/bin/bash | |
| i=0 | |
| IFS=$'\n' | |
| for f in $(find . -iname "*.png" | sort -k2 --field-separator=_) | |
| do | |
| let "i += 1" | |
| number=$(printf "%03d" $i) | |
| convert "${f}" slide_${number}.pdf |
| # http://stackoverflow.com/questions/15393441/obfuscated-c-code-contest-2006-please-explain-sykes2-c | |
| cd $(mktemp -d /tmp/clock.XXXX) | |
| cat > clock.c <<C | |
| main(_){_^448&&main(-~_);putchar(--_%64?32|-~7[__TIME__-_/8%8][">'txiZ^(~z?"-48]>>";;;====~$::199"[_*2&8|_/64]/(_&2?1:8)%8&1:10);} | |
| C | |
| gcc -o clock clock.c |