Skip to content

Instantly share code, notes, and snippets.

@melezhik
Created April 13, 2020 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melezhik/48fd3ea8a6944447400562cc4c2e0de9 to your computer and use it in GitHub Desktop.
Save melezhik/48fd3ea8a6944447400562cc4c2e0de9 to your computer and use it in GitHub Desktop.
[scheck@sp6 raku-nix]$ nix-build -A Test-Mock
these derivations will be built:
/nix/store/1ssz0nb390ybgyp03lnjy418kkia8z6i-1130427f4d9f3866fa39e113251bb142d7fa5cc8.tar.gz.drv
/nix/store/aaa3syagm5j8xx6i7b7s8gq95j4w6z0f-OO-Monitors-1.1.1.tar.gz.drv
/nix/store/4qgrf9klz4wjrbsw9cxc6q1d0hz4rhhn-OO-Monitors.drv
/nix/store/j37jljkpzch18j33l97wcrrin5hznx22-Test-Mock.drv
these paths will be fetched (69.98 MiB download, 336.58 MiB unpacked):
/nix/store/0c9izfknmjqgxwlnszi35ps5ds35yfi1-findutils-4.7.0
/nix/store/0w5454az7vwcq60yqvcsv8fs9q7r4zrx-stdenv-linux
/nix/store/1iaxkm0941nj1m4m5g4fxgg4cq5jckf0-bash-4.4-p23
/nix/store/1kn7fi3hhi33jms3113riyzwyn2yqpqd-gcc-wrapper-9.2.0
/nix/store/1ncwrl8bplq3xhmj8pxfkx4y0i90vmnx-glibc-2.30
/nix/store/1xbk0p1djhdd9idc0rvbrdqrms6rhqyv-openssl-1.1.1d-bin
/nix/store/2x7ar74yl8y2x3pkbm6q2n0jh44k752v-curl-7.68.0-dev
/nix/store/4xkqsbg1y70sdjqaby5aqmzlxsipqjc5-stdenv-linux
/nix/store/4z1i0lqkqq0qv3iqdadskagp2dw6w2v4-gzip-1.10
/nix/store/5qjf3xvxqg4bmdcscafizwy2ccl35dy5-ed-1.15
/nix/store/662pxfcxbldq4k00ck53bn33g04ysywk-binutils-wrapper-2.31.1
/nix/store/6gv97caz9j97bgq4kb7wjxs75znzd6bb-glibc-2.30-dev
/nix/store/6nl8cx8amx55lksqrd0adx7jhz33b0y9-bzip2-1.0.6.0.1-bin
/nix/store/7hkiiy4lsi8q8x22z0pm1gi5pjbq85xx-expand-response-params
/nix/store/7mc0rn7ndsaw7vb0lwbsinqxs9wr2m0g-glibc-2.30-bin
/nix/store/7mpmcd0pwrx65ln2jd23y7iw0l7k6w7j-libssh2-1.9.0
/nix/store/8w5nspmli5cqbbp28cn1j28pn0x9mimz-nqp-2020.01
/nix/store/94wdpwy5bxyjg8d2246c052211vsiik8-nghttp2-1.40.0-lib
/nix/store/9bp3kdb7pxa8qra5l0kap2nj5186rqrp-curl-7.68.0
/nix/store/9fg34dq7x05ydjslihy1hdjx2h6dv0am-zlib-1.2.11
/nix/store/9l2zg4lazdld9v3mhcmcmdh0cx0qf753-patchelf-0.9
/nix/store/9mz5gpwmz5jzh1616h22hamf5dn9jhk7-gnutar-1.32
/nix/store/b5sam900j8278388zwirpwap5gw8m4l4-pcre-8.43
/nix/store/c5vr524gzl2klfpgs4vs41iwpnvx5d2p-gcc-9.2.0
/nix/store/dg9wxfplmxvc2xkmgszl27lb6gnrqdpn-curl-7.68.0-bin
/nix/store/dnfhazhfiqsli44v586pl7860j0sc27a-patch-2.7.6
/nix/store/ffi3j388c39qbbskfqg1zw0x2lmbzhnk-binutils-2.31.1
/nix/store/fjb2f08hxwr0rd7fgf6bx5sfinb9q8wg-keyutils-1.6.1-lib
/nix/store/fvyq1sph4436fzz2wcbma7n99m0mw691-openssl-1.1.1d-dev
/nix/store/g1xxad4cs0va3hs6ks3v7l07nyjmlsrk-curl-7.68.0-man
/nix/store/g9317haqh75hj5x05yq6na2y21xcl2a5-gnugrep-3.4
/nix/store/gjzryah1p4q64jxlm1j6xasqwxlc4zqf-c-ares-1.15.0
/nix/store/h0mibl4w9svi6qph27jn3dklq7xpjyc6-attr-2.4.48
/nix/store/hl9dzfry782pk68y9h2cynai089gzg9i-diffutils-3.7
/nix/store/ikp2dbb5cwvr41yvx5anq8cf8ddifz12-gcc-9.2.0-lib
/nix/store/in10rlgp4f881cdyim9sd6cdas2vdijl-linux-headers-5.5
/nix/store/j3anl3dw9f22g711g0y1bdn3hphgd4np-zlib-1.2.11-dev
/nix/store/jl4gamqma690vgncgfrqb9vq0adzna8p-openssl-1.1.1d
/nix/store/k1w8nz9ybzz7bm0ixh6s4n7si7bgnv89-hook
/nix/store/k4bshiz1ilxhqhz8a43kdph12gjwd080-acl-2.2.53
/nix/store/kqxbfj79ijm07dpvvyb0c2hb9lap93db-xz-5.2.4-bin
/nix/store/m0vrg9v683w9zyhgzlfrjjxwhj1iwz15-nghttp2-1.40.0
/nix/store/nnrzyglyi2ibj5hgs7mhabxzgvnxvm25-libkrb5-1.17-dev
/nix/store/q5i8gy1zasqkii4ps8axgmwnk9msr6wm-perl-5.30.1
/nix/store/qgkfw8840m5zn9m6ky53rcg371i33772-mirrors-list
/nix/store/qmgwy76m8p0npy9d5f1c0qvvfnwkgi7y-libkrb5-1.17
/nix/store/r540lhrdmgzccx3q6s55w08bikj7z5lr-gnused-4.8
/nix/store/rij6rw8zf3cc39dasfgbiwjk6s7wbqpi-nghttp2-1.40.0-bin
/nix/store/s6l9v7sjiam1ap194lgyvj02a0d99jrk-bzip2-1.0.6.0.1
/nix/store/sn2fzbavnsb9sfff39ylkd6njfmh9gif-coreutils-8.31
/nix/store/srl4ngnscm7f0zn5s1kfx3g0np9rrmcl-gawk-5.0.1
/nix/store/sv4dcqakhcg3j9lmrzm1r0p7c1zh770d-nghttp2-1.40.0-dev
/nix/store/v7vs6n9yycd2kxj29z20d6r06wmhiwgi-hook
/nix/store/vha92fiqyx728daj1nf2dn55g89i1wpc-gnumake-4.2.1
/nix/store/vsjdfywwgzykdby4992a93jasz9rfnxj-rakudo-2020.01
/nix/store/xbp7mk0a0g8zqmlmp5wrpqsypyp544qm-libssh2-1.9.0-dev
/nix/store/xklg3wg0ankg61ymgmkjdz5ljvxhyzd5-moarvm-2020.01.1
/nix/store/yvsjlr772hagwpdwg9qlsfpdf68wyjmg-xz-5.2.4
/nix/store/zw35hjvjhgky5r0qpgsn8r36vr4d2sjq-libev-4.31
copying path '/nix/store/k1w8nz9ybzz7bm0ixh6s4n7si7bgnv89-hook' from 'https://cache.nixos.org'...
copying path '/nix/store/g1xxad4cs0va3hs6ks3v7l07nyjmlsrk-curl-7.68.0-man' from 'https://cache.nixos.org'...
copying path '/nix/store/1ncwrl8bplq3xhmj8pxfkx4y0i90vmnx-glibc-2.30' from 'https://cache.nixos.org'...
copying path '/nix/store/in10rlgp4f881cdyim9sd6cdas2vdijl-linux-headers-5.5' from 'https://cache.nixos.org'...
copying path '/nix/store/h0mibl4w9svi6qph27jn3dklq7xpjyc6-attr-2.4.48' from 'https://cache.nixos.org'...
copying path '/nix/store/1iaxkm0941nj1m4m5g4fxgg4cq5jckf0-bash-4.4-p23' from 'https://cache.nixos.org'...
copying path '/nix/store/k4bshiz1ilxhqhz8a43kdph12gjwd080-acl-2.2.53' from 'https://cache.nixos.org'...
copying path '/nix/store/s6l9v7sjiam1ap194lgyvj02a0d99jrk-bzip2-1.0.6.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/gjzryah1p4q64jxlm1j6xasqwxlc4zqf-c-ares-1.15.0' from 'https://cache.nixos.org'...
copying path '/nix/store/6nl8cx8amx55lksqrd0adx7jhz33b0y9-bzip2-1.0.6.0.1-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/sn2fzbavnsb9sfff39ylkd6njfmh9gif-coreutils-8.31' from 'https://cache.nixos.org'...
copying path '/nix/store/5qjf3xvxqg4bmdcscafizwy2ccl35dy5-ed-1.15' from 'https://cache.nixos.org'...
copying path '/nix/store/hl9dzfry782pk68y9h2cynai089gzg9i-diffutils-3.7' from 'https://cache.nixos.org'...
copying path '/nix/store/7hkiiy4lsi8q8x22z0pm1gi5pjbq85xx-expand-response-params' from 'https://cache.nixos.org'...
copying path '/nix/store/0c9izfknmjqgxwlnszi35ps5ds35yfi1-findutils-4.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/srl4ngnscm7f0zn5s1kfx3g0np9rrmcl-gawk-5.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/ikp2dbb5cwvr41yvx5anq8cf8ddifz12-gcc-9.2.0-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/7mc0rn7ndsaw7vb0lwbsinqxs9wr2m0g-glibc-2.30-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/vha92fiqyx728daj1nf2dn55g89i1wpc-gnumake-4.2.1' from 'https://cache.nixos.org'...
copying path '/nix/store/6gv97caz9j97bgq4kb7wjxs75znzd6bb-glibc-2.30-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/r540lhrdmgzccx3q6s55w08bikj7z5lr-gnused-4.8' from 'https://cache.nixos.org'...
copying path '/nix/store/9mz5gpwmz5jzh1616h22hamf5dn9jhk7-gnutar-1.32' from 'https://cache.nixos.org'...
copying path '/nix/store/4z1i0lqkqq0qv3iqdadskagp2dw6w2v4-gzip-1.10' from 'https://cache.nixos.org'...
copying path '/nix/store/v7vs6n9yycd2kxj29z20d6r06wmhiwgi-hook' from 'https://cache.nixos.org'...
copying path '/nix/store/fjb2f08hxwr0rd7fgf6bx5sfinb9q8wg-keyutils-1.6.1-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/zw35hjvjhgky5r0qpgsn8r36vr4d2sjq-libev-4.31' from 'https://cache.nixos.org'...
copying path '/nix/store/qmgwy76m8p0npy9d5f1c0qvvfnwkgi7y-libkrb5-1.17' from 'https://cache.nixos.org'...
copying path '/nix/store/qgkfw8840m5zn9m6ky53rcg371i33772-mirrors-list' from 'https://cache.nixos.org'...
copying path '/nix/store/nnrzyglyi2ibj5hgs7mhabxzgvnxvm25-libkrb5-1.17-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/m0vrg9v683w9zyhgzlfrjjxwhj1iwz15-nghttp2-1.40.0' from 'https://cache.nixos.org'...
copying path '/nix/store/94wdpwy5bxyjg8d2246c052211vsiik8-nghttp2-1.40.0-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/jl4gamqma690vgncgfrqb9vq0adzna8p-openssl-1.1.1d' from 'https://cache.nixos.org'...
copying path '/nix/store/dnfhazhfiqsli44v586pl7860j0sc27a-patch-2.7.6' from 'https://cache.nixos.org'...
copying path '/nix/store/1xbk0p1djhdd9idc0rvbrdqrms6rhqyv-openssl-1.1.1d-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/9l2zg4lazdld9v3mhcmcmdh0cx0qf753-patchelf-0.9' from 'https://cache.nixos.org'...
copying path '/nix/store/fvyq1sph4436fzz2wcbma7n99m0mw691-openssl-1.1.1d-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/b5sam900j8278388zwirpwap5gw8m4l4-pcre-8.43' from 'https://cache.nixos.org'...
copying path '/nix/store/q5i8gy1zasqkii4ps8axgmwnk9msr6wm-perl-5.30.1' from 'https://cache.nixos.org'...
copying path '/nix/store/g9317haqh75hj5x05yq6na2y21xcl2a5-gnugrep-3.4' from 'https://cache.nixos.org'...
copying path '/nix/store/xklg3wg0ankg61ymgmkjdz5ljvxhyzd5-moarvm-2020.01.1' from 'https://cache.nixos.org'...
copying path '/nix/store/yvsjlr772hagwpdwg9qlsfpdf68wyjmg-xz-5.2.4' from 'https://cache.nixos.org'...
copying path '/nix/store/8w5nspmli5cqbbp28cn1j28pn0x9mimz-nqp-2020.01' from 'https://cache.nixos.org'...
copying path '/nix/store/kqxbfj79ijm07dpvvyb0c2hb9lap93db-xz-5.2.4-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/9fg34dq7x05ydjslihy1hdjx2h6dv0am-zlib-1.2.11' from 'https://cache.nixos.org'...
copying path '/nix/store/4xkqsbg1y70sdjqaby5aqmzlxsipqjc5-stdenv-linux' from 'https://cache.nixos.org'...
copying path '/nix/store/ffi3j388c39qbbskfqg1zw0x2lmbzhnk-binutils-2.31.1' from 'https://cache.nixos.org'...
copying path '/nix/store/c5vr524gzl2klfpgs4vs41iwpnvx5d2p-gcc-9.2.0' from 'https://cache.nixos.org'...
copying path '/nix/store/662pxfcxbldq4k00ck53bn33g04ysywk-binutils-wrapper-2.31.1' from 'https://cache.nixos.org'...
copying path '/nix/store/7mpmcd0pwrx65ln2jd23y7iw0l7k6w7j-libssh2-1.9.0' from 'https://cache.nixos.org'...
copying path '/nix/store/1kn7fi3hhi33jms3113riyzwyn2yqpqd-gcc-wrapper-9.2.0' from 'https://cache.nixos.org'...
copying path '/nix/store/9bp3kdb7pxa8qra5l0kap2nj5186rqrp-curl-7.68.0' from 'https://cache.nixos.org'...
copying path '/nix/store/xbp7mk0a0g8zqmlmp5wrpqsypyp544qm-libssh2-1.9.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/dg9wxfplmxvc2xkmgszl27lb6gnrqdpn-curl-7.68.0-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/rij6rw8zf3cc39dasfgbiwjk6s7wbqpi-nghttp2-1.40.0-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/vsjdfywwgzykdby4992a93jasz9rfnxj-rakudo-2020.01' from 'https://cache.nixos.org'...
copying path '/nix/store/sv4dcqakhcg3j9lmrzm1r0p7c1zh770d-nghttp2-1.40.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/0w5454az7vwcq60yqvcsv8fs9q7r4zrx-stdenv-linux' from 'https://cache.nixos.org'...
copying path '/nix/store/j3anl3dw9f22g711g0y1bdn3hphgd4np-zlib-1.2.11-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/2x7ar74yl8y2x3pkbm6q2n0jh44k752v-curl-7.68.0-dev' from 'https://cache.nixos.org'...
building '/nix/store/1ssz0nb390ybgyp03lnjy418kkia8z6i-1130427f4d9f3866fa39e113251bb142d7fa5cc8.tar.gz.drv'...
warning: archives from GitHub revisions should use fetchFromGitHub
trying https://github.com/jnthn/test-mock/archive/1130427f4d9f3866fa39e113251bb142d7fa5cc8.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 157 100 157 0 0 673 0 --:--:-- --:--:-- --:--:-- 673
100 5994 0 5994 0 0 10352 0 --:--:-- --:--:-- --:--:-- 10352
building '/nix/store/aaa3syagm5j8xx6i7b7s8gq95j4w6z0f-OO-Monitors-1.1.1.tar.gz.drv'...
trying https://www.cpan.org/authors/id/J/JN/JNTHN/Perl6/OO-Monitors-1.1.1.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3950 100 3950 0 0 35909 0 --:--:-- --:--:-- --:--:-- 35909
building '/nix/store/4qgrf9klz4wjrbsw9cxc6q1d0hz4rhhn-OO-Monitors.drv'...
unpacking sources
unpacking source archive /nix/store/9pnylivg3k48w9y91ni509rszqpxrz7q-OO-Monitors-1.1.1.tar.gz
source root is OO-Monitors
setting SOURCE_DATE_EPOCH to timestamp 1578503055 of file OO-Monitors/t/precomp.t
preInstallPhase
installing
postInstallPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/27bcgyyapk8nibkrpx5nlpvq55dnisf8-OO-Monitors
strip is /nix/store/ffi3j388c39qbbskfqg1zw0x2lmbzhnk-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/27bcgyyapk8nibkrpx5nlpvq55dnisf8-OO-Monitors/bin
patching script interpreter paths in /nix/store/27bcgyyapk8nibkrpx5nlpvq55dnisf8-OO-Monitors
checking for references to /tmp/nix-build-OO-Monitors.drv-0/ in /nix/store/27bcgyyapk8nibkrpx5nlpvq55dnisf8-OO-Monitors...
building '/nix/store/j37jljkpzch18j33l97wcrrin5hznx22-Test-Mock.drv'...
unpacking sources
unpacking source archive /nix/store/8rf9cd5i5g1zkxavzipz5lk3rcjclc8r-1130427f4d9f3866fa39e113251bb142d7fa5cc8.tar.gz
source root is test-mock-1130427f4d9f3866fa39e113251bb142d7fa5cc8
setting SOURCE_DATE_EPOCH to timestamp 1562841969 of file test-mock-1130427f4d9f3866fa39e113251bb142d7fa5cc8/t/with.t
preInstallPhase
installing
postInstallPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/14p68llhai20xh2673pk2gq5cacccycy-Test-Mock
strip is /nix/store/ffi3j388c39qbbskfqg1zw0x2lmbzhnk-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/14p68llhai20xh2673pk2gq5cacccycy-Test-Mock/bin
patching script interpreter paths in /nix/store/14p68llhai20xh2673pk2gq5cacccycy-Test-Mock
checking for references to /tmp/nix-build-Test-Mock.drv-0/ in /nix/store/14p68llhai20xh2673pk2gq5cacccycy-Test-Mock...
/nix/store/14p68llhai20xh2673pk2gq5cacccycy-Test-Mock
[scheck@sp6 raku-nix]$ nix-env -iA Test-Mock
error: attribute 'Test-Mock' in selection path 'Test-Mock' not found
@melezhik
Copy link
Author

