Do the same as the nix-info script, which nix-build
s this file and inspects the exit code.
Short version:
nix-build --no-out-link -E 'import <nixpkgs/pkgs/tools/nix/info/multiuser.nix>' 2> /dev/null
Do the same as the nix-info script, which nix-build
s this file and inspects the exit code.
Short version:
nix-build --no-out-link -E 'import <nixpkgs/pkgs/tools/nix/info/multiuser.nix>' 2> /dev/null
% NIX_PATH=nixpkgs=. /usr/bin/time nix-build --no-link -A duplicity | |
these derivations will be built: | |
/nix/store/73in6wzsqzpsi6k4y4x2qqi3az9rnkff-duplicity-0.7.19.drv | |
building '/nix/store/73in6wzsqzpsi6k4y4x2qqi3az9rnkff-duplicity-0.7.19.drv' on 'ssh://static-haskell-nix-ci'... | |
copying path '/nix/store/75c1irykc5r095djhxhnxrj9r0s0gph7-1359.2.3' from 'https://cache.nixos.org'... | |
copying path '/nix/store/lcckqzhp6khmzb9833frnh47g7fsjgik-1359.2.2' from 'https://cache.nixos.org'... | |
copying path '/nix/store/srgh1frvgvz141rish0pyjn520rgff38-1359.2.1' from 'https://cache.nixos.org'... | |
copying path '/nix/store/q8mapr5b3z26h7hackmnsk3sirjxqcq8-duplicity-0.7.19.tar.gz' from 'https://cache.nixos.org'... | |
copying path '/nix/store/g2za9nam04lpb5h8s7dd0y51r3lg75x6-gnutar-in-test.patch' from 'https://cache.nixos.org'... | |
copying path '/nix/store/ijvka0qiq3c7sk19sgs1mvm49qwpzgpl-python2.7-pyOpenSSL-19.0.0' from 'https://cache.nixos.org'... |
% ./hadrian/build.stack.sh -j --flavour=quickest --verbose | |
| Building Stage1 libraries: binary, Cabal, ghc, ghc-boot, ghc-boot-th, ghc-heap, ghci, hpc, mtl, parsec, template-haskell, text, transformers, terminfo, array, base, bytestring, containers, deepseq, directory, filepath, ghc-compact, ghc-prim, haskeline, integer-gmp, pretty, process, rts, stm, time, xhtml, libiserv, unix | |
| Building Stage1 programs: ghc, ghc-pkg, hp2ps, hsc2hs, unlit, haddock, hpc, ghc-iserv, runghc | |
| Building Stage2 libraries: binary, Cabal, ghc, ghc-boot, ghc-boot-th, ghc-heap, ghci, hpc, mtl, parsec, template-haskell, text, transformers, terminfo, array, base, bytestring, containers, deepseq, directory, filepath, ghc-compact, ghc-prim, haskeline, integer-gmp, pretty, process, rts, stm, time, xhtml, libiserv, unix | |
| Building Stage2 programs: ghc, ghc-pkg, hp2ps, hsc2hs, unlit, haddock, hpc, ghc-iserv, runghc | |
| Building Stage3 libraries: | |
| Building Stage3 programs: |
unpacking source archive /nix/store/cqq2m229cpgms09gcf3a3z07774d36d0-odp-dpdk-1.22.0.0_DPDK_18.11.tar.gz | |
source root is odp-dpdk-1.22.0.0_DPDK_18.11 | |
setting SOURCE_DATE_EPOCH to timestamp 1566561796 of file odp-dpdk-1.22.0.0_DPDK_18.11/test/validation/api/traffic_mngr/traffic_mngr.c | |
patching sources | |
autoreconfPhase | |
autoreconf: Entering directory `.' | |
autoreconf: configure.ac: not using Gettext | |
autoreconf: running: aclocal --force -I m4 | |
autoreconf: configure.ac: tracing | |
autoreconf: running: libtoolize --copy --force |
Usually, when you use ghci
's :reload
or ghc --make
(with -O0
to disable unfoldings which are used for cross-module inlining),
after changing implementation code of functions,
GHC will incrementally recompile only the modules you changed,
making for a fast development experience when iterating on
implementation details.
(When you change API like functions types, export lists, etc.,
module SocketUtils | |
( isPortOpen | |
, simpleSockAddr | |
) where | |
import Data.Word (Word8) | |
import Foreign.C.Error (Errno(..), eCONNREFUSED) | |
import GHC.IO.Exception (IOException(..)) | |
import Network.Socket (PortNumber, socket, connect, close', Family(AF_INET), SocketType(Stream), SockAddr(SockAddrInet), tupleToHostAddress) | |
import UnliftIO.Exception (try, bracket, throwIO) |
{ | |
systemd.services.static-haskell-nix-cachix-push-daemon = { | |
requiredBy = [ "multi-user.target" ]; | |
after = [ | |
"network-online.target" | |
]; | |
environment.HOME = "/root"; | |
path = [ pkgs.nix ]; # cachix shells out to nix binaries | |
serviceConfig = { | |
ExecStart = "${pkgs.cachix}/bin/cachix push static-haskell-nix --watch-store"; |
#!/usr/bin/env bash | |
# Installs NixOS on a Hetzner server, wiping the server. | |
# | |
# This is for a specific server configuration; adjust where needed. | |
# | |
# Prerequisites: | |
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc. | |
# | |
# Usage: |
#!/usr/bin/env bash | |
# Installs NixOS on an OVH server, wiping the server. | |
# | |
# This is for a specific server configuration; adjust where needed. | |
# Originally written for an OVH STOR-1 server. | |
# | |
# Prerequisites: | |
# * Create a LUKS key file at /root/benacofs-luks-key | |
# e.g. by copying it up. |