Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

niv: reduce the closure size when using the executable #80644

Closed
wants to merge 1 commit into from

Conversation

knl
Copy link
Contributor

@knl knl commented Feb 20, 2020

Motivation for this change

As the most intended use for the tool is in the CLI, we should only get
the executable with a small closure size.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

As the most intended use for the tool is in the CLI, we should only get
the executable with a small closure size.
@andir
Copy link
Member

andir commented Feb 20, 2020

@GrahamcOfBorg build niv

@andir
Copy link
Member

andir commented Feb 20, 2020

I don't see any improvement when following this PR. The size is the same.

(this-branch) $ nix path-info -rSh $(nix-build -A niv.bin --no-out-link) | sort -hk2
/nix/store/mxaxvp33wg9sim8qh2kkw041v492bvxj-libunistring-0.9.10    1.6M
/nix/store/hjng28vbd73qq9iz9j8r397x19aa8fp9-libidn2-2.3.0          1.8M
/nix/store/1ncwrl8bplq3xhmj8pxfkx4y0i90vmnx-glibc-2.30            31.4M
/nix/store/9fg34dq7x05ydjslihy1hdjx2h6dv0am-zlib-1.2.11           31.5M
/nix/store/phwyg24nm8z4r91iyrhmdfljxpw1ihd5-libffi-3.3            31.5M
/nix/store/ikp2dbb5cwvr41yvx5anq8cf8ddifz12-gcc-9.2.0-lib         37.4M
/nix/store/r05vk4zq34sps98izq4v4n9h7m1a6wgx-gmp-6.2.0             38.1M
/nix/store/50ydwsflrs3kpi4482c5nhkmc59vzc7i-niv-0.2.13-bin        43.7M
(master) $  nix path-info -rSh $(nix-build -A niv.bin --no-out-link) | sort -hk2
/nix/store/mxaxvp33wg9sim8qh2kkw041v492bvxj-libunistring-0.9.10    1.6M
/nix/store/hjng28vbd73qq9iz9j8r397x19aa8fp9-libidn2-2.3.0          1.8M
/nix/store/1ncwrl8bplq3xhmj8pxfkx4y0i90vmnx-glibc-2.30            31.4M
/nix/store/9fg34dq7x05ydjslihy1hdjx2h6dv0am-zlib-1.2.11           31.5M
/nix/store/phwyg24nm8z4r91iyrhmdfljxpw1ihd5-libffi-3.3            31.5M
/nix/store/ikp2dbb5cwvr41yvx5anq8cf8ddifz12-gcc-9.2.0-lib         37.4M
/nix/store/r05vk4zq34sps98izq4v4n9h7m1a6wgx-gmp-6.2.0             38.1M
/nix/store/8c7y6v1s5b0x0i7irnfi6q7xgsylzfpx-niv-0.2.13-bin        43.7M

@nmattia
Copy link
Contributor

nmattia commented Feb 21, 2020

@knl could it be that you were downloading all build dependencies, so that the executable could be built by nix on your machine? It doesn't appear to be present in cache.nixos.org.

Note: I've updated the installation instructions for using niv's cache.

@doronbehar
Copy link
Contributor

I can testify that these are the dependencies I had downloaded when using the command at the installation instructions:

$  nix-env -iA niv -f https://github.com/nmattia/niv/tarball/master \                                                                                                                                                                                                        
    --substituters https://niv.cachix.org \
    --trusted-public-keys niv.cachix.org-1:X32PCg2e/zAm3/uD1ScqW2z/K0LtDyNV7RdaxIuLgQM=