[scheck@sp6 raku-nix]$ nix-env -f . -iA Test-Mock
installing 'Test-Mock'
building '/nix/store/i8iwq02rm741ga27g6lgjclk0m501fim-user-environment.drv'...
created 26 symlinks in user environment
[scheck@sp6 raku-nix]$ perl6 -MTest::Mork
===SORRY!===
Could not find Test::Mork at line 1 in:
inst#/home/scheck/.perl6
inst#/opt/rakudo-pkg/share/perl6/site
inst#/opt/rakudo-pkg/share/perl6/vendor
inst#/opt/rakudo-pkg/share/perl6/core
ap#
nqp#
perl5#

@melezhik
Copy link
Author

[scheck@sp6 raku-nix]$ git pull
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 3), reused 5 (delta 3), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/chloekek/raku-nix
bd99dff..2882095 master -> origin/master
Updating bd99dff..2882095
Fast-forward
default.nix | 3 ++-
tools/rakuWithPackages.nix | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 tools/rakuWithPackages.nix
[scheck@sp6 raku-nix]$ nix-shell -p 'rakuWithPackages (p: [ p.Test-Mock ])' --run perl6
error: undefined variable 'rakuWithPackages' at (string):1:94
(use '--show-trace' to show detailed location information)

@melezhik
Copy link
Author

[scheck@sp6 raku-nix]$ nix-shell -p '(import ./. {}). rakuWithPackages (p: [ p.Test-Mock ])' --run perl6
You may want to zef install Readline or zef install Linenoise or use rlwrap for a line editor

To exit type 'exit' or '^D'

@melezhik
Copy link
Author

[scheck@sp6 raku-nix]$ nix-env -f . -iA zef
installing 'zef'
building '/nix/store/0y970pafw5c7rs7gl20zcb5177nb6bz4-user-environment.drv'...
error: packages '/nix/store/n2530yqbc9zx5jvw545ldzj315r4m8ii-zef/PERL6LIB' and '/nix/store/14p68llhai20xh2673pk2gq5cacccycy-Test-Mock/PERL6LIB' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)
builder for '/nix/store/0y970pafw5c7rs7gl20zcb5177nb6bz4-user-environment.drv' failed with exit code 1
error: build of '/nix/store/0y970pafw5c7rs7gl20zcb5177nb6bz4-user-environment.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment