From 937cf7dd4dc971ca4df56e131853ef6e7d88f725 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 23 Apr 2021 14:27:18 +0530 Subject: update nix environment --- .direnv/flake-profile | 2 +- .direnv/flake-profile.rc | 42 +++++++++++++++++------------------ default.nix | 13 +++++++++++ flake.lock | 58 ++++++++++++++++++++++++++++++++++++++---------- flake.nix | 34 ++++++++++++++++++++-------- shell.nix | 13 +++++++++++ 6 files changed, 119 insertions(+), 43 deletions(-) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/.direnv/flake-profile b/.direnv/flake-profile index 85ef145..594de2e 120000 --- a/.direnv/flake-profile +++ b/.direnv/flake-profile @@ -1 +1 @@ -/nix/store/9cnp7wppdlz68wjs949mbyfid4a6kl9c-nix-shell-env \ No newline at end of file +/nix/store/anbyxpip22cr5f9v8akxz3grbxhd1ldp-nix-shell-env \ No newline at end of file diff --git a/.direnv/flake-profile.rc b/.direnv/flake-profile.rc index 9491dc5..74a6e3c 100644 --- a/.direnv/flake-profile.rc +++ b/.direnv/flake-profile.rc @@ -4,17 +4,17 @@ AR=ar export AR AS=as export AS -BASH=/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin/bash +BASH=/nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23/bin/bash CC=gcc export CC -CONFIG_SHELL=/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin/bash +CONFIG_SHELL=/nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23/bin/bash export CONFIG_SHELL CXX=g++ export CXX DIRSTACK=() GROUPS=() HOSTTYPE=x86_64 -HOST_PATH=/nix/store/ypsd29c5hgj1x7xz5ddffanxw5d8fh7b-coreutils-8.32/bin:/nix/store/nq9l23mrm8irvl9qvxgvxqqkm5sfnc9d-findutils-4.7.0/bin:/nix/store/7yq29nnglh2s576n7vdmzqryym22f8rj-diffutils-3.7/bin:/nix/store/0839nqri8w69c91amlsq9bawaqlzpmh9-gnused-4.8/bin:/nix/store/wmiyjdsaydyv024al5ddqd3liljrfvk7-gnugrep-3.6/bin:/nix/store/snmar11l5w9jrxva2s5d6143nqmdgzqb-gawk-5.1.0/bin:/nix/store/cisss0pcfh72kmnsv4qa6h41wcwb9mkv-gnutar-1.32/bin:/nix/store/prdifiyrxwgf6sp4rwmrqvfdnvf72gw2-gzip-1.10/bin:/nix/store/pp9shwhcdxxbhgp96fcaj0g8x5g54zrl-bzip2-1.0.6.0.1-bin/bin:/nix/store/fydw5vhlhpq438cxv4vwpa8pf8p8fv5s-gnumake-4.3/bin:/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin:/nix/store/qcw3qagp709qwfza259zqss5qh4wg789-patch-2.7.6/bin:/nix/store/q0jqhjabwaaak30l4sq3z0xi6jrkpnbn-xz-5.2.5-bin/bin +HOST_PATH=/nix/store/lr96h3dlny8aiba9p3rmxcxfda0ijj08-coreutils-8.32/bin:/nix/store/6kjrp5p21icxr38zws6yzbdsbf8z66b6-findutils-4.7.0/bin:/nix/store/9xc5vvy9gyzddq1c8kgl8hhzwcz4whpj-diffutils-3.7/bin:/nix/store/4nf4ih03fcq7gk08spjzxvwph1vyx1kr-gnused-4.8/bin:/nix/store/3v5i98i92j0f3lbb7d58kvf8nxnhw7s7-gnugrep-3.6/bin:/nix/store/cmnds461yxhh17076pdm5g6maralf85b-gawk-5.1.0/bin:/nix/store/sg7xqwqwg9aizcl4mcg7w1kkiwxrvg06-gnutar-1.34/bin:/nix/store/dp05lhn18njhyd3iqh64jvwyx38qvmjp-gzip-1.10/bin:/nix/store/5kmzagplvnq64lkyfpp72ncfw6kgpdvk-bzip2-1.0.6.0.2-bin/bin:/nix/store/dk7s6714az7paaqwrca488z7xryh6wf3-gnumake-4.3/bin:/nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23/bin:/nix/store/4mj3vpx0yxpcz1fnb4dv5xalxxh8c469-patch-2.7.6/bin:/nix/store/dzy00w2rw5gjh0gdrldxdkgrvzz7rqas-xz-5.2.5-bin/bin export HOST_PATH IFS=$' \t\n' IN_NIX_SHELL=impure @@ -22,17 +22,17 @@ export IN_NIX_SHELL LD=ld export LD MACHTYPE=x86_64-unknown-linux-gnu -NIX_BINTOOLS=/nix/store/f4w8p656gg6v2k1v0whwmyk09kz3k8ic-binutils-wrapper-2.35.1 +NIX_BINTOOLS=/nix/store/asz7nxxc07srk1x7kxn2mbjh393lrh89-binutils-wrapper-2.35.1 export NIX_BINTOOLS NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu NIX_BUILD_CORES=8 export NIX_BUILD_CORES -NIX_CC=/nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-gcc-wrapper-10.2.0 +NIX_CC=/nix/store/xicw4xz0fnd9kmbdlnj6kajd4wz5im7l-gcc-wrapper-10.2.0 export NIX_CC NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu -NIX_CFLAGS_COMPILE=' -frandom-seed=9cnp7wppdl -isystem /nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev/include -isystem /nix/store/rj0lg9wwx8v6bigqhjswrackfj4xkqfn-libGL-1.3.2-dev/include -isystem /nix/store/mm0bcynpsivwl82naasln400wdd7bx8a-libglvnd-1.3.2-dev/include -isystem /nix/store/jhdcj3yxxdvv4fag74x9inqsrvnzf044-libX11-1.7.0-dev/include -isystem /nix/store/3dwc6z983ar11ihdqm942qvwvbkaqx9a-xorgproto-2020.1/include -isystem /nix/store/af3ssamyq8v2lsf76471gyiymzwv1jvp-libxcb-1.14-dev/include -isystem /nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15/include -isystem /nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev/include -isystem /nix/store/rj0lg9wwx8v6bigqhjswrackfj4xkqfn-libGL-1.3.2-dev/include -isystem /nix/store/mm0bcynpsivwl82naasln400wdd7bx8a-libglvnd-1.3.2-dev/include -isystem /nix/store/jhdcj3yxxdvv4fag74x9inqsrvnzf044-libX11-1.7.0-dev/include -isystem /nix/store/3dwc6z983ar11ihdqm942qvwvbkaqx9a-xorgproto-2020.1/include -isystem /nix/store/af3ssamyq8v2lsf76471gyiymzwv1jvp-libxcb-1.14-dev/include -isystem /nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15/include' +NIX_CFLAGS_COMPILE=' -frandom-seed=anbyxpip22 -isystem /nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev/include -isystem /nix/store/y58kc97a7xfamzb7am619mqr6phmfxff-libGL-1.3.2-dev/include -isystem /nix/store/nzpxf3a1kr034yxy9bq0ridghz3z75n6-libglvnd-1.3.2-dev/include -isystem /nix/store/a8avrn0dlxq5x5i85qrhjyza9l5nw8yb-libX11-1.7.0-dev/include -isystem /nix/store/5fvrlz5rjwg0as3ab8ws5ms0qlhivja6-xorgproto-2021.3/include -isystem /nix/store/dqkl0mm989nn8dchsgqn970zffysp3bq-libxcb-1.14-dev/include -isystem /nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15/include -isystem /nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev/include -isystem /nix/store/y58kc97a7xfamzb7am619mqr6phmfxff-libGL-1.3.2-dev/include -isystem /nix/store/nzpxf3a1kr034yxy9bq0ridghz3z75n6-libglvnd-1.3.2-dev/include -isystem /nix/store/a8avrn0dlxq5x5i85qrhjyza9l5nw8yb-libX11-1.7.0-dev/include -isystem /nix/store/5fvrlz5rjwg0as3ab8ws5ms0qlhivja6-xorgproto-2021.3/include -isystem /nix/store/dqkl0mm989nn8dchsgqn970zffysp3bq-libxcb-1.14-dev/include -isystem /nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15/include' export NIX_CFLAGS_COMPILE NIX_ENFORCE_NO_NATIVE=1 export NIX_ENFORCE_NO_NATIVE @@ -40,7 +40,7 @@ NIX_HARDENING_ENABLE='fortify stackprotector pic strictoverflow format relro bin export NIX_HARDENING_ENABLE NIX_INDENT_MAKE=1 export NIX_INDENT_MAKE -NIX_LDFLAGS='-rpath /home/np/code/rust/obi/outputs/out/lib64 -rpath /home/np/code/rust/obi/outputs/out/lib -L/nix/store/jsf76r23d3s8sgj3irnnx3701c9mfcs0-libGL-1.3.2/lib -L/nix/store/0vbk3b7fzdjikrl6l36bfrmfwc2pw1p1-libglvnd-1.3.2/lib -L/nix/store/cgjnqiby59x6kz9c33g73007ry8bs8qa-libxcb-1.14/lib -L/nix/store/yq0m2kngxbjkh8y1kizshl4ym4ydnw7m-libX11-1.7.0/lib -L/nix/store/3xcgzy0nkq71fh2npf45p38sz0d06x77-SDL2-2.0.14/lib -L/nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15/lib -L/nix/store/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690/lib -L/nix/store/jsf76r23d3s8sgj3irnnx3701c9mfcs0-libGL-1.3.2/lib -L/nix/store/0vbk3b7fzdjikrl6l36bfrmfwc2pw1p1-libglvnd-1.3.2/lib -L/nix/store/cgjnqiby59x6kz9c33g73007ry8bs8qa-libxcb-1.14/lib -L/nix/store/yq0m2kngxbjkh8y1kizshl4ym4ydnw7m-libX11-1.7.0/lib -L/nix/store/3xcgzy0nkq71fh2npf45p38sz0d06x77-SDL2-2.0.14/lib -L/nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15/lib -L/nix/store/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690/lib' +NIX_LDFLAGS='-rpath /home/np/code/rust/obi/outputs/out/lib64 -rpath /home/np/code/rust/obi/outputs/out/lib -L/nix/store/v3xi47p44wfdgc06hw9i90nqdja7d2xn-libGL-1.3.2/lib -L/nix/store/w4ydr5lczfnqkz1dg3ga0gakiddzbqh7-libglvnd-1.3.2/lib -L/nix/store/70491s2xfn4j75xmv0r2bw9xhr5ayw4q-libxcb-1.14/lib -L/nix/store/nwfn0qi7lk2fskjh7x0hr1ak7slvgr6x-libX11-1.7.0/lib -L/nix/store/chl23z7j5xxfcpc5rz2mg3id430l4zij-SDL2-2.0.14/lib -L/nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15/lib -L/nix/store/0lw6gz3yz0lm430ilw276bmmizpy8lnm-rust-1.53.0-nightly-2021-03-30-74874a690/lib -L/nix/store/v3xi47p44wfdgc06hw9i90nqdja7d2xn-libGL-1.3.2/lib -L/nix/store/w4ydr5lczfnqkz1dg3ga0gakiddzbqh7-libglvnd-1.3.2/lib -L/nix/store/70491s2xfn4j75xmv0r2bw9xhr5ayw4q-libxcb-1.14/lib -L/nix/store/nwfn0qi7lk2fskjh7x0hr1ak7slvgr6x-libX11-1.7.0/lib -L/nix/store/chl23z7j5xxfcpc5rz2mg3id430l4zij-SDL2-2.0.14/lib -L/nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15/lib -L/nix/store/0lw6gz3yz0lm430ilw276bmmizpy8lnm-rust-1.53.0-nightly-2021-03-30-74874a690/lib' export NIX_LDFLAGS NIX_LIB64_IN_SELF_RPATH=1 NIX_NO_SELF_RPATH=1 @@ -55,7 +55,7 @@ export OBJDUMP OPTERR=1 OPTIND=1 OSTYPE=linux-gnu -PATH=/nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev/bin:/nix/store/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690/bin:/nix/store/pj3m562kh9lr7wjk3hlyandhd1qpapgh-rust-analyzer-unstable-2021-02-22/bin:/nix/store/rfx0jz6pr3n2dcxm99finhbp99v45qx4-rustfmt-1.49.0/bin:/nix/store/9p0yf4yzsc8by6xviags56c3mb3fxkkw-cargo-1.49.0/bin:/nix/store/d7lyvmvzf1a8qqhsxhdc3r6dwbdmfcap-patchelf-0.12/bin:/nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-gcc-wrapper-10.2.0/bin:/nix/store/wxri3dc14yd1w997vjfvsnn6qml64l4r-gcc-10.2.0/bin:/nix/store/fr2k1vwmyd5ngmb3y0v090nh21nn6gqp-glibc-2.32-35-bin/bin:/nix/store/ypsd29c5hgj1x7xz5ddffanxw5d8fh7b-coreutils-8.32/bin:/nix/store/f4w8p656gg6v2k1v0whwmyk09kz3k8ic-binutils-wrapper-2.35.1/bin:/nix/store/9f8y44vmjnwdjvzlff0gm3f3g6ycyyqy-binutils-2.35.1/bin:/nix/store/fr2k1vwmyd5ngmb3y0v090nh21nn6gqp-glibc-2.32-35-bin/bin:/nix/store/ypsd29c5hgj1x7xz5ddffanxw5d8fh7b-coreutils-8.32/bin:/nix/store/ypsd29c5hgj1x7xz5ddffanxw5d8fh7b-coreutils-8.32/bin:/nix/store/nq9l23mrm8irvl9qvxgvxqqkm5sfnc9d-findutils-4.7.0/bin:/nix/store/7yq29nnglh2s576n7vdmzqryym22f8rj-diffutils-3.7/bin:/nix/store/0839nqri8w69c91amlsq9bawaqlzpmh9-gnused-4.8/bin:/nix/store/wmiyjdsaydyv024al5ddqd3liljrfvk7-gnugrep-3.6/bin:/nix/store/snmar11l5w9jrxva2s5d6143nqmdgzqb-gawk-5.1.0/bin:/nix/store/cisss0pcfh72kmnsv4qa6h41wcwb9mkv-gnutar-1.32/bin:/nix/store/prdifiyrxwgf6sp4rwmrqvfdnvf72gw2-gzip-1.10/bin:/nix/store/pp9shwhcdxxbhgp96fcaj0g8x5g54zrl-bzip2-1.0.6.0.1-bin/bin:/nix/store/fydw5vhlhpq438cxv4vwpa8pf8p8fv5s-gnumake-4.3/bin:/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin:/nix/store/qcw3qagp709qwfza259zqss5qh4wg789-patch-2.7.6/bin:/nix/store/q0jqhjabwaaak30l4sq3z0xi6jrkpnbn-xz-5.2.5-bin/bin +PATH=/nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev/bin:/nix/store/0lw6gz3yz0lm430ilw276bmmizpy8lnm-rust-1.53.0-nightly-2021-03-30-74874a690/bin:/nix/store/35xfbg7wzr1k1jzavi55a4rni5cjf443-rust-analyzer-2021-04-19/bin:/nix/store/zfl9mbj1xfc1pkphj5h2vnv69pdzv9f2-rustfmt-1.51.0/bin:/nix/store/fai5k6hdj41zfkd54kr0m4yf58k2y33l-cargo-1.51.0/bin:/nix/store/ga6xyhwqff2h7f6zrfdh79hvwhia11vw-patchelf-0.12/bin:/nix/store/xicw4xz0fnd9kmbdlnj6kajd4wz5im7l-gcc-wrapper-10.2.0/bin:/nix/store/hhqbd2y172i0kawplf2m4jqi2rmspk5c-gcc-10.2.0/bin:/nix/store/h68c6qvm6fwfzzj2b1q9xpi0x5qln25i-glibc-2.32-40-bin/bin:/nix/store/lr96h3dlny8aiba9p3rmxcxfda0ijj08-coreutils-8.32/bin:/nix/store/asz7nxxc07srk1x7kxn2mbjh393lrh89-binutils-wrapper-2.35.1/bin:/nix/store/8xiqj7nkx1z0mxhda9pcl8fa51zmxqd1-binutils-2.35.1/bin:/nix/store/lr96h3dlny8aiba9p3rmxcxfda0ijj08-coreutils-8.32/bin:/nix/store/6kjrp5p21icxr38zws6yzbdsbf8z66b6-findutils-4.7.0/bin:/nix/store/9xc5vvy9gyzddq1c8kgl8hhzwcz4whpj-diffutils-3.7/bin:/nix/store/4nf4ih03fcq7gk08spjzxvwph1vyx1kr-gnused-4.8/bin:/nix/store/3v5i98i92j0f3lbb7d58kvf8nxnhw7s7-gnugrep-3.6/bin:/nix/store/cmnds461yxhh17076pdm5g6maralf85b-gawk-5.1.0/bin:/nix/store/sg7xqwqwg9aizcl4mcg7w1kkiwxrvg06-gnutar-1.34/bin:/nix/store/dp05lhn18njhyd3iqh64jvwyx38qvmjp-gzip-1.10/bin:/nix/store/5kmzagplvnq64lkyfpp72ncfw6kgpdvk-bzip2-1.0.6.0.2-bin/bin:/nix/store/dk7s6714az7paaqwrca488z7xryh6wf3-gnumake-4.3/bin:/nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23/bin:/nix/store/4mj3vpx0yxpcz1fnb4dv5xalxxh8c469-patch-2.7.6/bin:/nix/store/dzy00w2rw5gjh0gdrldxdkgrvzz7rqas-xz-5.2.5-bin/bin export PATH PIPESTATUS=([0]="0") PS4='+ ' @@ -67,11 +67,11 @@ RUST_BACKTRACE=1 export RUST_BACKTRACE RUST_LOG=info export RUST_LOG -RUST_SRC_PATH=/nix/store/m0k4il8v2wv0c7nniqndcxh72qmzvvg2-rust-src-1.53.0-nightly-2021-03-30-74874a690/lib/rustlib/src/rust/library +RUST_SRC_PATH=/nix/store/vic11264p37zx02284r4j8vv35ycrcls-rust-src-1.53.0-nightly-2021-03-30-74874a690/lib/rustlib/src/rust/library export RUST_SRC_PATH -SDL2_PATH='/nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev/include/SDL2 /nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15/include/SDL2 /nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev/include/SDL2 /nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15/include/SDL2 /nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev/include/SDL2 /nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15/include/SDL2' +SDL2_PATH='/nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev/include/SDL2 /nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15/include/SDL2 /nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev/include/SDL2 /nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15/include/SDL2 /nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev/include/SDL2 /nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15/include/SDL2' export SDL2_PATH -SHELL=/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin/bash +SHELL=/nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23/bin/bash export SHELL SIZE=size export SIZE @@ -81,18 +81,18 @@ STRINGS=strings export STRINGS STRIP=strip export STRIP -XDG_DATA_DIRS=/nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev/share:/nix/store/3dwc6z983ar11ihdqm942qvwvbkaqx9a-xorgproto-2020.1/share:/nix/store/yq0m2kngxbjkh8y1kizshl4ym4ydnw7m-libX11-1.7.0/share:/nix/store/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690/share:/nix/store/9p0yf4yzsc8by6xviags56c3mb3fxkkw-cargo-1.49.0/share:/nix/store/d7lyvmvzf1a8qqhsxhdc3r6dwbdmfcap-patchelf-0.12/share +XDG_DATA_DIRS=/nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev/share:/nix/store/5fvrlz5rjwg0as3ab8ws5ms0qlhivja6-xorgproto-2021.3/share:/nix/store/nwfn0qi7lk2fskjh7x0hr1ak7slvgr6x-libX11-1.7.0/share:/nix/store/0lw6gz3yz0lm430ilw276bmmizpy8lnm-rust-1.53.0-nightly-2021-03-30-74874a690/share:/nix/store/fai5k6hdj41zfkd54kr0m4yf58k2y33l-cargo-1.51.0/share:/nix/store/ga6xyhwqff2h7f6zrfdh79hvwhia11vw-patchelf-0.12/share export XDG_DATA_DIRS _=export buildInputs= export buildInputs -builder=/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin/bash +builder=/nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23/bin/bash export builder commonStripFlags=--enable-deterministic-archives configureFlags= export configureFlags defaultBuildInputs= -defaultNativeBuildInputs='/nix/store/d7lyvmvzf1a8qqhsxhdc3r6dwbdmfcap-patchelf-0.12 /nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh /nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh /nix/store/cl3qd985p1yxyfkj96v0hqxiy3w69xq5-compress-man-pages.sh /nix/store/h54dzwd7rdh2jlcv91424csl6d0ccgjy-strip.sh /nix/store/bnj8d7mvbkg3vdb07yz74yhl3g107qq5-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh /nix/store/c8n9kcdddp9np665xz6ri61b383nxvz8-move-systemd-user-units.sh /nix/store/1i5y55x4b4m9qkx5dqbmr1r6bvrqbanw-multiple-outputs.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh /nix/store/pr6nzbscdpg94yvr151lrif2kg0csx7b-reproducible-builds.sh /nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-gcc-wrapper-10.2.0' +defaultNativeBuildInputs='/nix/store/ga6xyhwqff2h7f6zrfdh79hvwhia11vw-patchelf-0.12 /nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh /nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh /nix/store/cl3qd985p1yxyfkj96v0hqxiy3w69xq5-compress-man-pages.sh /nix/store/h54dzwd7rdh2jlcv91424csl6d0ccgjy-strip.sh /nix/store/bnj8d7mvbkg3vdb07yz74yhl3g107qq5-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh /nix/store/c8n9kcdddp9np665xz6ri61b383nxvz8-move-systemd-user-units.sh /nix/store/1i5y55x4b4m9qkx5dqbmr1r6bvrqbanw-multiple-outputs.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh /nix/store/pr6nzbscdpg94yvr151lrif2kg0csx7b-reproducible-builds.sh /nix/store/xicw4xz0fnd9kmbdlnj6kajd4wz5im7l-gcc-wrapper-10.2.0' depsBuildBuild= export depsBuildBuild depsBuildBuildPropagated= @@ -121,10 +121,10 @@ envBuildTargetHooks=([0]="addSDL2Path") envHostHostHooks=([0]="ccWrapper_addCVars" [1]="bintoolsWrapper_addLDVars") envHostTargetHooks=([0]="ccWrapper_addCVars" [1]="bintoolsWrapper_addLDVars") fixupOutputHooks=([0]="if [ -z \"\${dontPatchELF-}\" ]; then patchELF \"\$prefix\"; fi" [1]="_makeSymlinksRelative" [2]="if [ -z \"\${dontGzipMan-}\" ]; then compressManPages \"\$prefix\"; fi" [3]="_doStrip" [4]="patchShebangsAuto" [5]="_pruneLibtoolFiles" [6]="if [[ -z \"\${noAuditTmpdir-}\" && -e \"\$prefix\" ]]; then auditTmpdir \"\$prefix\"; fi" [7]="_moveSystemdUserUnits" [8]="_moveSbin" [9]="_moveLib64") -initialPath='/nix/store/ypsd29c5hgj1x7xz5ddffanxw5d8fh7b-coreutils-8.32 /nix/store/nq9l23mrm8irvl9qvxgvxqqkm5sfnc9d-findutils-4.7.0 /nix/store/7yq29nnglh2s576n7vdmzqryym22f8rj-diffutils-3.7 /nix/store/0839nqri8w69c91amlsq9bawaqlzpmh9-gnused-4.8 /nix/store/wmiyjdsaydyv024al5ddqd3liljrfvk7-gnugrep-3.6 /nix/store/snmar11l5w9jrxva2s5d6143nqmdgzqb-gawk-5.1.0 /nix/store/cisss0pcfh72kmnsv4qa6h41wcwb9mkv-gnutar-1.32 /nix/store/prdifiyrxwgf6sp4rwmrqvfdnvf72gw2-gzip-1.10 /nix/store/pp9shwhcdxxbhgp96fcaj0g8x5g54zrl-bzip2-1.0.6.0.1-bin /nix/store/fydw5vhlhpq438cxv4vwpa8pf8p8fv5s-gnumake-4.3 /nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23 /nix/store/qcw3qagp709qwfza259zqss5qh4wg789-patch-2.7.6 /nix/store/q0jqhjabwaaak30l4sq3z0xi6jrkpnbn-xz-5.2.5-bin' +initialPath='/nix/store/lr96h3dlny8aiba9p3rmxcxfda0ijj08-coreutils-8.32 /nix/store/6kjrp5p21icxr38zws6yzbdsbf8z66b6-findutils-4.7.0 /nix/store/9xc5vvy9gyzddq1c8kgl8hhzwcz4whpj-diffutils-3.7 /nix/store/4nf4ih03fcq7gk08spjzxvwph1vyx1kr-gnused-4.8 /nix/store/3v5i98i92j0f3lbb7d58kvf8nxnhw7s7-gnugrep-3.6 /nix/store/cmnds461yxhh17076pdm5g6maralf85b-gawk-5.1.0 /nix/store/sg7xqwqwg9aizcl4mcg7w1kkiwxrvg06-gnutar-1.34 /nix/store/dp05lhn18njhyd3iqh64jvwyx38qvmjp-gzip-1.10 /nix/store/5kmzagplvnq64lkyfpp72ncfw6kgpdvk-bzip2-1.0.6.0.2-bin /nix/store/dk7s6714az7paaqwrca488z7xryh6wf3-gnumake-4.3 /nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23 /nix/store/4mj3vpx0yxpcz1fnb4dv5xalxxh8c469-patch-2.7.6 /nix/store/dzy00w2rw5gjh0gdrldxdkgrvzz7rqas-xz-5.2.5-bin' name=nix-shell export name -nativeBuildInputs='/nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev /nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15 /nix/store/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690 /nix/store/m0k4il8v2wv0c7nniqndcxh72qmzvvg2-rust-src-1.53.0-nightly-2021-03-30-74874a690 /nix/store/pj3m562kh9lr7wjk3hlyandhd1qpapgh-rust-analyzer-unstable-2021-02-22 /nix/store/rfx0jz6pr3n2dcxm99finhbp99v45qx4-rustfmt-1.49.0 /nix/store/9p0yf4yzsc8by6xviags56c3mb3fxkkw-cargo-1.49.0' +nativeBuildInputs='/nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev /nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15 /nix/store/0lw6gz3yz0lm430ilw276bmmizpy8lnm-rust-1.53.0-nightly-2021-03-30-74874a690 /nix/store/vic11264p37zx02284r4j8vv35ycrcls-rust-src-1.53.0-nightly-2021-03-30-74874a690 /nix/store/35xfbg7wzr1k1jzavi55a4rni5cjf443-rust-analyzer-2021-04-19 /nix/store/zfl9mbj1xfc1pkphj5h2vnv69pdzv9f2-rustfmt-1.51.0 /nix/store/fai5k6hdj41zfkd54kr0m4yf58k2y33l-cargo-1.51.0' export nativeBuildInputs nobuildPhase=$'echo\necho "This derivation is not meant to be built, aborting";\necho\nexit 1\n' export nobuildPhase @@ -145,8 +145,8 @@ patches= export patches phases=nobuildPhase export phases -pkg=/nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-gcc-wrapper-10.2.0 -pkgsBuildHost=([0]="/nix/store/0kjgp9j1vcrwmdwpp8znv0k6c1czi1x8-SDL2-2.0.14-dev" [1]="/nix/store/rj0lg9wwx8v6bigqhjswrackfj4xkqfn-libGL-1.3.2-dev" [2]="/nix/store/jsf76r23d3s8sgj3irnnx3701c9mfcs0-libGL-1.3.2" [3]="/nix/store/0vbk3b7fzdjikrl6l36bfrmfwc2pw1p1-libglvnd-1.3.2" [4]="/nix/store/mm0bcynpsivwl82naasln400wdd7bx8a-libglvnd-1.3.2-dev" [5]="/nix/store/jhdcj3yxxdvv4fag74x9inqsrvnzf044-libX11-1.7.0-dev" [6]="/nix/store/3dwc6z983ar11ihdqm942qvwvbkaqx9a-xorgproto-2020.1" [7]="/nix/store/af3ssamyq8v2lsf76471gyiymzwv1jvp-libxcb-1.14-dev" [8]="/nix/store/cgjnqiby59x6kz9c33g73007ry8bs8qa-libxcb-1.14" [9]="/nix/store/yq0m2kngxbjkh8y1kizshl4ym4ydnw7m-libX11-1.7.0" [10]="/nix/store/3xcgzy0nkq71fh2npf45p38sz0d06x77-SDL2-2.0.14" [11]="/nix/store/ivxsjy95vfgigyvwrxyc3v8k05igjc0q-SDL2_ttf-2.0.15" [12]="/nix/store/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690" [13]="/nix/store/m0k4il8v2wv0c7nniqndcxh72qmzvvg2-rust-src-1.53.0-nightly-2021-03-30-74874a690" [14]="/nix/store/pj3m562kh9lr7wjk3hlyandhd1qpapgh-rust-analyzer-unstable-2021-02-22" [15]="/nix/store/rfx0jz6pr3n2dcxm99finhbp99v45qx4-rustfmt-1.49.0" [16]="/nix/store/9p0yf4yzsc8by6xviags56c3mb3fxkkw-cargo-1.49.0" [17]="/nix/store/d7lyvmvzf1a8qqhsxhdc3r6dwbdmfcap-patchelf-0.12" [18]="/nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh" [19]="/nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh" [20]="/nix/store/cl3qd985p1yxyfkj96v0hqxiy3w69xq5-compress-man-pages.sh" [21]="/nix/store/h54dzwd7rdh2jlcv91424csl6d0ccgjy-strip.sh" [22]="/nix/store/bnj8d7mvbkg3vdb07yz74yhl3g107qq5-patch-shebangs.sh" [23]="/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh" [24]="/nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh" [25]="/nix/store/c8n9kcdddp9np665xz6ri61b383nxvz8-move-systemd-user-units.sh" [26]="/nix/store/1i5y55x4b4m9qkx5dqbmr1r6bvrqbanw-multiple-outputs.sh" [27]="/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh" [28]="/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh" [29]="/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh" [30]="/nix/store/pr6nzbscdpg94yvr151lrif2kg0csx7b-reproducible-builds.sh" [31]="/nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-gcc-wrapper-10.2.0" [32]="/nix/store/f4w8p656gg6v2k1v0whwmyk09kz3k8ic-binutils-wrapper-2.35.1") +pkg=/nix/store/xicw4xz0fnd9kmbdlnj6kajd4wz5im7l-gcc-wrapper-10.2.0 +pkgsBuildHost=([0]="/nix/store/wvk4kfgn5nhc2sb1cxwdyhxnli8bpfmv-SDL2-2.0.14-dev" [1]="/nix/store/y58kc97a7xfamzb7am619mqr6phmfxff-libGL-1.3.2-dev" [2]="/nix/store/v3xi47p44wfdgc06hw9i90nqdja7d2xn-libGL-1.3.2" [3]="/nix/store/w4ydr5lczfnqkz1dg3ga0gakiddzbqh7-libglvnd-1.3.2" [4]="/nix/store/nzpxf3a1kr034yxy9bq0ridghz3z75n6-libglvnd-1.3.2-dev" [5]="/nix/store/a8avrn0dlxq5x5i85qrhjyza9l5nw8yb-libX11-1.7.0-dev" [6]="/nix/store/5fvrlz5rjwg0as3ab8ws5ms0qlhivja6-xorgproto-2021.3" [7]="/nix/store/dqkl0mm989nn8dchsgqn970zffysp3bq-libxcb-1.14-dev" [8]="/nix/store/70491s2xfn4j75xmv0r2bw9xhr5ayw4q-libxcb-1.14" [9]="/nix/store/nwfn0qi7lk2fskjh7x0hr1ak7slvgr6x-libX11-1.7.0" [10]="/nix/store/chl23z7j5xxfcpc5rz2mg3id430l4zij-SDL2-2.0.14" [11]="/nix/store/xlgi5b9vxn24qj1prqxpxdpriyim6nzr-SDL2_ttf-2.0.15" [12]="/nix/store/0lw6gz3yz0lm430ilw276bmmizpy8lnm-rust-1.53.0-nightly-2021-03-30-74874a690" [13]="/nix/store/vic11264p37zx02284r4j8vv35ycrcls-rust-src-1.53.0-nightly-2021-03-30-74874a690" [14]="/nix/store/35xfbg7wzr1k1jzavi55a4rni5cjf443-rust-analyzer-2021-04-19" [15]="/nix/store/zfl9mbj1xfc1pkphj5h2vnv69pdzv9f2-rustfmt-1.51.0" [16]="/nix/store/fai5k6hdj41zfkd54kr0m4yf58k2y33l-cargo-1.51.0" [17]="/nix/store/ga6xyhwqff2h7f6zrfdh79hvwhia11vw-patchelf-0.12" [18]="/nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh" [19]="/nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh" [20]="/nix/store/cl3qd985p1yxyfkj96v0hqxiy3w69xq5-compress-man-pages.sh" [21]="/nix/store/h54dzwd7rdh2jlcv91424csl6d0ccgjy-strip.sh" [22]="/nix/store/bnj8d7mvbkg3vdb07yz74yhl3g107qq5-patch-shebangs.sh" [23]="/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh" [24]="/nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh" [25]="/nix/store/c8n9kcdddp9np665xz6ri61b383nxvz8-move-systemd-user-units.sh" [26]="/nix/store/1i5y55x4b4m9qkx5dqbmr1r6bvrqbanw-multiple-outputs.sh" [27]="/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh" [28]="/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh" [29]="/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh" [30]="/nix/store/pr6nzbscdpg94yvr151lrif2kg0csx7b-reproducible-builds.sh" [31]="/nix/store/xicw4xz0fnd9kmbdlnj6kajd4wz5im7l-gcc-wrapper-10.2.0" [32]="/nix/store/asz7nxxc07srk1x7kxn2mbjh393lrh89-binutils-wrapper-2.35.1") postFixupHooks=([0]="_multioutPropagateDev") postUnpackHooks=([0]="_updateSourceDateEpochFromSourceRoot") preConfigureHooks=([0]="_multioutConfig") @@ -159,11 +159,11 @@ propagatedHostDepFiles=([0]="propagated-host-host-deps" [1]="propagated-build-in propagatedNativeBuildInputs= export propagatedNativeBuildInputs propagatedTargetDepFiles=([0]="propagated-target-target-deps") -shell=/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin/bash +shell=/nix/store/jdi2v7ir1sr6vp7pc5x0nhb6lpcmg6xg-bash-4.4-p23/bin/bash export shell shellHook= export shellHook -stdenv=/nix/store/sx5hrbrr1g47klxk7x429qd1xwhq9dqq-stdenv-linux +stdenv=/nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux export stdenv strictDeps= export strictDeps @@ -567,7 +567,7 @@ addToSearchPathWithCustomDelimiter () local delimiter="$1"; local varName="$2"; local dir="$3"; - if [ -d "$dir" ]; then + if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; fi } diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..9eb132a --- /dev/null +++ b/default.nix @@ -0,0 +1,13 @@ +(import + ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { + src = ./.; + }).shellNix diff --git a/flake.lock b/flake.lock index 405e9d8..3f1b359 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,37 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1606424373, + "narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "gitignore": { + "flake": false, + "locked": { + "lastModified": 1611672876, + "narHash": "sha256-qHu3uZ/o9jBHiA3MEKHJ06k7w4heOhA+4HCSIvflRxo=", + "owner": "hercules-ci", + "repo": "gitignore", + "rev": "211907489e9f198594c0eb0ca9256a1949c9d412", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore", + "type": "github" + } + }, "mozillapkgs": { "flake": false, "locked": { @@ -21,11 +53,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1613655351, - "narHash": "sha256-BLBnt3BYsh92qKgqZljckM9s5sZUt30cBQF5b/5pVCU=", + "lastModified": 1618844365, + "narHash": "sha256-Z9t0rr+5OG/ru3jdg3jivfYVU4ydV/nqt8UwIut7uHs=", "owner": "nmattia", "repo": "naersk", - "rev": "1a9e5ddc51bc44c1bf872e02fe2702dc40e8af48", + "rev": "32e3ba39d9d83098b13720a4384bdda191dd0445", "type": "github" }, "original": { @@ -36,11 +68,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1614267055, - "narHash": "sha256-DGhx+THNuZK4btDwp++TlJYXfMxiuhMw3nNLt5w1uA8=", + "lastModified": 1619105186, + "narHash": "sha256-n/+A1JUMhJjs2eQAcWFrC9FRNENWaiLr+q9NKSd1EQU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d982f3677cf9df4cbd5095558a6d954d97e3cc2", + "rev": "cd0ffd3f5fad719586a9b2d06b1faa603da6ba8d", "type": "github" }, "original": { @@ -50,11 +82,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1614267055, - "narHash": "sha256-DGhx+THNuZK4btDwp++TlJYXfMxiuhMw3nNLt5w1uA8=", + "lastModified": 1619105186, + "narHash": "sha256-n/+A1JUMhJjs2eQAcWFrC9FRNENWaiLr+q9NKSd1EQU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d982f3677cf9df4cbd5095558a6d954d97e3cc2", + "rev": "cd0ffd3f5fad719586a9b2d06b1faa603da6ba8d", "type": "github" }, "original": { @@ -64,6 +96,8 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", "mozillapkgs": "mozillapkgs", "naersk": "naersk", "nixpkgs": "nixpkgs_2", @@ -72,11 +106,11 @@ }, "utils": { "locked": { - "lastModified": 1610051610, - "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=", + "lastModified": 1618868421, + "narHash": "sha256-vyoJhLV6cJ8/tWz+l9HZLIkb9Rd9esE7p+0RL6zDR6Y=", "owner": "numtide", "repo": "flake-utils", - "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc", + "rev": "eed214942bcfb3a8cc09eb3b28ca7d7221e44a94", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6a6701e..34d28b8 100644 --- a/flake.nix +++ b/flake.nix @@ -6,12 +6,22 @@ url = "github:mozilla/nixpkgs-mozilla"; flake = false; }; + gitignore = { + url = "github:hercules-ci/gitignore"; + flake = false; + }; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; + }; - outputs = { self, nixpkgs, utils, naersk, mozillapkgs }: + outputs = { self, nixpkgs, utils, naersk, mozillapkgs, gitignore, ... }: utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}"; + inherit (import gitignore { inherit (pkgs) lib; }) gitignoreSource; # Get a specific rust version mozilla = pkgs.callPackage (mozillapkgs + "/package-set.nix") { }; @@ -20,24 +30,31 @@ channel = "nightly"; sha256 = "oK5ebje09MRn988saJMT3Zze/tRE7u9zTeFPV1CEeLc="; # set zeros after modifying channel or date }; - rust = (mozilla.rustChannelOf chanspec).rust; - rust-src = (mozilla.rustChannelOf chanspec).rust-src; - nativeBuildInputs = with pkgs; [ - SDL2 - SDL2_ttf - ]; + rustChannel = mozilla.rustChannelOf chanspec; + rust = rustChannel.rust; + rust-src = rustChannel.rust-src; naersk-lib = naersk.lib."${system}".override { cargo = rust; rustc = rust; }; + + nativeBuildInputs = with pkgs; [ + SDL2 + SDL2_ttf + ]; + in rec { packages.my-project = naersk-lib.buildPackage { - pname = "obi"; + pname = "obiv"; version = "0.1.0"; root = ./.; + inherit nativeBuildInputs; + cargoBuildOptions = + v: + [ "$cargo_release" ''-j "$NIX_BUILD_CORES"'' "--out-dir" "out" "--all-features" "--bin" "obiv" "--message-format=$cargo_message_format" ]; }; defaultPackage = packages.my-project; apps.my-project = utils.lib.mkApp { @@ -55,7 +72,6 @@ RUST_SRC_PATH = "${rust-src}/lib/rustlib/src/rust/library"; RUST_LOG = "info"; RUST_BACKTRACE = 1; - }; }); } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..9eb132a --- /dev/null +++ b/shell.nix @@ -0,0 +1,13 @@ +(import + ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { + src = ./.; + }).shellNix -- cgit v1.2.3