This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with (import <nixpkgs> {}); | |
derivation { | |
name = "b"; | |
builder = "${bash}/bin/bash"; | |
args = ["-c" "echo 3 > /nix/store/foo; read foo < /nix/store/foo; echo $foo > $out"]; | |
system = "${builtins.currentSystem}"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Downloader where | |
import Control.Monad.IO.Class (liftIO) | |
import Control.Monad.Trans.Resource | |
import qualified Data.ByteString as BS | |
import qualified Data.ByteString.Char8 as C8 | |
import Data.Conduit | |
import qualified Data.Conduit.Binary as CB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file was auto-generated by cabal2nix. Please do NOT edit manually! | |
{ cabal, convertible, exceptions, HDBC, HDBCSqlite3, monadHdbc, mtl | |
, options, text, time, transformers | |
}: | |
cabal.mkDerivation (self: { | |
pname = "scrumgr"; | |
version = "0.1.0.0"; | |
src = ./.; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gcc -c -o cbit.o cbit.c | |
$ ghc -threaded --make ffi.hs cbit.o -rtsopts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{}: # nix-env expects a function | |
let | |
# Get nixpkgs (in configuration.nix, use pkgs for this, but this file is standalone | |
# to test it easier so we have to manually import nixpkgs) | |
pkgs = import <nixpkgs> {}; | |
# First, get the haskell packages from nixpkgs. In configuration.nix, you | |
# can use pkgs.haskellngPackages for this of course. | |
haskellngPackages = pkgs.haskellngPackages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs = import <nixpkgs> {}; | |
haskellNg = nixpkgs.pkgs.haskell-ng; | |
# hopefully temporary, but ghc 7.8 fails because of non-deterministic builds (of GHC) | |
ghc710 = haskellNg.packages.ghc7101; | |
fixedHakyll = ghc710.hakyll.override { inherit (ghc710) mkDerivation; }; | |
pkg = ghc710.callPackage ./. { | |
hakyll = fixedHakyll; | |
}; | |
in nixpkgs.lib.overrideDerivation pkg.env (old:{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SampleData { | |
Container<float> totalradiance; | |
Container<int> lightcutSize; | |
template <class T> | |
struct decl_sampledata_from_container {}; | |
template <template <class, class...> class C, class T> | |
struct decl_sampledata_from_container<C<T>> { | |
typedef SampleData<C> type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QQmlEngine> | |
#include <QObject> | |
#include <QGuiApplication> | |
#include <QQmlComponent> | |
#include <QQmlContext> | |
#include <QQuickWindow> | |
#include <QDebug> | |
class App : public QObject | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nix-instantiate haskell-rethinkdb.nix --indirect --add-root $PWD/shell.drv --show-trace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a function: we take `haskellPackages` as an argument so that it can be overriden, | |
# but supply `nixpkgs.haskellPackages` as a default value if no value is explictly given. | |
{ haskellPackages ? (import <nixpkgs> {}).haskellPackages }: | |
let | |
# Build our own haskell package set with all the packages added that we want | |
myHaskellPackages = haskellPackages.override { | |
# super refers to the "previous" haskell package set (the one we extend) | |
# self refers to the final haskell package set, after our customizations have been |