From eba6e3376490f2b0693f75fda7c0b6ab5e68da6c Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 22 Apr 2021 16:59:45 +0530 Subject: add sdl2 dependency --- .direnv/flake-profile | 2 +- .direnv/flake-profile.rc | 23 +++++++++++++++++------ Cargo.toml | 15 +++++++++++++++ flake.nix | 7 ++++++- 4 files changed, 39 insertions(+), 8 deletions(-) diff --git a/.direnv/flake-profile b/.direnv/flake-profile index 0e6e742..85ef145 120000 --- a/.direnv/flake-profile +++ b/.direnv/flake-profile @@ -1 +1 @@ -/nix/store/q3bk2x9q1g2xnah8j9l9xpl2037ks0xv-nix-shell-env \ No newline at end of file +/nix/store/9cnp7wppdlz68wjs949mbyfid4a6kl9c-nix-shell-env \ No newline at end of file diff --git a/.direnv/flake-profile.rc b/.direnv/flake-profile.rc index 3796858..9491dc5 100644 --- a/.direnv/flake-profile.rc +++ b/.direnv/flake-profile.rc @@ -32,7 +32,7 @@ NIX_CC=/nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-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=q3bk2x9q1g' +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' 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/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690/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/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' 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/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/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 export PATH PIPESTATUS=([0]="0") PS4='+ ' @@ -69,6 +69,8 @@ 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 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' +export SDL2_PATH SHELL=/nix/store/yyy7wr7r9jwjjqkr1yn643g3wzv010zd-bash-4.4-p23/bin/bash export SHELL SIZE=size @@ -79,7 +81,7 @@ STRINGS=strings export STRINGS STRIP=strip export STRIP -XDG_DATA_DIRS=/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/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 export XDG_DATA_DIRS _=export buildInputs= @@ -113,13 +115,16 @@ doInstallCheck= export doInstallCheck dontAddDisableDepTrack=1 export dontAddDisableDepTrack +envBuildBuildHooks=([0]="addSDL2Path") +envBuildHostHooks=([0]="addSDL2Path") +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' name=nix-shell export name -nativeBuildInputs='/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/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' export nativeBuildInputs nobuildPhase=$'echo\necho "This derivation is not meant to be built, aborting";\necho\nexit 1\n' export nobuildPhase @@ -141,7 +146,7 @@ export patches phases=nobuildPhase export phases pkg=/nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-gcc-wrapper-10.2.0 -pkgsBuildHost=([0]="/nix/store/58syiz9158g5s53gjh8f5b89bhhp1m0s-rust-1.53.0-nightly-2021-03-30-74874a690" [1]="/nix/store/m0k4il8v2wv0c7nniqndcxh72qmzvvg2-rust-src-1.53.0-nightly-2021-03-30-74874a690" [2]="/nix/store/pj3m562kh9lr7wjk3hlyandhd1qpapgh-rust-analyzer-unstable-2021-02-22" [3]="/nix/store/rfx0jz6pr3n2dcxm99finhbp99v45qx4-rustfmt-1.49.0" [4]="/nix/store/9p0yf4yzsc8by6xviags56c3mb3fxkkw-cargo-1.49.0" [5]="/nix/store/d7lyvmvzf1a8qqhsxhdc3r6dwbdmfcap-patchelf-0.12" [6]="/nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh" [7]="/nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh" [8]="/nix/store/cl3qd985p1yxyfkj96v0hqxiy3w69xq5-compress-man-pages.sh" [9]="/nix/store/h54dzwd7rdh2jlcv91424csl6d0ccgjy-strip.sh" [10]="/nix/store/bnj8d7mvbkg3vdb07yz74yhl3g107qq5-patch-shebangs.sh" [11]="/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh" [12]="/nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh" [13]="/nix/store/c8n9kcdddp9np665xz6ri61b383nxvz8-move-systemd-user-units.sh" [14]="/nix/store/1i5y55x4b4m9qkx5dqbmr1r6bvrqbanw-multiple-outputs.sh" [15]="/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh" [16]="/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh" [17]="/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh" [18]="/nix/store/pr6nzbscdpg94yvr151lrif2kg0csx7b-reproducible-builds.sh" [19]="/nix/store/i9a3zzf2spmw67jppvkj2yavnbka62id-gcc-wrapper-10.2.0" [20]="/nix/store/f4w8p656gg6v2k1v0whwmyk09kz3k8ic-binutils-wrapper-2.35.1") +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") postFixupHooks=([0]="_multioutPropagateDev") postUnpackHooks=([0]="_updateSourceDateEpochFromSourceRoot") preConfigureHooks=([0]="_multioutConfig") @@ -547,6 +552,12 @@ addEnvHooks () eval "${pkgHookVar}s"'+=("$@")'; done } +addSDL2Path () +{ + if [ -e "$1/include/SDL2" ]; then + export SDL2_PATH="${SDL2_PATH-}${SDL2_PATH:+ }$1/include/SDL2"; + fi +} addToSearchPath () { addToSearchPathWithCustomDelimiter ":" "$@" diff --git a/Cargo.toml b/Cargo.toml index d343a43..3234a7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,9 +3,24 @@ name = "obi" version = "0.1.0" authors = ["Akshay "] edition = "2018" +description = "the 1-bit image format" +homepage = "https://github.com/nerdypepper/obi" +repository = "https://github.com/nerdypepper/obi" +readme = './readme.md' +license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] byteorder = "1.4.2" bitvec = "0.21.0" +sdl2 = {version = "0.34", optional = true} + +[features] +default = [] +viewer = ["sdl2"] + +[[bin]] +name = "obiv" +path = "src/bin/viewer.rs" +required-features = ["viewer"] diff --git a/flake.nix b/flake.nix index 2e49eea..6a6701e 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,11 @@ rust = (mozilla.rustChannelOf chanspec).rust; rust-src = (mozilla.rustChannelOf chanspec).rust-src; + nativeBuildInputs = with pkgs; [ + SDL2 + SDL2_ttf + ]; + naersk-lib = naersk.lib."${system}".override { cargo = rust; rustc = rust; @@ -40,7 +45,7 @@ }; defaultApp = apps.my-project; devShell = pkgs.mkShell { - nativeBuildInputs = [ + nativeBuildInputs = nativeBuildInputs ++ [ rust rust-src pkgs.rust-analyzer -- cgit v1.2.3