I hereby claim:
- I am alexpeits on github.
- I am alexpeits (https://keybase.io/alexpeits) on keybase.
- I have a public key ASAtZxx1hUjLBX9w9TNQcTLX-8Xq1gd6n4YqXtQZ1PKDHAo
To claim this, I am signing this object:
| with import <nixpkgs> {}; | |
| stdenv.mkDerivation { | |
| name = "miranda"; | |
| buildInputs = [ gcc ]; | |
| src = ./.; | |
| configurePhase = '' | |
| make cleanup | |
| patchShebangs quotehostinfo | |
| ''; |
| # to see ghc versions: | |
| # nix-instantiate --eval -E "with import ./nix/nixpkgs.nix {}; lib.attrNames haskell.compiler" | |
| { pkgs ? null, compiler ? null, withHoogle ? true }: | |
| let | |
| nixpkgs = if isNull pkgs then | |
| import (import ./nix/sources.nix).nixos-stable { } | |
| else if builtins.typeOf pkgs == "set" then | |
| pkgs |
| docker run -p 8080:80 mendhak/http-https-echo | |
| curl http://localhost/whatever # works | |
| # in another terminal | |
| export hostmachine="$(docker network inspect --format='{{range .IPAM.Config}}{{.Gateway}}{{end}}' bridge)" | |
| docker run --add-host hostmachine:$hostmachine --net=host -it debian bash | |
| apt-get update && apt-get install -y curl | |
| curl http://hostmachine:8080/whatever # I expect this to work |
| { nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }: | |
| let | |
| inherit (nixpkgs) pkgs; | |
| f = { mkDerivation, base, containers, data-default, directory | |
| , extensible-exceptions, filepath, mtl, process, QuickCheck | |
| , setlocale, stdenv, unix, utf8-string, X11 | |
| }: |
I hereby claim:
To claim this, I am signing this object:
| # Usage: use_nix [...] | |
| # | |
| # Load environment variables from `nix-shell`. | |
| # If you have a `default.nix` or `shell.nix` one of these will be used and | |
| # the derived environment will be stored at ./.direnv/env-<hash> | |
| # and symlink to it will be created at ./.direnv/default. | |
| # Dependencies are added to the GC roots, such that the environment remains persistent. | |
| # | |
| # The resulting environment is cached for better performance. | |
| # |
| ghcid: | |
| ghcid -a --command="stack ghci -- src/**/*.hs" | |
| ghcid-doctest: | |
| ghcid -a --command='stack ghci -- src/**/*.hs' --test ':!stack exec doctest -- --verbose -XOverloadedStrings src/' |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| module LensError where | |
| import Control.Lens | |
| import Control.Monad.Error.Lens | |
| data User | |
| = User |
| {-# LANGUAGE ViewPatterns #-} | |
| {-# LANGUAGE AllowAmbiguousTypes #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DeriveAnyClass #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE DeriveTraversable #-} | |
| {-# LANGUAGE DerivingVia #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE GADTs #-} |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| module ArgsToHList where |