Skip to content

Instantly share code, notes, and snippets.

View savannidgerinel's full-sized avatar

Savanni D'Gerinel savannidgerinel

View GitHub Profile
@savannidgerinel
savannidgerinel / lua.nix
Created July 14, 2016 05:27
nixos lua shell with packages
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "lua-env";
env = buildEnv { name = name; paths = buildInputs; };
buildInputs = [ lua5_2 lua52Packages.luasocket lua52Packages.luasec lua52Packages.cjson ];
}
@savannidgerinel
savannidgerinel / shell.nix
Last active September 14, 2016 23:56
terraform build
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
terraform = import nix-deps/terraform.nix {};
in stdenv.mkDerivation {
name = "v2-devops";
buildInputs = [ pkgs.ansible2 terraform ];
}
module Control.Monad.Eff.Class where
import Control.Category (id)
import Control.Monad (class Monad)
import Control.Monad.Eff (Eff)
-- | The `MonadEff` class captures those monads which support native effects.
-- |
-- | Instances are provided for `Eff` itself, and the standard monad
-- | transformers.
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv }:
let
packageName = "libsysconfcpus-0.5.tar.gz";
packageUri = "http://www.kev.pulo.com.au/libsysconfcpus/files/libsysconfcpus-0.5.tar.gz";
checksum = "f438d4068fdc4377dae210fa1f06c74ae248795cd053f974445e1d4025903036";
in stdenv.mkDerivation rec {
name = "sysconfcpus-${version}";
version = "0.5";
installing ‘zoom-us’
these derivations will be built:
/nix/store/qblgw2kxcazx7h4rsz19pn8ln83g3njs-icu4c-57.1.drv
/nix/store/mf8gv76g7jrwnnq2zm9kb255vxn3ys8r-zoom-us.drv
building path(s) ‘/nix/store/72mrvyndkzl77z27hqfld5bgxl9lq3iq-icu4c-57.1-dev’, ‘/nix/store/zhl2y48ymqj7mj3w2q3zqy378y9lcxrf-icu4c-57.1’
unpacking sources
unpacking source archive /nix/store/w66p9wkr42ns1kizd698sh64sd6x4awy-icu4c-54_1-src.tgz
source root is icu
...
@savannidgerinel
savannidgerinel / purescript.nix
Created February 4, 2017 00:40
A .nix file for building whatever version of purescript you want from the github releases
{ env, pkgs, ghc }:
let
pname = "purescript";
pversion = "0.10.3";
url = "https://github.com/purescript/purescript/archive/v${pversion}.tar.gz";
sha256 = "46c3f695ccc6e7be3cb2afe1ea9586eafdf51a04f1d40fe7240def0d8693ca68";
in env.mkDerivation rec {
name = pname;
version = pversion;
Prelude ...> t <- forkIO $ catch (catchError (threadDelay 10000000 >> putStrLn "thread finished") (\err -> putStrLn $ "error detected: " <> show err)) (\(err :: AsyncException) -> putStrLn $ "async exception" <> show err)
Prelude ...> killThread t
asynPrelude ...> c exceptionthread killed
Prelude ...>
savanni@lapis:~/src/nixpkgs (master)* $ heroku apps
Usage: heroku COMMAND [--app APP] [command-specific-options]
Help topics, type "heroku help TOPIC" for more details:
heroku access # CLI to manage access in Heroku Applications
heroku addons # manage add-ons
heroku apps # manage apps
heroku auth # authentication (login/logout)
heroku buildpacks # manage the buildpacks for an app
@savannidgerinel
savannidgerinel / default.nix
Created September 12, 2017 02:20
Problems getting a system dependency into a haskell nix derivation
{ pkgs ? import <nixos> {}
, compiler ? "ghc7103"
, libstatgrab ? pkgs.libstatgrab
, zlib ? pkgs.zlib
}:
let
systemstats = pkgs.haskell.packages.${compiler}.callPackage ./systemstats.nix { libstatgrab = libstatgrab; };
in pkgs.stdenv.mkDerivation rec {
name = "systemstats";
version = "0.2.0";
@savannidgerinel
savannidgerinel / diff
Last active September 13, 2017 14:03
Failure on `nix-shell -p nox --run "nox-review wip"`
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index d3b4068319..4a227436d0 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -178206,7 +178206,7 @@ self: {
}) {applicative = null;};
"statgrab" = callPackage
- ({ mkDerivation, async, base, bytestring, statgrab, time
+ ({ mkDerivation, async, base, bytestring, libstatgrab, time