unpacking 'https://github.com/nmattia/niv/tarball/master'...
unpacking 'https://github.com/NixOS/nixpkgs-channels/archive/d85e435b7bded2596d7b201bcd938c94d8a921c1.tar.gz'...
copying path '/nix/store/nl67flma20ixa0x5jms4wk0yfbx4c9wb-glibc-locales-2.27' from 'https://niv.cachix.org'...
copying path '/nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-glibc-2.27' from 'https://niv.cachix.org'...
copying path '/nix/store/kaifg8ak63mlp4vqkmhjzmgdi1rlclmn-busybox-1.30.1' from 'https://niv.cachix.org'...
copying path '/nix/store/yyajx0z2rs0l616hpfm33c1xh0hj030i-nix-2.3-man' from 'https://niv.cachix.org'...
copying path '/nix/store/7b8lz2ji8rjpkjw0yrhjmgvgnnrmz6aj-aws-c-common-0.3.11' from 'https://niv.cachix.org'...
copying path '/nix/store/b3vajivl1gvq1c2p1x62672sqg8f983l-linux-headers-4.19.16' from 'https://niv.cachix.org'...
copying path '/nix/store/0i5kq2dxrhmgyk6kwa9zhfq50rdh86kq-perl5.30.0-Encode-Locale-1.05' from 'https://niv.cachix.org'...
copying path '/nix/store/m8z0nmvjdbh4v8gbdsg6vpz3l2x48bk5-apr-1.6.5' from 'https://niv.cachix.org'...
copying path '/nix/store/057wiyqv8pcl7l1ip23hym74hv5zx2cd-attr-2.4.48' from 'https://niv.cachix.org'...
copying path '/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23' from 'https://niv.cachix.org'...
copying path '/nix/store/i1riv0g9gf68vv858zrslpcfy6axh5zk-brotli-1.0.7-lib' from 'https://niv.cachix.org'...
copying path '/nix/store/0ykbl0k34cfh80gvawqy5f8v1yq7pph8-bzip2-1.0.6.0.1' from 'https://niv.cachix.org'...
copying path '/nix/store/aygarb80042l1mgmphklrdy8b97s427m-acl-2.2.53' from 'https://niv.cachix.org'...
copying path '/nix/store/hrmq351pfvplzmnf8pjmpb6gpxl4cm9x-ed-1.15' from 'https://niv.cachix.org'...
copying path '/nix/store/874b5h0w4cmaddlw7s35y5x0lcc78rqw-editline-1.16.1' from 'https://niv.cachix.org'...
copying path '/nix/store/iws7dm1jij4lv09mbpwf9i8lc1d4b798-bzip2-1.0.6.0.1-bin' from 'https://niv.cachix.org'...
copying path '/nix/store/9v78r3afqy9xn9zwdj9wfys6sk3vc01d-coreutils-8.31' from 'https://niv.cachix.org'...
copying path '/nix/store/fnf2nw5wcdlj4hhy7ypf0n9x9b3cf55p-expand-response-params' from 'https://niv.cachix.org'...
copying path '/nix/store/lp6xmsg44yflzd3rv2qc4dc0m9y0qr2n-expat-2.2.7' from 'https://niv.cachix.org'...
copying path '/nix/store/84yafwjc6sga23vwsbahhymikjhfbnw4-gawk-5.0.1' from 'https://niv.cachix.org'...
copying path '/nix/store/784rh7jrfhagbkydjfrv68h9x3g4gqmk-gcc-8.3.0-lib' from 'https://niv.cachix.org'...
copying path '/nix/store/x1knb266ap696kmi01kp3dl5pii83f84-gdbm-1.18.1' from 'https://niv.cachix.org'...
copying path '/nix/store/hblpx8x5w88igmwa4ydnsnb65s363lji-glibc-2.27-bin' from 'https://niv.cachix.org'...
copying path '/nix/store/r9zdvn0srvnfs4dfy3r6kzq5378ylh6b-gnum4-1.4.18' from 'https://niv.cachix.org'...
copying path '/nix/store/cvqcd6pprjrcaqkjk7bgb44c0w7l48h1-cvs-1.12.13' from 'https://niv.cachix.org'...
copying path '/nix/store/gfmcqjcdira110ds9817vgi33amdan47-boehm-gc-8.0.4' from 'https://niv.cachix.org'...
copying path '/nix/store/zd8jjp4bh4i91akf9w8kknarljcq56d4-bison-3.4.2' from 'https://niv.cachix.org'...
copying path '/nix/store/0njxg9x97yawxjnvnzdj8d5zy4zdidx3-db-4.8.30' from 'https://niv.cachix.org'...
copying path '/nix/store/ahlyjl9zzrfiksgrmibjpcy2akm8l35c-db-5.3.28' from 'https://niv.cachix.org'...
copying path '/nix/store/dys98skw6ifw5qsqrhjxjjiydyfbg3nq-diffutils-3.7' from 'https://niv.cachix.org'...
copying path '/nix/store/0zdsw4qdrwi41mfdwqpxknsvk9fz3gkb-findutils-4.7.0' from 'https://niv.cachix.org'...
copying path '/nix/store/38ifpki7l2hqlxazzzfs83lkksicg5pr-gettext-0.19.8.1' from 'https://niv.cachix.org'...
copying path '/nix/store/jk3nrdm3jd67i897db9dcpam75gh3iw6-glibc-2.27-dev' from 'https://niv.cachix.org'...
copying path '/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2' from 'https://niv.cachix.org'...
copying path '/nix/store/j8fq1ksp37w88rx80blzazldi17f3x7s-gnumake-4.2.1' from 'https://niv.cachix.org'...
copying path '/nix/store/g2h4491kab7l06v9rf1lnyjvzdwy5ak0-gnused-4.7' from 'https://niv.cachix.org'...
copying path '/nix/store/aawf0q16ql39w2gwv52qyjfzgbg5f22r-gnutar-1.32' from 'https://niv.cachix.org'...
copying path '/nix/store/afyqk8219zfv5and3pqahzvn6bpmx3dq-gzip-1.10' from 'https://niv.cachix.org'...
copying path '/nix/store/4f2k49d8lsac9hhhrvy2a1n4pja26rfw-keyutils-1.6-lib' from 'https://niv.cachix.org'...
copying path '/nix/store/13k46bsrkqczmy5vxsqbvvs58jkmha9z-libffi-3.2.1' from 'https://niv.cachix.org'...
copying path '/nix/store/6m8d84rh07sblawwi6haiws2brw4x4sq-libseccomp-2.4.1-lib' from 'https://niv.cachix.org'...
copying path '/nix/store/sy8rr4xnbc1b3607v8k56dkv5i4m7v50-libsodium-1.0.18' from 'https://niv.cachix.org'...
copying path '/nix/store/2n2swd4l9v61rahiri6ihnrhmbqr9jps-libtool-2.4.6-lib' from 'https://niv.cachix.org'...
copying path '/nix/store/nrzlhdwa30rds6znsvd11y6d26rb716p-libffi-3.2.1-dev' from 'https://niv.cachix.org'...
copying path '/nix/store/j2q7fmj0b30yi2fydc10r58l3sjig6k8-libkrb5-1.17' from 'https://niv.cachix.org'...
copying path '/nix/store/3gxrhrp1g4f48pm198bmlsbj63r8266h-lz4-1.9.1' from 'https://niv.cachix.org'...
copying path '/nix/store/my5v4x1n5568vgziyc63vmc97nk8ril9-ncurses-6.1-20190112' from 'https://niv.cachix.org'...
copying path '/nix/store/f8nmpjl11z2p03lj5q656xvvilws62xp-nghttp2-1.39.2-lib' from 'https://niv.cachix.org'...
copying path '/nix/store/z9vsvmll45kjdf7j9h0vlxjjya6yxgc0-openssl-1.1.1d' from 'https://niv.cachix.org'...
copying path '/nix/store/lmi2nqb1cfzr3ps2zkq97q88zzkhp4mj-patch-2.7.6' from 'https://niv.cachix.org'...
copying path '/nix/store/2xwxj5qrrc71asdk1wyq19nz9k845pzs-patchelf-0.9' from 'https://niv.cachix.org'...
copying path '/nix/store/mxnvr0yx4q59v2ych4kfbcafjpaypr8f-libedit-20190324-3.1' from 'https://niv.cachix.org'...
copying path '/nix/store/6p4kq0v91y90jv5zqb4gri38c47wxglj-pcre-8.43' from 'https://niv.cachix.org'...
copying path '/nix/store/5fl2v3sbb1pz4k36kv4jnina9azfg1w5-pcre2-10.33' from 'https://niv.cachix.org'...
copying path '/nix/store/j348rf6qgdm47a690pjv7bbryg48idna-cyrus-sasl-2.1.27' from 'https://niv.cachix.org'...
copying path '/nix/store/q9g7sjgicn2hl64c21c8w4h5c0sxjb0w-perl-5.30.0' from 'https://niv.cachix.org'...
copying path '/nix/store/j1pn21aih983xw57999agx4avhq3a7hx-perl5.30.0-FCGI-0.78' from 'https://niv.cachix.org'...
copying path '/nix/store/jdpck40sn7rgxf7pgamdpp3qkg2c1fx9-perl5.30.0-FCGI-ProcManager-0.28' from 'https://niv.cachix.org'...
copying path '/nix/store/71y5ddyz8vmsw9wgi3gzifcls53r60i9-gnugrep-3.3' from 'https://niv.cachix.org'...
copying path '/nix/store/lclx22y4isyy1zmg56wg7kbfvcz3ixi5-openldap-2.4.48' from 'https://niv.cachix.org'...
copying path '/nix/store/hb7pyhg7v4vfgb8i69cwr2p7vxr4083v-perl5.30.0-HTML-TagCloud-0.38' from 'https://niv.cachix.org'...
copying path '/nix/store/g3vdr8rssj8ycg5a305yx44a0hdcm9dv-perl5.30.0-HTML-Tagset-3.20' from 'https://niv.cachix.org'...
copying path '/nix/store/w1bzd9s35hrnjbdwr1ipbsl6kvfsqslq-perl5.30.0-HTTP-Date-6.02' from 'https://niv.cachix.org'...
copying path '/nix/store/f0nkbva2y5v4rc15b84przmvzyhxslf6-perl5.30.0-IO-HTML-1.001' from 'https://niv.cachix.org'...
copying path '/nix/store/5g544fr827f5s91giwj44p8nk4713xpy-perl5.30.0-LWP-MediaTypes-6.04' from 'https://niv.cachix.org'...
copying path '/nix/store/9lycx4gijx90j3rfna6g58nj2lzjj2xh-perl5.30.0-HTML-Parser-3.72' from 'https://niv.cachix.org'...
copying path '/nix/store/pkk22dhw5xjnrd19xjdb5gpbgwfrhrkj-perl5.30.0-File-Listing-6.04' from 'https://niv.cachix.org'...
copying path '/nix/store/1b17s3mpisjjiwaaibi7ii6mp2in0nxy-apr-util-1.6.1' from 'https://niv.cachix.org'...
copying path '/nix/store/w5r2djpawn71cj51gllrdx8yx6sbfzap-perl5.30.0-TermReadKey-2.38' from 'https://niv.cachix.org'...
copying path '/nix/store/3qfhgyj5sy2a2b3d0afr0j8ia2mhzc5b-perl5.30.0-Test-Needs-0.002006' from 'https://niv.cachix.org'...
copying path '/nix/store/77a3r3hnmrvypyh3fsk2yxkjnsaslk0r-perl5.30.0-Test-RequiresInternet-0.05' from 'https://niv.cachix.org'...
copying path '/nix/store/f71qkjrkqdv96s33sg194i68iav5v7p1-perl5.30.0-Try-Tiny-0.30' from 'https://niv.cachix.org'...
copying path '/nix/store/4ak2g6rll00ikqqd4fbsd44hi51qzp34-perl5.30.0-URI-1.76' from 'https://niv.cachix.org'...
copying path '/nix/store/9mha2v8iy8y9hc758ws7pjg6g6g5l53v-perl5.30.0-CGI-4.44' from 'https://niv.cachix.org'...
copying path '/nix/store/mx81qdj8d9f98cbhz84asrwj1ly81b5i-python2.7-pyOpenSSL-19.0.0' from 'https://niv.cachix.org'...
copying path '/nix/store/6shsj067wx0wgdwf4dgi8s7nwq981114-python2.7-urllib3-1.24.3' from 'https://niv.cachix.org'...
copying path '/nix/store/n3bsczcq636hhwj0vcq9mv4v4f17q7f4-perl5.30.0-Test-Fatal-0.014' from 'https://niv.cachix.org'...
copying path '/nix/store/j7fmbb00pj03r1pricvz4jzcs45cga5g-perl5.30.0-HTTP-Message-6.18' from 'https://niv.cachix.org'...
copying path '/nix/store/dsa0524pw26s9wv5gr9fxrnbh8mqas4y-perl5.30.0-Net-HTTP-6.19' from 'https://niv.cachix.org'...
copying path '/nix/store/qyfmh6rvwwnbgx0a1wj8m3gwaiwb9jq1-perl5.30.0-CGI-Fast-2.15' from 'https://niv.cachix.org'...
copying path '/nix/store/q8h7snvvjggvl2dhrc9547czf02n59yf-perl5.30.0-WWW-RobotRules-6.02' from 'https://niv.cachix.org'...
copying path '/nix/store/2qljpxpp5dy3az70igz8jbikbsqf6z9l-readline-6.3p08' from 'https://niv.cachix.org'...
copying path '/nix/store/3nh4wi5cgz4lsmgqg7zvgfalzj8c454b-perl5.30.0-HTTP-Cookies-6.04' from 'https://niv.cachix.org'...
copying path '/nix/store/ycsn0xqp331lc4ak8q6wizwbfncfnqna-perl5.30.0-HTTP-Daemon-6.01' from 'https://niv.cachix.org'...
copying path '/nix/store/5n1wfwpabbyp2z72sl6jpgy8ws7828ll-perl5.30.0-HTTP-Negotiate-6.01' from 'https://niv.cachix.org'...
copying path '/nix/store/iwqmijk4vqz7hhdvn2a1fcbnphm2313j-utf8proc-2.4.0' from 'https://niv.cachix.org'...
copying path '/nix/store/blykn8wlxh1n91dzxizyxvkygmd911cx-xz-5.2.4' from 'https://niv.cachix.org'...
copying path '/nix/store/xvxsbvbi7ckccz4pz2j6np7czadgjy2x-zlib-1.2.11' from 'https://niv.cachix.org'...
copying path '/nix/store/rvffh0zclxwfwsv99107dl3zmdqma4cq-perl5.30.0-libwww-perl-6.39' from 'https://niv.cachix.org'...
copying path '/nix/store/y04xj2mbc66zs53fackn1wwlrv31bv3y-xz-5.2.4-bin' from 'https://niv.cachix.org'...
copying path '/nix/store/ajrrkivdfvp8dp4vdg5hp1h5hblmanc9-binutils-2.31.1' from 'https://niv.cachix.org'...
copying path '/nix/store/bbjl2gx0ix29yqpr4mrc52lf3fc5pf9m-cracklib-2.9.7' from 'https://niv.cachix.org'...
copying path '/nix/store/62x7m20m7lm8y8s17cbgha0sf3cmma19-gcc-8.3.0' from 'https://niv.cachix.org'...
copying path '/nix/store/vdd9ic0hch4l2bh91xmirmlxc9ka552i-libssh2-1.9.0' from 'https://niv.cachix.org'...
copying path '/nix/store/p2d5n5x7zarmvb56yf2cgrnv8yc2j46s-serf-1.3.9' from 'https://niv.cachix.org'...
copying path '/nix/store/yzl4b89s1vcil6acf483w89bhhbhvshi-linux-pam-1.3.1' from 'https://niv.cachix.org'...
copying path '/nix/store/8dzggqnvdxa9k2dj9mclbyhqliipbail-curl-7.65.3' from 'https://niv.cachix.org'...
copying path '/nix/store/gwwycf3w6cbj0gd2mpgblrdjc24f3cys-binutils-wrapper-2.31.1' from 'https://niv.cachix.org'...
copying path '/nix/store/gs3pbwzmz3v2rhxsdafg36w29804fx0y-sqlite-3.28.0' from 'https://niv.cachix.org'...
copying path '/nix/store/g4jpqmsrw22ksv4j664sdlpps1zkmqda-openssh-7.9p1' from 'https://niv.cachix.org'...
copying path '/nix/store/iqy3s3cl2f88skjv77pcnj42gm7njany-aws-sdk-cpp-1.7.90' from 'https://niv.cachix.org'...
copying path '/nix/store/q20xz6iq493vha5425cbr4l6q190b39i-python-2.7.17' from 'https://niv.cachix.org'...
copying path '/nix/store/3pcn1sqn978v3517i00l5cs2g6rb1rcs-subversion-1.12.2' from 'https://niv.cachix.org'...
copying path '/nix/store/f2y3557z18xcg3ldf7wvz97s1d14fkyk-nix-2.3' from 'https://niv.cachix.org'...
copying path '/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0' from 'https://niv.cachix.org'...
copying path '/nix/store/jb0nkgr22r741h89r98j88qcilphcr4w-nix-prefetch-cvs' from 'https://niv.cachix.org'...
copying path '/nix/store/ha48z9rg33342sjsy9s673q6mckiamkq-nix-prefetch-svn' from 'https://niv.cachix.org'...
copying path '/nix/store/qghrkvk86f9llfkcr1bxsypqbw1a4qmw-stdenv-linux' from 'https://niv.cachix.org'...
copying path '/nix/store/06q8j7z84zqjzcijvz90i4v7j5mfk4jl-git-2.23.1' from 'https://niv.cachix.org'...
copying path '/nix/store/azk6mj1mr12vjrz83hvmqy81h4rakmhg-python2.7-asn1crypto-0.24.0' from 'https://niv.cachix.org'...
copying path '/nix/store/6b4cya265hbf8vvha6qjac3n713ar1lz-python2.7-certifi-2019.6.16' from 'https://niv.cachix.org'...
copying path '/nix/store/96xcfv6737gw7z72ckir5pz1fp89yhxq-python2.7-cffi-1.12.3' from 'https://niv.cachix.org'...
copying path '/nix/store/bxbap9nzyzv3kqd0y64mr08r94vgrmd3-python2.7-cryptography-2.7' from 'https://niv.cachix.org'...
copying path '/nix/store/lj9irbdv59vddhz62wiljz33si5r92yw-python2.7-enum34-1.1.6' from 'https://niv.cachix.org'...
copying path '/nix/store/rf30c9agqpd19cmc1fspazy1r1c0lrkj-python2.7-idna-2.8' from 'https://niv.cachix.org'...
copying path '/nix/store/mmf64c644nbird2ja26ywrm8anpg6hbg-nix-prefetch-git' from 'https://niv.cachix.org'...
copying path '/nix/store/wz4i19w2rh0b6id7v9wml49dv74h3wfz-python2.7-ipaddress-1.0.22' from 'https://niv.cachix.org'...
copying path '/nix/store/v5fwmb33didx67dl0akb4xa915rwh2fb-python2.7-pyasn1-0.4.5' from 'https://niv.cachix.org'...
copying path '/nix/store/n8jv7y6j0jnd29mpgb9fcgs1djy5l5bs-python2.7-pycparser-2.19' from 'https://niv.cachix.org'...
copying path '/nix/store/v24yh8drc325d80pgg30rl84phijjn8f-python2.7-pyparsing-2.3.1' from 'https://niv.cachix.org'...
copying path '/nix/store/pzkdf0jhi08g8dx9pf4i2g5an1wkm1v9-python2.7-pysocks-1.7.0' from 'https://niv.cachix.org'...
copying path '/nix/store/mra5bhz3dj332nni636q0p4f5j3ara09-python2.7-six-1.12.0' from 'https://niv.cachix.org'...
copying path '/nix/store/mdrk7wi9aw0xl8vnip1fyw9fpj8x7ldn-python2.7-cffi-1.12.3-dev' from 'https://niv.cachix.org'...
copying path '/nix/store/f2r4xl4nsm8wjgk8wkar2sj96mx5yra9-python2.7-packaging-19.0' from 'https://niv.cachix.org'...
copying path '/nix/store/glpkmc0lkbs9azbnayjnhijdhp9iifk2-python2.7-bcrypt-3.1.7' from 'https://niv.cachix.org'...
copying path '/nix/store/d4d4zpsbm3dgzyrdzm3m46rww729zv7h-python2.7-pynacl-1.3.0' from 'https://niv.cachix.org'...
copying path '/nix/store/m0qm99fiv05h3vpn4jllnizl6l74ggxg-python2.7-cryptography-2.7-dev' from 'https://niv.cachix.org'...
copying path '/nix/store/3d5jk13mwj4gcrx4qk1qsnzfjpq7kc39-python2.7-paramiko-2.6.0' from 'https://niv.cachix.org'...
copying path '/nix/store/y55a9r897wjdcf7dzs4i5cncqhsjhdgb-python2.7-pyOpenSSL-19.0.0-dev' from 'https://niv.cachix.org'...
copying path '/nix/store/y3lsh6gd2d44r4svk7qj5zbjvzxika7m-bazaar-2.7.0' from 'https://niv.cachix.org'...
copying path '/nix/store/581zd86ryv19ri1aill0i0xmc2kbk4yr-nix-prefetch-bzr' from 'https://niv.cachix.org'...
copying path '/nix/store/cp0rccn0skk45biyfmwaq6vii8b8sbd9-python2.7-urllib3-1.24.3-dev' from 'https://niv.cachix.org'...
copying path '/nix/store/y2lp12pqay94m1p95m4mxbkpq7xs3r3a-python2.7-dulwich-0.19.11' from 'https://niv.cachix.org'...
copying path '/nix/store/3qgmnz64zjq6pqlb8b175zz6z5bvcf9s-python2.7-hg-git-0.8.12' from 'https://niv.cachix.org'...
copying path '/nix/store/872iqj663q40f9vlmz3jih3na1kc0jsd-mercurial-4.9.1' from 'https://niv.cachix.org'...
copying path '/nix/store/43nrxqxy61y66m0ys014y889vll8xzxr-nix-prefetch-hg' from 'https://niv.cachix.org'...
copying path '/nix/store/an2x98z0lnaplabrar8cdrncpbi8lfch-nix-prefetch-scripts' from 'https://niv.cachix.org'...
copying path '/nix/store/qws454hg7dka8bin2qwdm24j7wcxl7z2-cabal2nix-2.14.4' from 'https://niv.cachix.org'...
building '/nix/store/g434bhsnvk5x2jl014kinfhqmvcx43hs-cabal2nix-niv.drv'...
installing
*** found package.yaml. Using hpack...
installing 'niv-0.2.13'
these paths will be fetched (1.17 MiB download, 5.45 MiB unpacked):
  /nix/store/b8m5x02l2ygzjz0qp3ffjl7n7aazv4jn-niv-0.2.13
  /nix/store/j8sjiw59fdj34z9327af1kizncmqh92z-niv-0.2.13-data
