Skip to content

Instantly share code, notes, and snippets.

nix-build -E 'with import ../nixpkgs {}; callPackage ./default.nix { }'
these derivations will be built:
/nix/store/6ppw4lmzkha061z486pmd14nb9vz4dvv-binary-orphans-0.1.5.1.drv
/nix/store/r6s2bjjr6r48xr5a6fyfwq9m58d8ca3m-rscoin-core-0.1.0.0.drv
/nix/store/yrlh43ljhydwd1q6agj6v9raz5ycw3ba-rscoin-0.1.0.0.drv
building path(s) ‘/nix/store/pqnn16pbdswxi46hzg987xvsz4xvmkkj-binary-orphans-0.1.5.1’
setupCompilerEnvironmentPhase
Build with /nix/store/yjiqzskj826j7frhm4ac5jq65mm7vs1b-ghc-7.10.3.
unpacking sources
unpacking source archive /nix/store/i88gxisf5vj9hxcdpa674vrnfwa4wc1h-binary-orphans-0.1.5.1.tar.gz
from selenium import webdriver
from selenium import selenium
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0
from pyvirtualdisplay import Display
import sys
=========== collect_data.py =============
#! /usr/bin/env nix-shell
#! nix-shell collect_data-environment.nix --command 'python3 collect_data.py'
here is python code
=========== default.nix ==============
with import <nixpkgs> { };
{ config, pkgs, lib, ... } @ args:
#with lib;
let
stateDir = "/var/lib/crawler/";
in
{
users = {
[nix-shell:~/Desktop/projects/fractalide/nixcloud-manual-example]$ cargo install cargo-tree
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling fixedbitset v0.1.5
Compiling gcc v0.3.38
Compiling pkg-config v0.3.8
Compiling strsim v0.5.2
Compiling ordermap v0.2.7
Compiling utf8-ranges v0.1.3
Compiling lazy_static v0.2.2
Compiling bitflags v0.7.0
installing ‘rustc-master-1.15.0-g2e7176f’
these derivations will be built:
/nix/store/9pqpd61larlhyxs91y394rmxqm198car-rustc-master-1.15.0-g2e7176f.drv
building path(s) ‘/nix/store/wzbm64axil5d8rcj5k1fb0b88zaqsrv9-rustc-master-1.15.0-g2e7176f’, ‘/nix/store/x6w6b0n2jrzmkff51a0s8b1jnxrpy1ck-rustc-master-1.15.0-g2e7176f-doc’
unpacking sources
unpacking source archive /nix/store/15vi738iggabplnwgyjcxjv9y6ij2k0d-rust-2e7176f
source root is rust-2e7176f
patching sources
applying patch /nix/store/cf3sgmib4xxczmpd6ailadx9q299wcv4-disable-lockfile-check-master.patch
patching file src/tools/tidy/src/main.rs
fetchUrl git:(master) ✗ nix-build default.nix -A tar-example -k 1 --show-trace
these derivations will be built:
/nix/store/00fz6aizifvkdwppq09yajmddvfdhw8a-getopts.drv
/nix/store/vhw6jc1yvbxf1cpipsajzj03yxbxipc8-libc.drv
/nix/store/dalkgv3agm851123j4d3s77bmlrskkkj-filetime.drv
/nix/store/l2hwysyb8lj62n50bxcl7fx4k89sr47w-xattr.drv
/nix/store/k5r0b405cjffyrhqhh7sq3c1p4mwwpin-tar.drv
/nix/store/sbcr3pyy2a8hjqffdzhvkspy7g08iwy5-tar-example.drv
building path(s) ‘/nix/store/lniqr9y7816fcr94ncwcpwzqxm4n39cl-getopts’
building path(s) ‘/nix/store/jmd1dwfk14z6hlsq8ndbky3cap22vbb9-libc’
➜ fetchUrl git:(master) ✗ nix-build default.nix -A tar-example -k 1 --show-trace ~/Desktop/projects/fractalide/fetchUrl
these derivations will be built:
/nix/store/lhkj0ch74kv4cm479r1gkdc3367n8jr8-tar-example.drv
building path(s) ‘/nix/store/b7m5vmyaj13vyrz2py5qy92c4yl2mgdw-tar-example’
unpacking sources
unpacking source archive /nix/store/3q2yq22lh5shr0w4fxhcw8h1s61p6q9y-src3
source root is src3
patching sources
configuring
no configure script, doing nothing
strace -s 1000 -f -e execve cargo build
execve("/nix/store/f2dq5qhbny7dym75c7ai8fb6kyxlyvy9-cargo-0.12.0/bin/cargo", ["cargo", "build"], [/* 94 vars */]) = 0
execve("/nix/store/f2dq5qhbny7dym75c7ai8fb6kyxlyvy9-cargo-0.12.0/bin/.cargo-wrapped", ["/nix/store/f2dq5qhbny7dym75c7ai8fb6kyxlyvy9-cargo-0.12.0/bin/cargo", "build"], [/* 94 vars */]) = 0
strace: Process 4910 attached
[pid 4910] execve("/nix/store/fff3jbf9vbqhmf6qjrmzhliq516x7yrf-rustc-1.11.0/bin/rustc", ["rustc", "-vV", "--cap-lints", "allow"], [/* 94 vars */]) = 0
strace: Process 4911 attached
[pid 4911] +++ exited with 0 +++
[pid 4910] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4910, si_uid=1000, si_status=0, si_utime=13, si_stime=1} ---
strace: Process 4912 attached
nix-build -A allCrates.tar --show-trace
error: while evaluating the attribute ‘buildPhase’ of the derivation ‘tar’ at /home/joachim/Desktop/projects/fractalide/nixcrates/nix-crates-index/all-carg-packages.nix:21:7:
while evaluating ‘fold’ at /nix/store/frxv73zjk0xkg6c90i9yb07pjfbcvr9z-nixos-16.09.1038.a6728e1/nixos/lib/lists.nix:29:19, called from /home/joachim/Desktop/projects/fractalide/nixcrates/nix-crates-index/all-carg-packages.nix:18:18:
while evaluating ‘fold'’ at /nix/store/frxv73zjk0xkg6c90i9yb07pjfbcvr9z-nixos-16.09.1038.a6728e1/nixos/lib/lists.nix:32:15, called from /nix/store/frxv73zjk0xkg6c90i9yb07pjfbcvr9z-nixos-16.09.1038.a6728e1/nixos/lib/lists.nix:36:8:
while evaluating anonymous function at /home/joachim/Desktop/projects/fractalide/nixcrates/nix-crates-index/all-carg-packages.nix:18:39, called from /nix/store/frxv73zjk0xkg6c90i9yb07pjfbcvr9z-nixos-16.09.1038.a6728e1/nixos/lib/lists.nix:35:14:
while evaluating ‘fold'’ at /nix/store/frxv73zjk0xkg6c90i9yb07pjfbcvr9z-nixos-16.09.1038.a6728e1/nix