Skip to content

Instantly share code, notes, and snippets.

let
devices = [
{ device = "10de:1c82"; slot = "42:00.0"; } # GPU
{ device = "10de:0fb9"; slot = "42:00.1"; } # GPU audio controller
# USB controllers
{ device = "1022:43ba"; slot = "01:00.0"; }
{ device = "1022:145c"; slot = "08:00.3"; }
{ device = "1022:145c"; slot = "43:00.3"; }
];
in {
newtype MonoidComp r m a = MonoidComp { unMonoidComp :: ContT r m a }
deriving (Functor, Applicative, Monad, MonadTrans)
instance (Applicative m, Monoid r) => Alternative (MonoidComp r m) where
empty = MonoidComp $ ContT $ const (pure mempty)
MonoidComp a <|> MonoidComp b =
MonoidComp $ ContT $ \f -> liftA2 (<>) (runContT a f) (runContT b f)
foldMapA :: (Foldable f, Applicative m, Monoid r) => (a -> m r) -> f a -> m r
foldMapA f = foldr (liftA2 (<>) . f) (pure mempty)
#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=channel:nixos-18.09 -i ghci -p "haskellPackages.ghcWithPackages (p: [p.monoidal-containers p.average])"
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MonadComprehensions #-}
import Control.Applicative ( Alternative(..) )
import Control.Monad.Trans.Cont
import Data.Map.Monoidal ( MonoidalMap )
import qualified Data.Map.Monoidal as Map
{ pkgs ? import <nixpkgs> {}
, fetchFromGitHub ? pkgs.fetchFromGitHub
, haskellPackages ? pkgs.haskellPackages
}:
let
amazonka = fetchFromGitHub {
owner = "brendanhay";
repo = "amazonka";
rev = "c9d8a62118b2269fb54b1e89c4e92106e8243050";
diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc
index dbaa971a..3f57673c 100644
--- a/src/hydra-eval-jobs/hydra-eval-jobs.cc
+++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc
@@ -275,7 +275,7 @@ int main(int argc, char * * argv)
/* Prevent access to paths outside of the Nix search path and
to the environment. */
- settings.restrictEval = true;
+ settings.restrictEval = false;
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/jyryri80cww2yvn8sc5jdxcipv4psarz-ghcjs-8.4.0.1.
ignoring (possibly broken) abi-depends field for packages
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/fz1slfzvcsmm21igkpdx2amscqhaxhqr-hspec-core-2.5.4.tar.gz
source root is hspec-core-2.5.4
setting SOURCE_DATE_EPOCH to timestamp 1530508655 of file hspec-core-2.5.4/vendor/Data/Algorithm/Diff.hs
@nix { "action": "setPhase", "phase": "patchPhase" }
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/jyryri80cww2yvn8sc5jdxcipv4psarz-ghcjs-8.4.0.1.
ignoring (possibly broken) abi-depends field for packages
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/gi08dh8pklkyrwcixmnsjp47wclf0h6f-syb-0.7.tar.gz
source root is syb-0.7
setting SOURCE_DATE_EPOCH to timestamp 1488438249 of file syb-0.7/tests/XML.hs
@nix { "action": "setPhase", "phase": "patchPhase" }
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/jyryri80cww2yvn8sc5jdxcipv4psarz-ghcjs-8.4.0.1.
ignoring (possibly broken) abi-depends field for packages
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/sb29xmmv6f1dagzq5mfqn4325m8yn3js-th-abstraction-0.2.8.0.tar.gz
source root is th-abstraction-0.2.8.0
setting SOURCE_DATE_EPOCH to timestamp 1530288203 of file th-abstraction-0.2.8.0/th-abstraction.cabal
@nix { "action": "setPhase", "phase": "patchPhase" }
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/jyryri80cww2yvn8sc5jdxcipv4psarz-ghcjs-8.4.0.1.
ignoring (possibly broken) abi-depends field for packages
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/rw6wianl67igvdka1jrddbsrq3q2kri8-ghcjs-base-01014ad
source root is ghcjs-base-01014ad
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
{ ... }: {
imports = [./myservice.nix];
services.example-hserv.enable = true;
# Normal configuration.nix stuff here...
}