copying path '/nix/store/j8sjiw59fdj34z9327af1kizncmqh92z-niv-0.2.13-data' from 'https://niv.cachix.org'...
copying path '/nix/store/b8m5x02l2ygzjz0qp3ffjl7n7aazv4jn-niv-0.2.13' from 'https://niv.cachix.org'...
building '/nix/store/1pfjbch5lvv570h5i7yn8sspzfi2qmwy-user-environment.drv'...
created 5670 symlinks in user environment

Most of which don't seem like build dependencies to me..

@nmattia
Copy link
Contributor

nmattia commented Feb 21, 2020

Mh, yeah. They're needed to build cabal2nix which is then run to generate the nix files then IFDed. Didn't think about that, will need to build it some other way...

@andir
Copy link
Member

andir commented Feb 22, 2020 via email

@nmattia
Copy link
Contributor

nmattia commented Feb 22, 2020

The issue brought up by @doronbehar is definitely upstream, I'll have to fix it there.

Re. this particular issue, I can't reproduce. I think we can close when @knl confirms #80644 (comment)

@nmattia
Copy link
Contributor

nmattia commented Feb 22, 2020

FTR @doronbehar the niv issue is tracked in nmattia/niv#204 and should be fixed in nmattia/niv#205

@knl knl changed the title niv: reduce the closure side when using the executable niv: reduce the closure size when using the executable Feb 26, 2020
@knl
Copy link
Contributor Author

knl commented Feb 26, 2020

@doronbehar - @nmattia's fix in nmattia/niv#205 indeed makes the downloaded size smaller. Closing this PR as it should have started as a Draft.

@knl knl closed this Feb 26, 2020
@knl knl deleted the use-static-executable-for-niv branch February 26, 2020 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants