From b7ee7eb9e941f10a30ce10f6055d495e069e4032 Mon Sep 17 00:00:00 2001 From: Borodinov Ilya Date: Tue, 14 May 2024 15:34:05 +0300 Subject: [PATCH] it compiles --- .devenv/profile | 1 + .devenv/run | 1 + .../05yb0d179k1pw74yxnlhdq9ld30yp9pk-source | 1 - .../0i9zspwqfnr2vjpdbjd4gifnik23v3gn-source | 1 + .../27rg15w6bjjh2hkbdqajhvqd7b02v5cb-source | 1 + .../3cp7q2d0ywi20zhva9bcczisxmq1jxgb-source | 1 - .../49xf0m8xlwppfgx9xa45ybvcsn9yiy18-source | 1 - .../5a09v6jw29b21vvc35rsv5czv0z0nlq8-source | 1 - .../6q5b11kr46mrvipv2fm6wx2qnvsdi8mh-source | 1 - .../8kpx53qi52yhjai1vdw8zpa95iqa61bv-source | 1 + .../8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source | 1 + .../a299nv68x7dm4fc9mj60qwrjn31zvw3z-source | 1 - .../dlrwkbfzbag8f4xj2kbixalscj206j45-source | 1 + .../f2h5kmarn194yda41znm0r4ibwyg8z7i-source | 1 + .../g5v3sgqy6a0fsmas7mnapc196flrplix-source | 1 + .../hwsdv71bmaqvzbii5viryxc8slw4vr5v-source | 1 + .../i4ginw25yf2q0shnzvzjjwa58srbjhw7-source | 1 + .../i6yzq14z49ayjinw6v9v06kqz62akkay-source | 1 + .../ia8xy09wg9si4lbbxgzbyyg1n0qxg1vk-source | 1 + .../lhbcw63xdqclg2hrni4p7dc90nl996lk-source | 1 + .../mhgnysbsr0yx44xlqvl7xymk8js22c7z-source | 1 + .../na7sykizsgkzh9i3wc8m8pz5xfqib2rv-source | 1 + .../nmf1ggxf77gzv7cw5h91d6l1wh4y6qyj-source | 1 - .../paqmjg18kvzmbrbil9g2mq9k4015fd7p-source | 1 - .../pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source | 1 - .../pgid9c9xfcrbqx2giry0an0bi0df7s5c-source | 1 - .../r2ip1850igy8kciyaagw502s3c6ph1s4-source | 1 + .../rzkl4xygy3z1glq8cgrv5cc075ylxs0g-source | 1 - .../s1cnnplqrk8w595dp9fb5cv84xj61lgx-source | 1 + .../v1wzqsqi3d9fhdl60n24sqhj7pr3yhin-source | 1 + .../vz580xz1w41n6m6x81mqgcrnp3y4cf41-source | 1 + ...e-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa | 2 +- ...5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc | 1910 ++++++++++++++++- Cargo.lock | 246 ++- README.md | 3 +- crates/ming/Cargo.toml | 2 +- crates/ming/src/app.rs | 2 +- crates/ming/src/elements/animation.rs | 2 +- crates/ming/src/elements/canvas.rs | 2 +- crates/ming/src/elements/div.rs | 4 +- crates/ming/src/elements/img.rs | 2 +- crates/ming/src/elements/list.rs | 2 +- crates/ming/src/executor.rs | 9 +- crates/ming/src/interactive.rs | 6 +- crates/ming/src/{gpui.rs => lib.rs} | 4 +- crates/ming/src/platform.rs | 2 +- crates/ming/src/platform/blade/blade_atlas.rs | 4 +- crates/ming/src/platform/linux/x11/client.rs | 2 +- crates/ming/src/platform/windows/platform.rs | 2 +- crates/ming/src/styled.rs | 4 +- crates/ming/src/view.rs | 2 +- crates/ming_macros/src/lib.rs | 16 +- crates/ming_macros/src/style_helpers.rs | 4 +- crates/nite/Cargo.toml | 1 + crates/nite/src/main.rs | 36 +- crates/util/Cargo.toml | 8 + crates/util/src/fs.rs | 2 - crates/util/src/http.rs | 5 +- crates/util/src/lib.rs | 1 + flake.lock | 490 +++-- flake.nix | 97 +- 61 files changed, 2599 insertions(+), 304 deletions(-) create mode 120000 .devenv/profile create mode 120000 .devenv/run delete mode 120000 .direnv/flake-inputs/05yb0d179k1pw74yxnlhdq9ld30yp9pk-source create mode 120000 .direnv/flake-inputs/0i9zspwqfnr2vjpdbjd4gifnik23v3gn-source create mode 120000 .direnv/flake-inputs/27rg15w6bjjh2hkbdqajhvqd7b02v5cb-source delete mode 120000 .direnv/flake-inputs/3cp7q2d0ywi20zhva9bcczisxmq1jxgb-source delete mode 120000 .direnv/flake-inputs/49xf0m8xlwppfgx9xa45ybvcsn9yiy18-source delete mode 120000 .direnv/flake-inputs/5a09v6jw29b21vvc35rsv5czv0z0nlq8-source delete mode 120000 .direnv/flake-inputs/6q5b11kr46mrvipv2fm6wx2qnvsdi8mh-source create mode 120000 .direnv/flake-inputs/8kpx53qi52yhjai1vdw8zpa95iqa61bv-source create mode 120000 .direnv/flake-inputs/8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source delete mode 120000 .direnv/flake-inputs/a299nv68x7dm4fc9mj60qwrjn31zvw3z-source create mode 120000 .direnv/flake-inputs/dlrwkbfzbag8f4xj2kbixalscj206j45-source create mode 120000 .direnv/flake-inputs/f2h5kmarn194yda41znm0r4ibwyg8z7i-source create mode 120000 .direnv/flake-inputs/g5v3sgqy6a0fsmas7mnapc196flrplix-source create mode 120000 .direnv/flake-inputs/hwsdv71bmaqvzbii5viryxc8slw4vr5v-source create mode 120000 .direnv/flake-inputs/i4ginw25yf2q0shnzvzjjwa58srbjhw7-source create mode 120000 .direnv/flake-inputs/i6yzq14z49ayjinw6v9v06kqz62akkay-source create mode 120000 .direnv/flake-inputs/ia8xy09wg9si4lbbxgzbyyg1n0qxg1vk-source create mode 120000 .direnv/flake-inputs/lhbcw63xdqclg2hrni4p7dc90nl996lk-source create mode 120000 .direnv/flake-inputs/mhgnysbsr0yx44xlqvl7xymk8js22c7z-source create mode 120000 .direnv/flake-inputs/na7sykizsgkzh9i3wc8m8pz5xfqib2rv-source delete mode 120000 .direnv/flake-inputs/nmf1ggxf77gzv7cw5h91d6l1wh4y6qyj-source delete mode 120000 .direnv/flake-inputs/paqmjg18kvzmbrbil9g2mq9k4015fd7p-source delete mode 120000 .direnv/flake-inputs/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source delete mode 120000 .direnv/flake-inputs/pgid9c9xfcrbqx2giry0an0bi0df7s5c-source create mode 120000 .direnv/flake-inputs/r2ip1850igy8kciyaagw502s3c6ph1s4-source delete mode 120000 .direnv/flake-inputs/rzkl4xygy3z1glq8cgrv5cc075ylxs0g-source create mode 120000 .direnv/flake-inputs/s1cnnplqrk8w595dp9fb5cv84xj61lgx-source create mode 120000 .direnv/flake-inputs/v1wzqsqi3d9fhdl60n24sqhj7pr3yhin-source create mode 120000 .direnv/flake-inputs/vz580xz1w41n6m6x81mqgcrnp3y4cf41-source rename crates/ming/src/{gpui.rs => lib.rs} (99%) diff --git a/.devenv/profile b/.devenv/profile new file mode 120000 index 0000000..56fd81d --- /dev/null +++ b/.devenv/profile @@ -0,0 +1 @@ +/nix/store/wfmdfyk21ibcl78rsjlnxy1fqg0sfk4k-devenv-profile \ No newline at end of file diff --git a/.devenv/run b/.devenv/run new file mode 120000 index 0000000..3966d5b --- /dev/null +++ b/.devenv/run @@ -0,0 +1 @@ +/run/user/1000/devenv-43506f0 \ No newline at end of file diff --git a/.direnv/flake-inputs/05yb0d179k1pw74yxnlhdq9ld30yp9pk-source b/.direnv/flake-inputs/05yb0d179k1pw74yxnlhdq9ld30yp9pk-source deleted file mode 120000 index 1fd9045..0000000 --- a/.direnv/flake-inputs/05yb0d179k1pw74yxnlhdq9ld30yp9pk-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/05yb0d179k1pw74yxnlhdq9ld30yp9pk-source \ No newline at end of file diff --git a/.direnv/flake-inputs/0i9zspwqfnr2vjpdbjd4gifnik23v3gn-source b/.direnv/flake-inputs/0i9zspwqfnr2vjpdbjd4gifnik23v3gn-source new file mode 120000 index 0000000..03177d3 --- /dev/null +++ b/.direnv/flake-inputs/0i9zspwqfnr2vjpdbjd4gifnik23v3gn-source @@ -0,0 +1 @@ +/nix/store/0i9zspwqfnr2vjpdbjd4gifnik23v3gn-source \ No newline at end of file diff --git a/.direnv/flake-inputs/27rg15w6bjjh2hkbdqajhvqd7b02v5cb-source b/.direnv/flake-inputs/27rg15w6bjjh2hkbdqajhvqd7b02v5cb-source new file mode 120000 index 0000000..3ea5c6e --- /dev/null +++ b/.direnv/flake-inputs/27rg15w6bjjh2hkbdqajhvqd7b02v5cb-source @@ -0,0 +1 @@ +/nix/store/27rg15w6bjjh2hkbdqajhvqd7b02v5cb-source \ No newline at end of file diff --git a/.direnv/flake-inputs/3cp7q2d0ywi20zhva9bcczisxmq1jxgb-source b/.direnv/flake-inputs/3cp7q2d0ywi20zhva9bcczisxmq1jxgb-source deleted file mode 120000 index cdf8373..0000000 --- a/.direnv/flake-inputs/3cp7q2d0ywi20zhva9bcczisxmq1jxgb-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/3cp7q2d0ywi20zhva9bcczisxmq1jxgb-source \ No newline at end of file diff --git a/.direnv/flake-inputs/49xf0m8xlwppfgx9xa45ybvcsn9yiy18-source b/.direnv/flake-inputs/49xf0m8xlwppfgx9xa45ybvcsn9yiy18-source deleted file mode 120000 index 0076649..0000000 --- a/.direnv/flake-inputs/49xf0m8xlwppfgx9xa45ybvcsn9yiy18-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/49xf0m8xlwppfgx9xa45ybvcsn9yiy18-source \ No newline at end of file diff --git a/.direnv/flake-inputs/5a09v6jw29b21vvc35rsv5czv0z0nlq8-source b/.direnv/flake-inputs/5a09v6jw29b21vvc35rsv5czv0z0nlq8-source deleted file mode 120000 index 9474608..0000000 --- a/.direnv/flake-inputs/5a09v6jw29b21vvc35rsv5czv0z0nlq8-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/5a09v6jw29b21vvc35rsv5czv0z0nlq8-source \ No newline at end of file diff --git a/.direnv/flake-inputs/6q5b11kr46mrvipv2fm6wx2qnvsdi8mh-source b/.direnv/flake-inputs/6q5b11kr46mrvipv2fm6wx2qnvsdi8mh-source deleted file mode 120000 index 77aa730..0000000 --- a/.direnv/flake-inputs/6q5b11kr46mrvipv2fm6wx2qnvsdi8mh-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/6q5b11kr46mrvipv2fm6wx2qnvsdi8mh-source \ No newline at end of file diff --git a/.direnv/flake-inputs/8kpx53qi52yhjai1vdw8zpa95iqa61bv-source b/.direnv/flake-inputs/8kpx53qi52yhjai1vdw8zpa95iqa61bv-source new file mode 120000 index 0000000..ec68f6a --- /dev/null +++ b/.direnv/flake-inputs/8kpx53qi52yhjai1vdw8zpa95iqa61bv-source @@ -0,0 +1 @@ +/nix/store/8kpx53qi52yhjai1vdw8zpa95iqa61bv-source \ No newline at end of file diff --git a/.direnv/flake-inputs/8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source b/.direnv/flake-inputs/8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source new file mode 120000 index 0000000..c2649c1 --- /dev/null +++ b/.direnv/flake-inputs/8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source @@ -0,0 +1 @@ +/nix/store/8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source \ No newline at end of file diff --git a/.direnv/flake-inputs/a299nv68x7dm4fc9mj60qwrjn31zvw3z-source b/.direnv/flake-inputs/a299nv68x7dm4fc9mj60qwrjn31zvw3z-source deleted file mode 120000 index 3213a49..0000000 --- a/.direnv/flake-inputs/a299nv68x7dm4fc9mj60qwrjn31zvw3z-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/a299nv68x7dm4fc9mj60qwrjn31zvw3z-source \ No newline at end of file diff --git a/.direnv/flake-inputs/dlrwkbfzbag8f4xj2kbixalscj206j45-source b/.direnv/flake-inputs/dlrwkbfzbag8f4xj2kbixalscj206j45-source new file mode 120000 index 0000000..6fc19ed --- /dev/null +++ b/.direnv/flake-inputs/dlrwkbfzbag8f4xj2kbixalscj206j45-source @@ -0,0 +1 @@ +/nix/store/dlrwkbfzbag8f4xj2kbixalscj206j45-source \ No newline at end of file diff --git a/.direnv/flake-inputs/f2h5kmarn194yda41znm0r4ibwyg8z7i-source b/.direnv/flake-inputs/f2h5kmarn194yda41znm0r4ibwyg8z7i-source new file mode 120000 index 0000000..ca09ed7 --- /dev/null +++ b/.direnv/flake-inputs/f2h5kmarn194yda41znm0r4ibwyg8z7i-source @@ -0,0 +1 @@ +/nix/store/f2h5kmarn194yda41znm0r4ibwyg8z7i-source \ No newline at end of file diff --git a/.direnv/flake-inputs/g5v3sgqy6a0fsmas7mnapc196flrplix-source b/.direnv/flake-inputs/g5v3sgqy6a0fsmas7mnapc196flrplix-source new file mode 120000 index 0000000..c425a39 --- /dev/null +++ b/.direnv/flake-inputs/g5v3sgqy6a0fsmas7mnapc196flrplix-source @@ -0,0 +1 @@ +/nix/store/g5v3sgqy6a0fsmas7mnapc196flrplix-source \ No newline at end of file diff --git a/.direnv/flake-inputs/hwsdv71bmaqvzbii5viryxc8slw4vr5v-source b/.direnv/flake-inputs/hwsdv71bmaqvzbii5viryxc8slw4vr5v-source new file mode 120000 index 0000000..96bc5fa --- /dev/null +++ b/.direnv/flake-inputs/hwsdv71bmaqvzbii5viryxc8slw4vr5v-source @@ -0,0 +1 @@ +/nix/store/hwsdv71bmaqvzbii5viryxc8slw4vr5v-source \ No newline at end of file diff --git a/.direnv/flake-inputs/i4ginw25yf2q0shnzvzjjwa58srbjhw7-source b/.direnv/flake-inputs/i4ginw25yf2q0shnzvzjjwa58srbjhw7-source new file mode 120000 index 0000000..e3d1b64 --- /dev/null +++ b/.direnv/flake-inputs/i4ginw25yf2q0shnzvzjjwa58srbjhw7-source @@ -0,0 +1 @@ +/nix/store/i4ginw25yf2q0shnzvzjjwa58srbjhw7-source \ No newline at end of file diff --git a/.direnv/flake-inputs/i6yzq14z49ayjinw6v9v06kqz62akkay-source b/.direnv/flake-inputs/i6yzq14z49ayjinw6v9v06kqz62akkay-source new file mode 120000 index 0000000..2fcf585 --- /dev/null +++ b/.direnv/flake-inputs/i6yzq14z49ayjinw6v9v06kqz62akkay-source @@ -0,0 +1 @@ +/nix/store/i6yzq14z49ayjinw6v9v06kqz62akkay-source \ No newline at end of file diff --git a/.direnv/flake-inputs/ia8xy09wg9si4lbbxgzbyyg1n0qxg1vk-source b/.direnv/flake-inputs/ia8xy09wg9si4lbbxgzbyyg1n0qxg1vk-source new file mode 120000 index 0000000..979b69b --- /dev/null +++ b/.direnv/flake-inputs/ia8xy09wg9si4lbbxgzbyyg1n0qxg1vk-source @@ -0,0 +1 @@ +/nix/store/ia8xy09wg9si4lbbxgzbyyg1n0qxg1vk-source \ No newline at end of file diff --git a/.direnv/flake-inputs/lhbcw63xdqclg2hrni4p7dc90nl996lk-source b/.direnv/flake-inputs/lhbcw63xdqclg2hrni4p7dc90nl996lk-source new file mode 120000 index 0000000..7a82a69 --- /dev/null +++ b/.direnv/flake-inputs/lhbcw63xdqclg2hrni4p7dc90nl996lk-source @@ -0,0 +1 @@ +/nix/store/lhbcw63xdqclg2hrni4p7dc90nl996lk-source \ No newline at end of file diff --git a/.direnv/flake-inputs/mhgnysbsr0yx44xlqvl7xymk8js22c7z-source b/.direnv/flake-inputs/mhgnysbsr0yx44xlqvl7xymk8js22c7z-source new file mode 120000 index 0000000..f628d3a --- /dev/null +++ b/.direnv/flake-inputs/mhgnysbsr0yx44xlqvl7xymk8js22c7z-source @@ -0,0 +1 @@ +/nix/store/mhgnysbsr0yx44xlqvl7xymk8js22c7z-source \ No newline at end of file diff --git a/.direnv/flake-inputs/na7sykizsgkzh9i3wc8m8pz5xfqib2rv-source b/.direnv/flake-inputs/na7sykizsgkzh9i3wc8m8pz5xfqib2rv-source new file mode 120000 index 0000000..9cfec12 --- /dev/null +++ b/.direnv/flake-inputs/na7sykizsgkzh9i3wc8m8pz5xfqib2rv-source @@ -0,0 +1 @@ +/nix/store/na7sykizsgkzh9i3wc8m8pz5xfqib2rv-source \ No newline at end of file diff --git a/.direnv/flake-inputs/nmf1ggxf77gzv7cw5h91d6l1wh4y6qyj-source b/.direnv/flake-inputs/nmf1ggxf77gzv7cw5h91d6l1wh4y6qyj-source deleted file mode 120000 index 916702d..0000000 --- a/.direnv/flake-inputs/nmf1ggxf77gzv7cw5h91d6l1wh4y6qyj-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/nmf1ggxf77gzv7cw5h91d6l1wh4y6qyj-source \ No newline at end of file diff --git a/.direnv/flake-inputs/paqmjg18kvzmbrbil9g2mq9k4015fd7p-source b/.direnv/flake-inputs/paqmjg18kvzmbrbil9g2mq9k4015fd7p-source deleted file mode 120000 index b3bf69f..0000000 --- a/.direnv/flake-inputs/paqmjg18kvzmbrbil9g2mq9k4015fd7p-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/paqmjg18kvzmbrbil9g2mq9k4015fd7p-source \ No newline at end of file diff --git a/.direnv/flake-inputs/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source b/.direnv/flake-inputs/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source deleted file mode 120000 index 25db5a7..0000000 --- a/.direnv/flake-inputs/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/pfc56yr7y3wflvbgnrpscf2n1m4j3xd7-source \ No newline at end of file diff --git a/.direnv/flake-inputs/pgid9c9xfcrbqx2giry0an0bi0df7s5c-source b/.direnv/flake-inputs/pgid9c9xfcrbqx2giry0an0bi0df7s5c-source deleted file mode 120000 index 7b81874..0000000 --- a/.direnv/flake-inputs/pgid9c9xfcrbqx2giry0an0bi0df7s5c-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/pgid9c9xfcrbqx2giry0an0bi0df7s5c-source \ No newline at end of file diff --git a/.direnv/flake-inputs/r2ip1850igy8kciyaagw502s3c6ph1s4-source b/.direnv/flake-inputs/r2ip1850igy8kciyaagw502s3c6ph1s4-source new file mode 120000 index 0000000..b1dabc8 --- /dev/null +++ b/.direnv/flake-inputs/r2ip1850igy8kciyaagw502s3c6ph1s4-source @@ -0,0 +1 @@ +/nix/store/r2ip1850igy8kciyaagw502s3c6ph1s4-source \ No newline at end of file diff --git a/.direnv/flake-inputs/rzkl4xygy3z1glq8cgrv5cc075ylxs0g-source b/.direnv/flake-inputs/rzkl4xygy3z1glq8cgrv5cc075ylxs0g-source deleted file mode 120000 index ad26718..0000000 --- a/.direnv/flake-inputs/rzkl4xygy3z1glq8cgrv5cc075ylxs0g-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/rzkl4xygy3z1glq8cgrv5cc075ylxs0g-source \ No newline at end of file diff --git a/.direnv/flake-inputs/s1cnnplqrk8w595dp9fb5cv84xj61lgx-source b/.direnv/flake-inputs/s1cnnplqrk8w595dp9fb5cv84xj61lgx-source new file mode 120000 index 0000000..3dbdc0c --- /dev/null +++ b/.direnv/flake-inputs/s1cnnplqrk8w595dp9fb5cv84xj61lgx-source @@ -0,0 +1 @@ +/nix/store/s1cnnplqrk8w595dp9fb5cv84xj61lgx-source \ No newline at end of file diff --git a/.direnv/flake-inputs/v1wzqsqi3d9fhdl60n24sqhj7pr3yhin-source b/.direnv/flake-inputs/v1wzqsqi3d9fhdl60n24sqhj7pr3yhin-source new file mode 120000 index 0000000..92d8c93 --- /dev/null +++ b/.direnv/flake-inputs/v1wzqsqi3d9fhdl60n24sqhj7pr3yhin-source @@ -0,0 +1 @@ +/nix/store/v1wzqsqi3d9fhdl60n24sqhj7pr3yhin-source \ No newline at end of file diff --git a/.direnv/flake-inputs/vz580xz1w41n6m6x81mqgcrnp3y4cf41-source b/.direnv/flake-inputs/vz580xz1w41n6m6x81mqgcrnp3y4cf41-source new file mode 120000 index 0000000..959439c --- /dev/null +++ b/.direnv/flake-inputs/vz580xz1w41n6m6x81mqgcrnp3y4cf41-source @@ -0,0 +1 @@ +/nix/store/vz580xz1w41n6m6x81mqgcrnp3y4cf41-source \ No newline at end of file diff --git a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa index 4364e72..ab421f9 120000 --- a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa +++ b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa @@ -1 +1 @@ -/nix/store/fbldsappzwwr5acj8k1km1dy9ahpx9dj-nite-env \ No newline at end of file +/nix/store/xyhi7qx5y8iliadk0ksh9j3w46agp6r0-devenv-shell-env \ No newline at end of file diff --git a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc index 5cb492b..b9ae126 100644 --- a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc +++ b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc @@ -3,60 +3,1930 @@ PATH=${PATH:-} nix_saved_PATH="$PATH" XDG_DATA_DIRS=${XDG_DATA_DIRS:-} nix_saved_XDG_DATA_DIRS="$XDG_DATA_DIRS" -BASH='/noshell' +AR='ar' +export AR +AS='as' +export AS +BASH='/nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26/bin/bash' +CC='gcc' +export CC +CONFIG_SHELL='/nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26/bin/bash' +export CONFIG_SHELL +CXX='g++' +export CXX +DEVENV_DOTFILE='/mnt/k/minky/nite/.devenv' +export DEVENV_DOTFILE +DEVENV_PROFILE='/nix/store/wfmdfyk21ibcl78rsjlnxy1fqg0sfk4k-devenv-profile' +export DEVENV_PROFILE +DEVENV_ROOT='/mnt/k/minky/nite' +export DEVENV_ROOT +DEVENV_RUNTIME='/run/user/1000/devenv-43506f0' +export DEVENV_RUNTIME +DEVENV_STATE='/mnt/k/minky/nite/.devenv/state' +export DEVENV_STATE HOSTTYPE='x86_64' +HOST_PATH='/nix/store/ddypgcb25zgi0gwvklxlzazjrh9s63dg-coreutils-9.5/bin:/nix/store/y21vimynf3h666dvi4z8abzphw8ibibj-findutils-4.9.0/bin:/nix/store/4crhxg3dmy1n16h55rk6banv5xssmsyp-diffutils-3.10/bin:/nix/store/4cps736z7in3d37qc801lwv9z0ib67ps-gnused-4.9/bin:/nix/store/wy37jk2hirzqzx0666w1849kjdgzdam6-gnugrep-3.11/bin:/nix/store/a2ffqcqzbp8k4fmkyhpjq2km0i9wr8d8-gawk-5.2.2/bin:/nix/store/4m4vnjdy44s4sb8hlv4qsph492zz3rly-gnutar-1.35/bin:/nix/store/hragmx5p3izmwinv4441hj5706sxy4xs-gzip-1.13/bin:/nix/store/5giwsjx504zrgzl7cjzxm0s1423wndif-bzip2-1.0.8-bin/bin:/nix/store/qwcdasr63dfp74g7djazx48fx9s28i7a-gnumake-4.4.1/bin:/nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26/bin:/nix/store/lj804cdk0fcf9yhgqrvgaqv2dc3lmfgp-patch-2.7.6/bin:/nix/store/3iiml9pwff4y6zsis1gp4apbry1h1wfr-xz-5.4.6-bin/bin:/nix/store/kaiq352476xq7zb1p06yranc5j3jjlz2-file-5.45/bin' +export HOST_PATH IFS=' ' IN_NIX_SHELL='impure' export IN_NIX_SHELL +LD='ld' +export LD +LD_LIBRARY_PATH='/nix/store/mil8a9jgadf9jjd4a9fw88l9kqxzdd49-pkg-config-wrapper-0.29.2/lib:/nix/store/dpgf3v45qli2irgvzhlm90q0i54iwsra-fontconfig-2.15.0-dev/lib:/nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev/lib:/nix/store/8f10pxi30lvkdjrkzfw5gzz4rzia8163-openssl-3.0.13/lib:/nix/store/h0aal69rli3p604dmijx7mps1diwx4f3-libX11-1.8.9/lib:/nix/store/h0aal69rli3p604dmijx7mps1diwx4f3-libX11-1.8.9/lib:/nix/store/h6h29n0pv86n3r70fdcl2b96kpblffj5-libXcursor-1.2.2/lib:/nix/store/83fywhh4p1bw1df21kjkiqs4dq24f6j7-libXi-1.8.1/lib:/nix/store/nn8n0jxm4wsphi1xlvynjw72176kkdg1-libXrandr-1.5.4/lib:/nix/store/sx108j0la4slxp8cr15kyg8jjy79p3dn-libxkbcommon-1.7.0/lib:/nix/store/2kl8zy4yql419zsywn9q65hrp4fsjnj2-wayland-1.22.0/lib:/nix/store/h6yiakrrww2js0ngakgr6ddxdjjp60sn-vulkan-tools-1.3.280.0/lib:/nix/store/71m8cqhw5b7d2bz2971n2n5i5xc383kw-vulkan-headers-1.3.280.0/lib:/nix/store/g4z99lhm1whxz58vcqq2snxin0kvhzc2-vulkan-validation-layers-1.3.280.0/lib:/nix/store/7rs73b2461wcsqsg6lahxy6v5cl4kj9v-vulkan-loader-1.3.280.0/lib:/nix/store/8f64rn26nd0cyy0brblzyn064fmcmy79-systemd-minimal-libs-255.4/lib' +export LD_LIBRARY_PATH LINENO='76' MACHTYPE='x86_64-pc-linux-gnu' -NIX_BUILD_CORES='0' +NIX_BINTOOLS='/nix/store/m3gq2f6iwh3g67zrs27m7w82b37l8gf8-binutils-wrapper-2.41' +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='16' export NIX_BUILD_CORES +NIX_CC='/nix/store/md6hh4rrcrf99nssvcam3qaqs3skj086-gcc-wrapper-13.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=xyhi7qx5y8 -isystem /nix/store/dpgf3v45qli2irgvzhlm90q0i54iwsra-fontconfig-2.15.0-dev/include -isystem /nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev/include -isystem /nix/store/wz1lmhhmvjxj2ipp2z5mvkydchhljggm-zlib-1.3.1-dev/include -isystem /nix/store/cz5vp8p8rzlq46qwsh6bxh3ymxs70skp-bzip2-1.0.8-dev/include -isystem /nix/store/9m1zwv61brcjjnc36qrwvx67xmcfqajm-brotli-1.1.0-dev/include -isystem /nix/store/997rri8chjh3blxpf5i3dn5c8nzq2y60-libpng-apng-1.6.43-dev/include -isystem /nix/store/0bp9inq3wd4car25n60idlfics6fajjv-openssl-3.0.13-dev/include -isystem /nix/store/vy0l2k4kh51w7hkqbnakyapgvsmgbwmb-libX11-1.8.9-dev/include -isystem /nix/store/9yjmpbn9x09b29plxvzq8p5wyvn15ap1-xorgproto-2024.1/include -isystem /nix/store/5b1kh5bgxb4y2wyjd9mza5781k0jgllh-libxcb-1.17.0-dev/include -isystem /nix/store/sf2rr672wz6xalv0bcix9j944j9graq4-libXcursor-1.2.2-dev/include -isystem /nix/store/xacx6igvzsc2fcgcyjdqyr5swv8a399a-libXi-1.8.1-dev/include -isystem /nix/store/3qs7qkqqy2izngsxdlflly14f98ii5cv-libXfixes-6.0.1-dev/include -isystem /nix/store/kracbbdhivyy1hsmsy78g62g49fb4yyz-libXext-1.3.6-dev/include -isystem /nix/store/w4wkxc261brlclagwxr0icck54dhk68d-libXau-1.0.11-dev/include -isystem /nix/store/2yx26204avg40jmhgb5j5i3pxn2zv3ai-libXrandr-1.5.4-dev/include -isystem /nix/store/r11lq032drbzvblbd3vmv6i1nwczg4s7-libXrender-0.9.11-dev/include -isystem /nix/store/cqsd8hp3lhkvql8rpncd7glxk81lzqy2-libxkbcommon-1.7.0-dev/include -isystem /nix/store/hzbp77x0zjyrhgirym2l1ikr1r5p7b8g-wayland-1.22.0-dev/include -isystem /nix/store/71m8cqhw5b7d2bz2971n2n5i5xc383kw-vulkan-headers-1.3.280.0/include -isystem /nix/store/axvmifip8rq7w2caw42sgi23lzh8ff5m-systemd-minimal-libs-255.4-dev/include -isystem /nix/store/dpgf3v45qli2irgvzhlm90q0i54iwsra-fontconfig-2.15.0-dev/include -isystem /nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev/include -isystem /nix/store/wz1lmhhmvjxj2ipp2z5mvkydchhljggm-zlib-1.3.1-dev/include -isystem /nix/store/cz5vp8p8rzlq46qwsh6bxh3ymxs70skp-bzip2-1.0.8-dev/include -isystem /nix/store/9m1zwv61brcjjnc36qrwvx67xmcfqajm-brotli-1.1.0-dev/include -isystem /nix/store/997rri8chjh3blxpf5i3dn5c8nzq2y60-libpng-apng-1.6.43-dev/include -isystem /nix/store/0bp9inq3wd4car25n60idlfics6fajjv-openssl-3.0.13-dev/include -isystem /nix/store/vy0l2k4kh51w7hkqbnakyapgvsmgbwmb-libX11-1.8.9-dev/include -isystem /nix/store/9yjmpbn9x09b29plxvzq8p5wyvn15ap1-xorgproto-2024.1/include -isystem /nix/store/5b1kh5bgxb4y2wyjd9mza5781k0jgllh-libxcb-1.17.0-dev/include -isystem /nix/store/sf2rr672wz6xalv0bcix9j944j9graq4-libXcursor-1.2.2-dev/include -isystem /nix/store/xacx6igvzsc2fcgcyjdqyr5swv8a399a-libXi-1.8.1-dev/include -isystem /nix/store/3qs7qkqqy2izngsxdlflly14f98ii5cv-libXfixes-6.0.1-dev/include -isystem /nix/store/kracbbdhivyy1hsmsy78g62g49fb4yyz-libXext-1.3.6-dev/include -isystem /nix/store/w4wkxc261brlclagwxr0icck54dhk68d-libXau-1.0.11-dev/include -isystem /nix/store/2yx26204avg40jmhgb5j5i3pxn2zv3ai-libXrandr-1.5.4-dev/include -isystem /nix/store/r11lq032drbzvblbd3vmv6i1nwczg4s7-libXrender-0.9.11-dev/include -isystem /nix/store/cqsd8hp3lhkvql8rpncd7glxk81lzqy2-libxkbcommon-1.7.0-dev/include -isystem /nix/store/hzbp77x0zjyrhgirym2l1ikr1r5p7b8g-wayland-1.22.0-dev/include -isystem /nix/store/71m8cqhw5b7d2bz2971n2n5i5xc383kw-vulkan-headers-1.3.280.0/include -isystem /nix/store/axvmifip8rq7w2caw42sgi23lzh8ff5m-systemd-minimal-libs-255.4-dev/include' +export NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE='1' +export NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE='bindnow format fortify fortify3 pic relro stackprotector strictoverflow' +export NIX_HARDENING_ENABLE +NIX_LDFLAGS='-rpath /mnt/k/minky/nite/outputs/out/lib -L/nix/store/nw1bnjadmzk9hnd4nbvxmqlh074vr16j-zlib-1.3.1/lib -L/nix/store/q4k8gmw2gpncglwdvz9fmqqwnynsb143-bzip2-1.0.8/lib -L/nix/store/qa2j4ql5vb7n1zyi8ai5acivsjkg0l8m-brotli-1.1.0-lib/lib -L/nix/store/31l4c9kwx37gy2cr1xiswbbp4azsyp1n-libpng-apng-1.6.43/lib -L/nix/store/8ilnvaa1d66z1qn866phpdx5jpam0lm7-freetype-2.13.2/lib -L/nix/store/b2f6xbjgm7zs6z0hrvmwpxhiacigc4nh-fontconfig-2.15.0-lib/lib -L/nix/store/8f10pxi30lvkdjrkzfw5gzz4rzia8163-openssl-3.0.13/lib -L/nix/store/cvbf30dc4mamggijbxwlwxaxd7q4wch1-libxcb-1.17.0/lib -L/nix/store/h0aal69rli3p604dmijx7mps1diwx4f3-libX11-1.8.9/lib -L/nix/store/h6h29n0pv86n3r70fdcl2b96kpblffj5-libXcursor-1.2.2/lib -L/nix/store/5qfaigrq13k1fkyvzzdzdwj7c4iiyayr-libXfixes-6.0.1/lib -L/nix/store/mhs3ys5lbahsvrai5y0fv49q2xp4pc31-libXau-1.0.11/lib -L/nix/store/pdikq8hwkj15d1jvlv48p98xn0xnn4dx-libXext-1.3.6/lib -L/nix/store/83fywhh4p1bw1df21kjkiqs4dq24f6j7-libXi-1.8.1/lib -L/nix/store/7hg9q26kil1lc0aph6ipx4lhg7zilbvv-libXrender-0.9.11/lib -L/nix/store/nn8n0jxm4wsphi1xlvynjw72176kkdg1-libXrandr-1.5.4/lib -L/nix/store/sx108j0la4slxp8cr15kyg8jjy79p3dn-libxkbcommon-1.7.0/lib -L/nix/store/2kl8zy4yql419zsywn9q65hrp4fsjnj2-wayland-1.22.0/lib -L/nix/store/g4z99lhm1whxz58vcqq2snxin0kvhzc2-vulkan-validation-layers-1.3.280.0/lib -L/nix/store/7rs73b2461wcsqsg6lahxy6v5cl4kj9v-vulkan-loader-1.3.280.0/lib -L/nix/store/8f64rn26nd0cyy0brblzyn064fmcmy79-systemd-minimal-libs-255.4/lib -L/nix/store/nw1bnjadmzk9hnd4nbvxmqlh074vr16j-zlib-1.3.1/lib -L/nix/store/q4k8gmw2gpncglwdvz9fmqqwnynsb143-bzip2-1.0.8/lib -L/nix/store/qa2j4ql5vb7n1zyi8ai5acivsjkg0l8m-brotli-1.1.0-lib/lib -L/nix/store/31l4c9kwx37gy2cr1xiswbbp4azsyp1n-libpng-apng-1.6.43/lib -L/nix/store/8ilnvaa1d66z1qn866phpdx5jpam0lm7-freetype-2.13.2/lib -L/nix/store/b2f6xbjgm7zs6z0hrvmwpxhiacigc4nh-fontconfig-2.15.0-lib/lib -L/nix/store/8f10pxi30lvkdjrkzfw5gzz4rzia8163-openssl-3.0.13/lib -L/nix/store/cvbf30dc4mamggijbxwlwxaxd7q4wch1-libxcb-1.17.0/lib -L/nix/store/h0aal69rli3p604dmijx7mps1diwx4f3-libX11-1.8.9/lib -L/nix/store/h6h29n0pv86n3r70fdcl2b96kpblffj5-libXcursor-1.2.2/lib -L/nix/store/5qfaigrq13k1fkyvzzdzdwj7c4iiyayr-libXfixes-6.0.1/lib -L/nix/store/mhs3ys5lbahsvrai5y0fv49q2xp4pc31-libXau-1.0.11/lib -L/nix/store/pdikq8hwkj15d1jvlv48p98xn0xnn4dx-libXext-1.3.6/lib -L/nix/store/83fywhh4p1bw1df21kjkiqs4dq24f6j7-libXi-1.8.1/lib -L/nix/store/7hg9q26kil1lc0aph6ipx4lhg7zilbvv-libXrender-0.9.11/lib -L/nix/store/nn8n0jxm4wsphi1xlvynjw72176kkdg1-libXrandr-1.5.4/lib -L/nix/store/sx108j0la4slxp8cr15kyg8jjy79p3dn-libxkbcommon-1.7.0/lib -L/nix/store/2kl8zy4yql419zsywn9q65hrp4fsjnj2-wayland-1.22.0/lib -L/nix/store/g4z99lhm1whxz58vcqq2snxin0kvhzc2-vulkan-validation-layers-1.3.280.0/lib -L/nix/store/7rs73b2461wcsqsg6lahxy6v5cl4kj9v-vulkan-loader-1.3.280.0/lib -L/nix/store/8f64rn26nd0cyy0brblzyn064fmcmy79-systemd-minimal-libs-255.4/lib' +export NIX_LDFLAGS +NIX_NO_SELF_RPATH='1' +NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' +export NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu NIX_STORE='/nix/store' export NIX_STORE +NM='nm' +export NM +OBJCOPY='objcopy' +export OBJCOPY +OBJDUMP='objdump' +export OBJDUMP OLDPWD='' export OLDPWD OPTERR='1' OSTYPE='linux-gnu' -PATH='/path-not-set' +PATH='/nix/store/yd1y6raddkdpdbdi4cvj862yv5ijkkfa-fmt/bin:/nix/store/fy2wgifw5azj20i6n1izx36phqqvff98-nite/bin:/nix/store/mil8a9jgadf9jjd4a9fw88l9kqxzdd49-pkg-config-wrapper-0.29.2/bin:/nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev/bin:/nix/store/5giwsjx504zrgzl7cjzxm0s1423wndif-bzip2-1.0.8-bin/bin:/nix/store/p5qmhrmy35sz6aqm4brds8hk9pcsm1db-brotli-1.1.0/bin:/nix/store/997rri8chjh3blxpf5i3dn5c8nzq2y60-libpng-apng-1.6.43-dev/bin:/nix/store/wd9k0b25bm9qp5q5qbkqc680xbgy1wmh-fontconfig-2.15.0-bin/bin:/nix/store/pmg30939m4ymrqy83fzyzrlhnzd69dl4-openssl-3.0.13-bin/bin:/nix/store/sx108j0la4slxp8cr15kyg8jjy79p3dn-libxkbcommon-1.7.0/bin:/nix/store/j2d9i3rsdnvrwrbygz8c7d7axyh6vqp3-wayland-1.22.0-bin/bin:/nix/store/h6yiakrrww2js0ngakgr6ddxdjjp60sn-vulkan-tools-1.3.280.0/bin:/nix/store/n74bf0rpsazxb9i23wlzidkzk017py3v-devenv/bin:/nix/store/8g7b1jkj5fpq1xcy5jgxfn9fxjwhxzvb-patchelf-0.15.0/bin:/nix/store/md6hh4rrcrf99nssvcam3qaqs3skj086-gcc-wrapper-13.2.0/bin:/nix/store/9hgsinpfgyvsd92v0wlvmxv9wnaal68r-gcc-13.2.0/bin:/nix/store/nkdgysx90pln2l562l7lsk021hbxjdg8-glibc-2.39-31-bin/bin:/nix/store/ddypgcb25zgi0gwvklxlzazjrh9s63dg-coreutils-9.5/bin:/nix/store/m3gq2f6iwh3g67zrs27m7w82b37l8gf8-binutils-wrapper-2.41/bin:/nix/store/nd7ass1isid4vswpkfm82za4mcdwhzsm-binutils-2.41/bin:/nix/store/ddypgcb25zgi0gwvklxlzazjrh9s63dg-coreutils-9.5/bin:/nix/store/y21vimynf3h666dvi4z8abzphw8ibibj-findutils-4.9.0/bin:/nix/store/4crhxg3dmy1n16h55rk6banv5xssmsyp-diffutils-3.10/bin:/nix/store/4cps736z7in3d37qc801lwv9z0ib67ps-gnused-4.9/bin:/nix/store/wy37jk2hirzqzx0666w1849kjdgzdam6-gnugrep-3.11/bin:/nix/store/a2ffqcqzbp8k4fmkyhpjq2km0i9wr8d8-gawk-5.2.2/bin:/nix/store/4m4vnjdy44s4sb8hlv4qsph492zz3rly-gnutar-1.35/bin:/nix/store/hragmx5p3izmwinv4441hj5706sxy4xs-gzip-1.13/bin:/nix/store/5giwsjx504zrgzl7cjzxm0s1423wndif-bzip2-1.0.8-bin/bin:/nix/store/qwcdasr63dfp74g7djazx48fx9s28i7a-gnumake-4.4.1/bin:/nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26/bin:/nix/store/lj804cdk0fcf9yhgqrvgaqv2dc3lmfgp-patch-2.7.6/bin:/nix/store/3iiml9pwff4y6zsis1gp4apbry1h1wfr-xz-5.4.6-bin/bin:/nix/store/kaiq352476xq7zb1p06yranc5j3jjlz2-file-5.45/bin' export PATH +PKG_CONFIG='pkg-config' +export PKG_CONFIG +PKG_CONFIG_PATH='/nix/store/dpgf3v45qli2irgvzhlm90q0i54iwsra-fontconfig-2.15.0-dev/lib/pkgconfig:/nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev/lib/pkgconfig:/nix/store/wz1lmhhmvjxj2ipp2z5mvkydchhljggm-zlib-1.3.1-dev/lib/pkgconfig:/nix/store/cz5vp8p8rzlq46qwsh6bxh3ymxs70skp-bzip2-1.0.8-dev/lib/pkgconfig:/nix/store/9m1zwv61brcjjnc36qrwvx67xmcfqajm-brotli-1.1.0-dev/lib/pkgconfig:/nix/store/997rri8chjh3blxpf5i3dn5c8nzq2y60-libpng-apng-1.6.43-dev/lib/pkgconfig:/nix/store/0bp9inq3wd4car25n60idlfics6fajjv-openssl-3.0.13-dev/lib/pkgconfig:/nix/store/vy0l2k4kh51w7hkqbnakyapgvsmgbwmb-libX11-1.8.9-dev/lib/pkgconfig:/nix/store/9yjmpbn9x09b29plxvzq8p5wyvn15ap1-xorgproto-2024.1/share/pkgconfig:/nix/store/5b1kh5bgxb4y2wyjd9mza5781k0jgllh-libxcb-1.17.0-dev/lib/pkgconfig:/nix/store/sf2rr672wz6xalv0bcix9j944j9graq4-libXcursor-1.2.2-dev/lib/pkgconfig:/nix/store/xacx6igvzsc2fcgcyjdqyr5swv8a399a-libXi-1.8.1-dev/lib/pkgconfig:/nix/store/3qs7qkqqy2izngsxdlflly14f98ii5cv-libXfixes-6.0.1-dev/lib/pkgconfig:/nix/store/kracbbdhivyy1hsmsy78g62g49fb4yyz-libXext-1.3.6-dev/lib/pkgconfig:/nix/store/w4wkxc261brlclagwxr0icck54dhk68d-libXau-1.0.11-dev/lib/pkgconfig:/nix/store/2yx26204avg40jmhgb5j5i3pxn2zv3ai-libXrandr-1.5.4-dev/lib/pkgconfig:/nix/store/r11lq032drbzvblbd3vmv6i1nwczg4s7-libXrender-0.9.11-dev/lib/pkgconfig:/nix/store/cqsd8hp3lhkvql8rpncd7glxk81lzqy2-libxkbcommon-1.7.0-dev/lib/pkgconfig:/nix/store/hzbp77x0zjyrhgirym2l1ikr1r5p7b8g-wayland-1.22.0-dev/lib/pkgconfig:/nix/store/j2d9i3rsdnvrwrbygz8c7d7axyh6vqp3-wayland-1.22.0-bin/lib/pkgconfig:/nix/store/i5m3r5khf90fbhijcxjvh81j5vxm0k6f-vulkan-loader-1.3.280.0-dev/lib/pkgconfig:/nix/store/axvmifip8rq7w2caw42sgi23lzh8ff5m-systemd-minimal-libs-255.4-dev/lib/pkgconfig:/nix/store/axvmifip8rq7w2caw42sgi23lzh8ff5m-systemd-minimal-libs-255.4-dev/share/pkgconfig' +export PKG_CONFIG_PATH PS4='+ ' -builder='/nix/store/nnvsjd3f3dh9wdl4s9mwg5cfri8kds5j-bash-interactive-5.2p26/bin/bash' +RANLIB='ranlib' +export RANLIB +READELF='readelf' +export READELF +SIZE='size' +export SIZE +SOURCE_DATE_EPOCH='315532800' +export SOURCE_DATE_EPOCH +STRINGS='strings' +export STRINGS +STRIP='strip' +export STRIP +XDG_DATA_DIRS='/nix/store/mil8a9jgadf9jjd4a9fw88l9kqxzdd49-pkg-config-wrapper-0.29.2/share:/nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev/share:/nix/store/nw1bnjadmzk9hnd4nbvxmqlh074vr16j-zlib-1.3.1/share:/nix/store/p5qmhrmy35sz6aqm4brds8hk9pcsm1db-brotli-1.1.0/share:/nix/store/8ilnvaa1d66z1qn866phpdx5jpam0lm7-freetype-2.13.2/share:/nix/store/wd9k0b25bm9qp5q5qbkqc680xbgy1wmh-fontconfig-2.15.0-bin/share:/nix/store/b2f6xbjgm7zs6z0hrvmwpxhiacigc4nh-fontconfig-2.15.0-lib/share:/nix/store/9yjmpbn9x09b29plxvzq8p5wyvn15ap1-xorgproto-2024.1/share:/nix/store/h0aal69rli3p604dmijx7mps1diwx4f3-libX11-1.8.9/share:/nix/store/h6h29n0pv86n3r70fdcl2b96kpblffj5-libXcursor-1.2.2/share:/nix/store/5qfaigrq13k1fkyvzzdzdwj7c4iiyayr-libXfixes-6.0.1/share:/nix/store/mhs3ys5lbahsvrai5y0fv49q2xp4pc31-libXau-1.0.11/share:/nix/store/nn8n0jxm4wsphi1xlvynjw72176kkdg1-libXrandr-1.5.4/share:/nix/store/sx108j0la4slxp8cr15kyg8jjy79p3dn-libxkbcommon-1.7.0/share:/nix/store/hzbp77x0zjyrhgirym2l1ikr1r5p7b8g-wayland-1.22.0-dev/share:/nix/store/2kl8zy4yql419zsywn9q65hrp4fsjnj2-wayland-1.22.0/share:/nix/store/71m8cqhw5b7d2bz2971n2n5i5xc383kw-vulkan-headers-1.3.280.0/share:/nix/store/g4z99lhm1whxz58vcqq2snxin0kvhzc2-vulkan-validation-layers-1.3.280.0/share:/nix/store/axvmifip8rq7w2caw42sgi23lzh8ff5m-systemd-minimal-libs-255.4-dev/share:/nix/store/8g7b1jkj5fpq1xcy5jgxfn9fxjwhxzvb-patchelf-0.15.0/share' +export XDG_DATA_DIRS +__structuredAttrs='' +export __structuredAttrs +_substituteStream_has_warned_replace_deprecation='false' +buildInputs='' +export buildInputs +buildPhase='{ echo "------------------------------------------------------------"; + echo " WARNING: the existence of this path is not guaranteed."; + echo " It is an internal implementation detail for pkgs.mkShell."; + echo "------------------------------------------------------------"; + echo; + # Record all build inputs as runtime dependencies + export; +} >> "$out" +' +export buildPhase +builder='/nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26/bin/bash' export builder +cmakeFlags='' +export cmakeFlags +configureFlags='' +export configureFlags +defaultBuildInputs='' +defaultNativeBuildInputs='/nix/store/8g7b1jkj5fpq1xcy5jgxfn9fxjwhxzvb-patchelf-0.15.0 /nix/store/b9mcp2as85ckbh8v0821y7z06fixypqx-update-autotools-gnu-config-scripts-hook /nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh /nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh /nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh /nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh /nix/store/ilaf1w22bxi6jsi45alhmvvdgy4ly3zs-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh /nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh /nix/store/wmknncrif06fqxa16hpdldhixk95nds0-strip.sh /nix/store/md6hh4rrcrf99nssvcam3qaqs3skj086-gcc-wrapper-13.2.0' +depsBuildBuild='' +export depsBuildBuild +depsBuildBuildPropagated='' +export depsBuildBuildPropagated +depsBuildTarget='' +export depsBuildTarget +depsBuildTargetPropagated='' +export depsBuildTargetPropagated +depsHostHost='' +export depsHostHost +depsHostHostPropagated='' +export depsHostHostPropagated +depsTargetTarget='' +export depsTargetTarget +depsTargetTargetPropagated='' +export depsTargetTargetPropagated +doCheck='' +export doCheck +doInstallCheck='' +export doInstallCheck dontAddDisableDepTrack='1' export dontAddDisableDepTrack -name='nite-env' +declare -a envBuildBuildHooks=() +declare -a envBuildHostHooks=() +declare -a envBuildTargetHooks=() +declare -a envHostHostHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) +declare -a envHostTargetHooks=('pkgConfigWrapper_addPkgConfigPath' 'ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) +declare -a envTargetTargetHooks=() +declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_moveLib64' '_moveSbin' '_moveSystemdUserUnits' 'patchShebangsAuto' '_pruneLibtoolFiles' '_doStrip' ) +guess='16' +initialPath='/nix/store/ddypgcb25zgi0gwvklxlzazjrh9s63dg-coreutils-9.5 /nix/store/y21vimynf3h666dvi4z8abzphw8ibibj-findutils-4.9.0 /nix/store/4crhxg3dmy1n16h55rk6banv5xssmsyp-diffutils-3.10 /nix/store/4cps736z7in3d37qc801lwv9z0ib67ps-gnused-4.9 /nix/store/wy37jk2hirzqzx0666w1849kjdgzdam6-gnugrep-3.11 /nix/store/a2ffqcqzbp8k4fmkyhpjq2km0i9wr8d8-gawk-5.2.2 /nix/store/4m4vnjdy44s4sb8hlv4qsph492zz3rly-gnutar-1.35 /nix/store/hragmx5p3izmwinv4441hj5706sxy4xs-gzip-1.13 /nix/store/5giwsjx504zrgzl7cjzxm0s1423wndif-bzip2-1.0.8-bin /nix/store/qwcdasr63dfp74g7djazx48fx9s28i7a-gnumake-4.4.1 /nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26 /nix/store/lj804cdk0fcf9yhgqrvgaqv2dc3lmfgp-patch-2.7.6 /nix/store/3iiml9pwff4y6zsis1gp4apbry1h1wfr-xz-5.4.6-bin /nix/store/kaiq352476xq7zb1p06yranc5j3jjlz2-file-5.45' +mesonFlags='' +export mesonFlags +name='devenv-shell-env' export name +nativeBuildInputs='/nix/store/yd1y6raddkdpdbdi4cvj862yv5ijkkfa-fmt /nix/store/fy2wgifw5azj20i6n1izx36phqqvff98-nite /nix/store/mil8a9jgadf9jjd4a9fw88l9kqxzdd49-pkg-config-wrapper-0.29.2 /nix/store/dpgf3v45qli2irgvzhlm90q0i54iwsra-fontconfig-2.15.0-dev /nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev /nix/store/0bp9inq3wd4car25n60idlfics6fajjv-openssl-3.0.13-dev /nix/store/vy0l2k4kh51w7hkqbnakyapgvsmgbwmb-libX11-1.8.9-dev /nix/store/vy0l2k4kh51w7hkqbnakyapgvsmgbwmb-libX11-1.8.9-dev /nix/store/sf2rr672wz6xalv0bcix9j944j9graq4-libXcursor-1.2.2-dev /nix/store/xacx6igvzsc2fcgcyjdqyr5swv8a399a-libXi-1.8.1-dev /nix/store/2yx26204avg40jmhgb5j5i3pxn2zv3ai-libXrandr-1.5.4-dev /nix/store/cqsd8hp3lhkvql8rpncd7glxk81lzqy2-libxkbcommon-1.7.0-dev /nix/store/hzbp77x0zjyrhgirym2l1ikr1r5p7b8g-wayland-1.22.0-dev /nix/store/h6yiakrrww2js0ngakgr6ddxdjjp60sn-vulkan-tools-1.3.280.0 /nix/store/71m8cqhw5b7d2bz2971n2n5i5xc383kw-vulkan-headers-1.3.280.0 /nix/store/g4z99lhm1whxz58vcqq2snxin0kvhzc2-vulkan-validation-layers-1.3.280.0 /nix/store/i5m3r5khf90fbhijcxjvh81j5vxm0k6f-vulkan-loader-1.3.280.0-dev /nix/store/axvmifip8rq7w2caw42sgi23lzh8ff5m-systemd-minimal-libs-255.4-dev /nix/store/n74bf0rpsazxb9i23wlzidkzk017py3v-devenv /nix/store/mil8a9jgadf9jjd4a9fw88l9kqxzdd49-pkg-config-wrapper-0.29.2' +export nativeBuildInputs out='/mnt/k/minky/nite/outputs/out' export out +outputBin='out' +outputDev='out' +outputDevdoc='REMOVE' +outputDevman='out' +outputDoc='out' +outputInclude='out' +outputInfo='out' +outputLib='out' +outputMan='out' outputs='out' -shellHook='# Remove all the unnecessary noise that is set by the build env -unset NIX_BUILD_TOP NIX_BUILD_CORES NIX_STORE -unset TEMP TEMPDIR TMP TMPDIR -# $name variable is preserved to keep it compatible with pure shell https://github.com/sindresorhus/pure/blob/47c0c881f0e7cfdb5eaccd335f52ad17b897c060/pure.zsh#L235 -unset builder out shellHook stdenv system -# Flakes stuff -unset dontAddDisableDepTrack outputs +export outputs +patches='' +export patches +phases='buildPhase' +export phases +pkg='/nix/store/md6hh4rrcrf99nssvcam3qaqs3skj086-gcc-wrapper-13.2.0' +declare -a pkgsBuildBuild=() +declare -a pkgsBuildHost=('/nix/store/yd1y6raddkdpdbdi4cvj862yv5ijkkfa-fmt' '/nix/store/fy2wgifw5azj20i6n1izx36phqqvff98-nite' '/nix/store/mil8a9jgadf9jjd4a9fw88l9kqxzdd49-pkg-config-wrapper-0.29.2' '/nix/store/dpgf3v45qli2irgvzhlm90q0i54iwsra-fontconfig-2.15.0-dev' '/nix/store/d9dj22m1qpvcqr4b2skxwh467a6hlrsb-freetype-2.13.2-dev' '/nix/store/wz1lmhhmvjxj2ipp2z5mvkydchhljggm-zlib-1.3.1-dev' '/nix/store/nw1bnjadmzk9hnd4nbvxmqlh074vr16j-zlib-1.3.1' '/nix/store/cz5vp8p8rzlq46qwsh6bxh3ymxs70skp-bzip2-1.0.8-dev' '/nix/store/5giwsjx504zrgzl7cjzxm0s1423wndif-bzip2-1.0.8-bin' '/nix/store/q4k8gmw2gpncglwdvz9fmqqwnynsb143-bzip2-1.0.8' '/nix/store/9m1zwv61brcjjnc36qrwvx67xmcfqajm-brotli-1.1.0-dev' '/nix/store/qa2j4ql5vb7n1zyi8ai5acivsjkg0l8m-brotli-1.1.0-lib' '/nix/store/p5qmhrmy35sz6aqm4brds8hk9pcsm1db-brotli-1.1.0' '/nix/store/997rri8chjh3blxpf5i3dn5c8nzq2y60-libpng-apng-1.6.43-dev' '/nix/store/31l4c9kwx37gy2cr1xiswbbp4azsyp1n-libpng-apng-1.6.43' '/nix/store/8ilnvaa1d66z1qn866phpdx5jpam0lm7-freetype-2.13.2' '/nix/store/wd9k0b25bm9qp5q5qbkqc680xbgy1wmh-fontconfig-2.15.0-bin' '/nix/store/b2f6xbjgm7zs6z0hrvmwpxhiacigc4nh-fontconfig-2.15.0-lib' '/nix/store/0bp9inq3wd4car25n60idlfics6fajjv-openssl-3.0.13-dev' '/nix/store/pmg30939m4ymrqy83fzyzrlhnzd69dl4-openssl-3.0.13-bin' '/nix/store/8f10pxi30lvkdjrkzfw5gzz4rzia8163-openssl-3.0.13' '/nix/store/vy0l2k4kh51w7hkqbnakyapgvsmgbwmb-libX11-1.8.9-dev' '/nix/store/9yjmpbn9x09b29plxvzq8p5wyvn15ap1-xorgproto-2024.1' '/nix/store/5b1kh5bgxb4y2wyjd9mza5781k0jgllh-libxcb-1.17.0-dev' '/nix/store/cvbf30dc4mamggijbxwlwxaxd7q4wch1-libxcb-1.17.0' '/nix/store/h0aal69rli3p604dmijx7mps1diwx4f3-libX11-1.8.9' '/nix/store/sf2rr672wz6xalv0bcix9j944j9graq4-libXcursor-1.2.2-dev' '/nix/store/h6h29n0pv86n3r70fdcl2b96kpblffj5-libXcursor-1.2.2' '/nix/store/xacx6igvzsc2fcgcyjdqyr5swv8a399a-libXi-1.8.1-dev' '/nix/store/3qs7qkqqy2izngsxdlflly14f98ii5cv-libXfixes-6.0.1-dev' '/nix/store/5qfaigrq13k1fkyvzzdzdwj7c4iiyayr-libXfixes-6.0.1' '/nix/store/kracbbdhivyy1hsmsy78g62g49fb4yyz-libXext-1.3.6-dev' '/nix/store/w4wkxc261brlclagwxr0icck54dhk68d-libXau-1.0.11-dev' '/nix/store/mhs3ys5lbahsvrai5y0fv49q2xp4pc31-libXau-1.0.11' '/nix/store/pdikq8hwkj15d1jvlv48p98xn0xnn4dx-libXext-1.3.6' '/nix/store/83fywhh4p1bw1df21kjkiqs4dq24f6j7-libXi-1.8.1' '/nix/store/2yx26204avg40jmhgb5j5i3pxn2zv3ai-libXrandr-1.5.4-dev' '/nix/store/r11lq032drbzvblbd3vmv6i1nwczg4s7-libXrender-0.9.11-dev' '/nix/store/7hg9q26kil1lc0aph6ipx4lhg7zilbvv-libXrender-0.9.11' '/nix/store/nn8n0jxm4wsphi1xlvynjw72176kkdg1-libXrandr-1.5.4' '/nix/store/cqsd8hp3lhkvql8rpncd7glxk81lzqy2-libxkbcommon-1.7.0-dev' '/nix/store/sx108j0la4slxp8cr15kyg8jjy79p3dn-libxkbcommon-1.7.0' '/nix/store/hzbp77x0zjyrhgirym2l1ikr1r5p7b8g-wayland-1.22.0-dev' '/nix/store/j2d9i3rsdnvrwrbygz8c7d7axyh6vqp3-wayland-1.22.0-bin' '/nix/store/2kl8zy4yql419zsywn9q65hrp4fsjnj2-wayland-1.22.0' '/nix/store/h6yiakrrww2js0ngakgr6ddxdjjp60sn-vulkan-tools-1.3.280.0' '/nix/store/71m8cqhw5b7d2bz2971n2n5i5xc383kw-vulkan-headers-1.3.280.0' '/nix/store/g4z99lhm1whxz58vcqq2snxin0kvhzc2-vulkan-validation-layers-1.3.280.0' '/nix/store/i5m3r5khf90fbhijcxjvh81j5vxm0k6f-vulkan-loader-1.3.280.0-dev' '/nix/store/7rs73b2461wcsqsg6lahxy6v5cl4kj9v-vulkan-loader-1.3.280.0' '/nix/store/axvmifip8rq7w2caw42sgi23lzh8ff5m-systemd-minimal-libs-255.4-dev' '/nix/store/8f64rn26nd0cyy0brblzyn064fmcmy79-systemd-minimal-libs-255.4' '/nix/store/n74bf0rpsazxb9i23wlzidkzk017py3v-devenv' '/nix/store/8g7b1jkj5fpq1xcy5jgxfn9fxjwhxzvb-patchelf-0.15.0' '/nix/store/b9mcp2as85ckbh8v0821y7z06fixypqx-update-autotools-gnu-config-scripts-hook' '/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh' '/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh' '/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh' '/nix/store/ilaf1w22bxi6jsi45alhmvvdgy4ly3zs-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh' '/nix/store/wmknncrif06fqxa16hpdldhixk95nds0-strip.sh' '/nix/store/md6hh4rrcrf99nssvcam3qaqs3skj086-gcc-wrapper-13.2.0' '/nix/store/m3gq2f6iwh3g67zrs27m7w82b37l8gf8-binutils-wrapper-2.41' ) +declare -a pkgsBuildTarget=() +declare -a pkgsHostHost=() +declare -a pkgsHostTarget=() +declare -a pkgsTargetTarget=() +declare -a postFixupHooks=('_makeSymlinksRelativeInAllOutputs' '_multioutPropagateDev' ) +declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) +declare -a preConfigureHooks=('_multioutConfig' ) +preConfigurePhases=' updateAutotoolsGnuConfigScriptsPhase' +declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) +preferLocalBuild='1' +export preferLocalBuild +prefix='/mnt/k/minky/nite/outputs/out' +declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) +propagatedBuildInputs='' +export propagatedBuildInputs +declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) +propagatedNativeBuildInputs='' +export propagatedNativeBuildInputs +declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) +shell='/nix/store/h3bhzvz9ipglcybbcvkxvm4vg9lwvqg4-bash-5.2p26/bin/bash' +export shell +shellHook=' -# For `nix develop`. We get /noshell on Linux and /sbin/nologin on macOS. -if [[ "$SHELL" == "/noshell" || "$SHELL" == "/sbin/nologin" ]]; then - export SHELL=/nix/store/nnvsjd3f3dh9wdl4s9mwg5cfri8kds5j-bash-interactive-5.2p26/bin/bash +export PS1="\[\e[0;34m\](devenv)\[\e[0m\] ${PS1-}" + +# set path to locales on non-NixOS Linux hosts +if [ -z "${LOCALE_ARCHIVE-}" ]; then + export LOCALE_ARCHIVE=/nix/store/27gwcgljdp3h71791mz2ymfy1wjzppsk-glibc-locales-2.39-31/lib/locale/locale-archive fi -# Load the environment -source "/nix/store/gw8h24v1c8p8xjf4q604hb7fggxig31j-nite-dir/env.bash" + +# note what environments are active, but make sure we don'\''t repeat them +if [[ ! "${DIRENV_ACTIVE-}" =~ (^|:)"$PWD"(:|$) ]]; then + export DIRENV_ACTIVE="$PWD:${DIRENV_ACTIVE-}" +fi + +# devenv helper +if [ ! type -p direnv &>/dev/null && -f .envrc ]; then + echo "You have .envrc but direnv command is not installed." + echo "Please install direnv: https://direnv.net/docs/installation.html" +fi + +mkdir -p "$DEVENV_STATE" +if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/ddypgcb25zgi0gwvklxlzazjrh9s63dg-coreutils-9.5/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/wfmdfyk21ibcl78rsjlnxy1fqg0sfk4k-devenv-profile" ] +then + ln -snf /nix/store/wfmdfyk21ibcl78rsjlnxy1fqg0sfk4k-devenv-profile "$DEVENV_DOTFILE/profile" +fi +unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps + +mkdir -p '\''/run/user/1000/devenv-43506f0'\'' +ln -snf '\''/run/user/1000/devenv-43506f0'\'' '\''/mnt/k/minky/nite/.devenv'\''/run + ' export shellHook -stdenv='/nix/store/nqq1afagwrm4azc5ahh48qgkdzqi0jx7-naked-stdenv' +stdenv='/nix/store/wq046wv3s3h4m2n9ak3j534di2pzra93-stdenv-linux' export stdenv +strictDeps='' +export strictDeps system='x86_64-linux' export system +declare -a unpackCmdHooks=('_defaultUnpack' ) +_accumFlagsArray () +{ + + local name; + if [ -n "$__structuredAttrs" ]; then + for name in "$@"; + do + local -n nameref="$name"; + flagsArray+=(${nameref+"${nameref[@]}"}); + done; + else + for name in "$@"; + do + local -n nameref="$name"; + case "$name" in + *Array) + flagsArray+=(${nameref+"${nameref[@]}"}) + ;; + *) + flagsArray+=(${nameref-}) + ;; + esac; + done; + fi +} +_activatePkgs () +{ + + local hostOffset targetOffset; + local pkg; + for hostOffset in "${allPlatOffsets[@]}"; + do + local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; + for targetOffset in "${allPlatOffsets[@]}"; + do + (( hostOffset <= targetOffset )) || continue; + local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; + local pkgsSlice="${!pkgsRef}[@]"; + for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; + do + activatePackage "$pkg" "$hostOffset" "$targetOffset"; + done; + done; + done +} +_addRpathPrefix () +{ + + if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then + export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; + fi +} +_addToEnv () +{ + + local depHostOffset depTargetOffset; + local pkg; + for depHostOffset in "${allPlatOffsets[@]}"; + do + local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; + local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; + for depTargetOffset in "${allPlatOffsets[@]}"; + do + (( depHostOffset <= depTargetOffset )) || continue; + local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; + if [[ -z "${strictDeps-}" ]]; then + local visitedPkgs=""; + for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; + do + if [[ "$visitedPkgs" = *"$pkg"* ]]; then + continue; + fi; + runHook "${!hookRef}" "$pkg"; + visitedPkgs+=" $pkg"; + done; + else + local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; + local pkgsSlice="${!pkgsRef}[@]"; + for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; + do + runHook "${!hookRef}" "$pkg"; + done; + fi; + done; + done +} +_allFlags () +{ + + export system pname name version; + for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); + do + if (( "${NIX_DEBUG:-0}" >= 1 )); then + printf "@%s@ -> %q\n" "${varName}" "${!varName}" 1>&2; + fi; + args+=("--subst-var" "$varName"); + done +} +_assignFirst () +{ + + local varName="$1"; + local _var; + local REMOVE=REMOVE; + shift; + for _var in "$@"; + do + if [ -n "${!_var-}" ]; then + eval "${varName}"="${_var}"; + return; + fi; + done; + echo; + echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."; + echo " The following variables were all unset or empty:"; + echo " $*"; + if [ -z "${out:-}" ]; then + echo ' If you do not want an "out" output in your derivation, make sure to define'; + echo ' the other specific required outputs. This can be achieved by picking one'; + echo " of the above as an output."; + echo ' You do not have to remove "out" if you want to have a different default'; + echo ' output, because the first output is taken as a default.'; + echo; + fi; + return 1 +} +_callImplicitHook () +{ + + local def="$1"; + local hookName="$2"; + if declare -F "$hookName" > /dev/null; then + "$hookName"; + else + if type -p "$hookName" > /dev/null; then + source "$hookName"; + else + if [ -n "${!hookName:-}" ]; then + eval "${!hookName}"; + else + return "$def"; + fi; + fi; + fi +} +_defaultUnpack () +{ + + local fn="$1"; + local destination; + if [ -d "$fn" ]; then + destination="$(stripHash "$fn")"; + if [ -e "$destination" ]; then + echo "Cannot copy $fn to $destination: destination already exists!"; + echo "Did you specify two \"srcs\" with the same \"name\"?"; + return 1; + fi; + cp -pr --reflink=auto -- "$fn" "$destination"; + else + case "$fn" in + *.tar.xz | *.tar.lzma | *.txz) + ( XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; + true ) | tar xf - --mode=+w --warning=no-timestamp + ;; + *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) + tar xf "$fn" --mode=+w --warning=no-timestamp + ;; + *) + return 1 + ;; + esac; + fi +} +_doStrip () +{ + + local -ra flags=(dontStripHost dontStripTarget); + local -ra debugDirs=(stripDebugList stripDebugListTarget); + local -ra allDirs=(stripAllList stripAllListTarget); + local -ra stripCmds=(STRIP STRIP_FOR_TARGET); + local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET); + stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin}; + stripDebugListTarget=${stripDebugListTarget[*]:-}; + stripAllList=${stripAllList[*]:-}; + stripAllListTarget=${stripAllListTarget[*]:-}; + local i; + for i in ${!stripCmds[@]}; + do + local -n flag="${flags[$i]}"; + local -n debugDirList="${debugDirs[$i]}"; + local -n allDirList="${allDirs[$i]}"; + local -n stripCmd="${stripCmds[$i]}"; + local -n ranlibCmd="${ranlibCmds[$i]}"; + if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null 1>&2; then + continue; + fi; + stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"; + stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"; + done +} +_eval () +{ + + if declare -F "$1" > /dev/null 2>&1; then + "$@"; + else + eval "$1"; + fi +} +_makeSymlinksRelative () +{ + + local symlinkTarget; + if [ "${dontRewriteSymlinks-}" ] || [ ! -e "$prefix" ]; then + return; + fi; + while IFS= read -r -d '' f; do + symlinkTarget=$(readlink "$f"); + if [[ "$symlinkTarget"/ != "$prefix"/* ]]; then + continue; + fi; + if [ ! -e "$symlinkTarget" ]; then + echo "the symlink $f is broken, it points to $symlinkTarget (which is missing)"; + fi; + echo "rewriting symlink $f to be relative to $prefix"; + ln -snrf "$symlinkTarget" "$f"; + done < <(find $prefix -type l -print0) +} +_makeSymlinksRelativeInAllOutputs () +{ + + local output; + for output in $(getAllOutputNames); + do + prefix="${!output}" _makeSymlinksRelative; + done +} +_moveLib64 () +{ + + if [ "${dontMoveLib64-}" = 1 ]; then + return; + fi; + if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then + return; + fi; + echo "moving $prefix/lib64/* to $prefix/lib"; + mkdir -p $prefix/lib; + shopt -s dotglob; + for i in $prefix/lib64/*; + do + mv --no-clobber "$i" $prefix/lib; + done; + shopt -u dotglob; + rmdir $prefix/lib64; + ln -s lib $prefix/lib64 +} +_moveSbin () +{ + + if [ "${dontMoveSbin-}" = 1 ]; then + return; + fi; + if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then + return; + fi; + echo "moving $prefix/sbin/* to $prefix/bin"; + mkdir -p $prefix/bin; + shopt -s dotglob; + for i in $prefix/sbin/*; + do + mv "$i" $prefix/bin; + done; + shopt -u dotglob; + rmdir $prefix/sbin; + ln -s bin $prefix/sbin +} +_moveSystemdUserUnits () +{ + + if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then + return; + fi; + if [ ! -e "${prefix:?}/lib/systemd/user" ]; then + return; + fi; + local source="$prefix/lib/systemd/user"; + local target="$prefix/share/systemd/user"; + echo "moving $source/* to $target"; + mkdir -p "$target"; + ( shopt -s dotglob; + for i in "$source"/*; + do + mv "$i" "$target"; + done ); + rmdir "$source"; + ln -s "$target" "$source" +} +_moveToShare () +{ + + if [ -n "$__structuredAttrs" ]; then + if [ -z "${forceShare-}" ]; then + forceShare=(man doc info); + fi; + else + forceShare=(${forceShare:-man doc info}); + fi; + if [[ -z "$out" ]]; then + return; + fi; + for d in "${forceShare[@]}"; + do + if [ -d "$out/$d" ]; then + if [ -d "$out/share/$d" ]; then + echo "both $d/ and share/$d/ exist!"; + else + echo "moving $out/$d to $out/share/$d"; + mkdir -p $out/share; + mv $out/$d $out/share/; + fi; + fi; + done +} +_multioutConfig () +{ + + if [ "$(getAllOutputNames)" = "out" ] || [ -z "${setOutputFlags-1}" ]; then + return; + fi; + if [ -z "${shareDocName:-}" ]; then + local confScript="${configureScript:-}"; + if [ -z "$confScript" ] && [ -x ./configure ]; then + confScript=./configure; + fi; + if [ -f "$confScript" ]; then + local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; + fi; + if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then + shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; + fi; + fi; + prependToVar configureFlags --bindir="${!outputBin}"/bin --sbindir="${!outputBin}"/sbin --includedir="${!outputInclude}"/include --oldincludedir="${!outputInclude}"/include --mandir="${!outputMan}"/share/man --infodir="${!outputInfo}"/share/info --docdir="${!outputDoc}"/share/doc/"${shareDocName}" --libdir="${!outputLib}"/lib --libexecdir="${!outputLib}"/libexec --localedir="${!outputLib}"/share/locale; + prependToVar installFlags pkgconfigdir="${!outputDev}"/lib/pkgconfig m4datadir="${!outputDev}"/share/aclocal aclocaldir="${!outputDev}"/share/aclocal +} +_multioutDevs () +{ + + if [ "$(getAllOutputNames)" = "out" ] || [ -z "${moveToDev-1}" ]; then + return; + fi; + moveToOutput include "${!outputInclude}"; + moveToOutput lib/pkgconfig "${!outputDev}"; + moveToOutput share/pkgconfig "${!outputDev}"; + moveToOutput lib/cmake "${!outputDev}"; + moveToOutput share/aclocal "${!outputDev}"; + for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; + do + echo "Patching '$f' includedir to output ${!outputInclude}"; + sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; + done +} +_multioutDocs () +{ + + local REMOVE=REMOVE; + moveToOutput share/info "${!outputInfo}"; + moveToOutput share/doc "${!outputDoc}"; + moveToOutput share/gtk-doc "${!outputDevdoc}"; + moveToOutput share/devhelp/books "${!outputDevdoc}"; + moveToOutput share/man "${!outputMan}"; + moveToOutput share/man/man3 "${!outputDevman}" +} +_multioutPropagateDev () +{ + + if [ "$(getAllOutputNames)" = "out" ]; then + return; + fi; + local outputFirst; + for outputFirst in $(getAllOutputNames); + do + break; + done; + local propagaterOutput="$outputDev"; + if [ -z "$propagaterOutput" ]; then + propagaterOutput="$outputFirst"; + fi; + if [ -z "${propagatedBuildOutputs+1}" ]; then + local po_dirty="$outputBin $outputInclude $outputLib"; + set +o pipefail; + propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; + set -o pipefail; + fi; + if [ -z "$propagatedBuildOutputs" ]; then + return; + fi; + mkdir -p "${!propagaterOutput}"/nix-support; + for output in $propagatedBuildOutputs; + do + echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; + done +} +_overrideFirst () +{ + + if [ -z "${!1-}" ]; then + _assignFirst "$@"; + fi +} +_pruneLibtoolFiles () +{ + + if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then + return; + fi; + find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; +} +_updateSourceDateEpochFromSourceRoot () +{ + + if [ -n "$sourceRoot" ]; then + updateSourceDateEpoch "$sourceRoot"; + fi +} +activatePackage () +{ + + local pkg="$1"; + local -r hostOffset="$2"; + local -r targetOffset="$3"; + (( hostOffset <= targetOffset )) || exit 1; + if [ -f "$pkg" ]; then + source "$pkg"; + fi; + if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then + addToSearchPath _PATH "$pkg/bin"; + fi; + if (( hostOffset <= -1 )); then + addToSearchPath _XDG_DATA_DIRS "$pkg/share"; + fi; + if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then + addToSearchPath _HOST_PATH "$pkg/bin"; + fi; + if [[ -f "$pkg/nix-support/setup-hook" ]]; then + source "$pkg/nix-support/setup-hook"; + fi +} +addEnvHooks () +{ + + local depHostOffset="$1"; + shift; + local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; + local pkgHookVar; + for pkgHookVar in "${!pkgHookVarsSlice}"; + do + eval "${pkgHookVar}s"'+=("$@")'; + done +} +addToSearchPath () +{ + + addToSearchPathWithCustomDelimiter ":" "$@" +} +addToSearchPathWithCustomDelimiter () +{ + + local delimiter="$1"; + local varName="$2"; + local dir="$3"; + if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then + export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; + fi +} +appendToVar () +{ + + local -n nameref="$1"; + local useArray type; + if [ -n "$__structuredAttrs" ]; then + useArray=true; + else + useArray=false; + fi; + if declare -p "$1" 2> /dev/null | grep -q '^'; then + type="$(declare -p "$1")"; + if [[ "$type" =~ "declare -A" ]]; then + echo "appendToVar(): ERROR: trying to use appendToVar on an associative array, use variable+=([\"X\"]=\"Y\") instead." 1>&2; + return 1; + else + if [[ "$type" =~ "declare -a" ]]; then + useArray=true; + else + useArray=false; + fi; + fi; + fi; + shift; + if $useArray; then + nameref=(${nameref+"${nameref[@]}"} "$@"); + else + nameref="${nameref-} $*"; + fi +} +auditTmpdir () +{ + + local dir="$1"; + [ -e "$dir" ] || return 0; + echo "checking for references to $TMPDIR/ in $dir..."; + local i; + find "$dir" -type f -print0 | while IFS= read -r -d '' i; do + if [[ "$i" =~ .build-id ]]; then + continue; + fi; + if isELF "$i"; then + if { + printf :; + patchelf --print-rpath "$i" + } | grep -q -F ":$TMPDIR/"; then + echo "RPATH of binary $i contains a forbidden reference to $TMPDIR/"; + exit 1; + fi; + fi; + if isScript "$i"; then + if [ -e "$(dirname "$i")/.$(basename "$i")-wrapped" ]; then + if grep -q -F "$TMPDIR/" "$i"; then + echo "wrapper script $i contains a forbidden reference to $TMPDIR/"; + exit 1; + fi; + fi; + fi; + done +} +bintoolsWrapper_addLDVars () +{ + + local role_post; + getHostRoleEnvHook; + if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then + export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; + fi; + if [[ -d "$1/lib" ]]; then + local -a glob=($1/lib/lib*); + if [ "${#glob[*]}" -gt 0 ]; then + export NIX_LDFLAGS${role_post}+=" -L$1/lib"; + fi; + fi +} +buildPhase () +{ + + runHook preBuild; + if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then + echo "no Makefile or custom buildPhase, doing nothing"; + else + foundMakefile=1; + local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); + _accumFlagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray; + echoCmd 'build flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + fi; + runHook postBuild +} +ccWrapper_addCVars () +{ + + local role_post; + getHostRoleEnvHook; + if [ -d "$1/include" ]; then + export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; + fi; + if [ -d "$1/Library/Frameworks" ]; then + export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; + fi +} +checkPhase () +{ + + runHook preCheck; + if [[ -z "${foundMakefile:-}" ]]; then + echo "no Makefile or custom checkPhase, doing nothing"; + runHook postCheck; + return; + fi; + if [[ -z "${checkTarget:-}" ]]; then + if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then + checkTarget=check; + else + if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then + checkTarget=test; + fi; + fi; + fi; + if [[ -z "${checkTarget:-}" ]]; then + echo "no check/test target in ${makefile:-Makefile}, doing nothing"; + else + local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); + _accumFlagsArray makeFlags makeFlagsArray; + if [ -n "$__structuredAttrs" ]; then + flagsArray+=("${checkFlags[@]:-VERBOSE=y}"); + else + flagsArray+=(${checkFlags:-VERBOSE=y}); + fi; + _accumFlagsArray checkFlagsArray; + flagsArray+=(${checkTarget}); + echoCmd 'check flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + fi; + runHook postCheck +} +compressManPages () +{ + + local dir="$1"; + if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then + return; + fi; + echo "gzipping man pages under $dir/share/man/"; + find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | while IFS= read -r -d '' f; do + if gzip -c -n "$f" > "$f".gz; then + rm "$f"; + else + rm "$f".gz; + fi; + done; + find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do + local target; + target="$(readlink -f "$f")"; + if [ -f "$target".gz ]; then + ln -sf "$target".gz "$f".gz && rm "$f"; + fi; + done +} +configurePhase () +{ + + runHook preConfigure; + : "${configureScript=}"; + if [[ -z "$configureScript" && -x ./configure ]]; then + configureScript=./configure; + fi; + if [ -z "${dontFixLibtool:-}" ]; then + export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; + local i; + find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do + echo "fixing libtool script $i"; + fixLibtool "$i"; + done; + CONFIGURE_MTIME_REFERENCE=$(mktemp configure.mtime.reference.XXXXXX); + find . -executable -type f -name configure -exec grep -l 'GNU Libtool is free software; you can redistribute it and/or modify' {} \; -exec touch -r {} "$CONFIGURE_MTIME_REFERENCE" \; -exec sed -i s_/usr/bin/file_file_g {} \; -exec touch -r "$CONFIGURE_MTIME_REFERENCE" {} \;; + rm -f "$CONFIGURE_MTIME_REFERENCE"; + fi; + if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then + prependToVar configureFlags "${prefixKey:---prefix=}$prefix"; + fi; + if [[ -f "$configureScript" ]]; then + if [ -z "${dontAddDisableDepTrack:-}" ]; then + if grep -q dependency-tracking "$configureScript"; then + prependToVar configureFlags --disable-dependency-tracking; + fi; + fi; + if [ -z "${dontDisableStatic:-}" ]; then + if grep -q enable-static "$configureScript"; then + prependToVar configureFlags --disable-static; + fi; + fi; + if [ -z "${dontPatchShebangsInConfigure:-}" ]; then + patchShebangs --build "$configureScript"; + fi; + fi; + if [ -n "$configureScript" ]; then + local -a flagsArray; + _accumFlagsArray configureFlags configureFlagsArray; + echoCmd 'configure flags' "${flagsArray[@]}"; + $configureScript "${flagsArray[@]}"; + unset flagsArray; + else + echo "no configure script, doing nothing"; + fi; + runHook postConfigure +} +consumeEntire () +{ + + if IFS='' read -r -d '' "$1"; then + echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; + return 1; + fi +} +distPhase () +{ + + runHook preDist; + local flagsArray=(); + _accumFlagsArray distFlags distFlagsArray; + flagsArray+=(${distTarget:-dist}); + echo 'dist flags: %q' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + if [ "${dontCopyDist:-0}" != 1 ]; then + mkdir -p "$out/tarballs"; + cp -pvd ${tarballs[*]:-*.tar.gz} "$out/tarballs"; + fi; + runHook postDist +} +dumpVars () +{ + + if [ "${noDumpEnvVars:-0}" != 1 ]; then + export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars" || true; + fi +} +echoCmd () +{ + + printf "%s:" "$1"; + shift; + printf ' %q' "$@"; + echo +} +exitHandler () +{ + + exitCode="$?"; + set +e; + if [ -n "${showBuildStats:-}" ]; then + read -r -d '' -a buildTimes < <(times); + echo "build times:"; + echo "user time for the shell ${buildTimes[0]}"; + echo "system time for the shell ${buildTimes[1]}"; + echo "user time for all child processes ${buildTimes[2]}"; + echo "system time for all child processes ${buildTimes[3]}"; + fi; + if (( "$exitCode" != 0 )); then + runHook failureHook; + if [ -n "${succeedOnFailure:-}" ]; then + echo "build failed with exit code $exitCode (ignored)"; + mkdir -p "$out/nix-support"; + printf "%s" "$exitCode" > "$out/nix-support/failed"; + exit 0; + fi; + else + runHook exitHook; + fi; + return "$exitCode" +} +findInputs () +{ + + local -r pkg="$1"; + local -r hostOffset="$2"; + local -r targetOffset="$3"; + (( hostOffset <= targetOffset )) || exit 1; + local varVar="${pkgAccumVarVars[hostOffset + 1]}"; + local varRef="$varVar[$((targetOffset - hostOffset))]"; + local var="${!varRef}"; + unset -v varVar varRef; + local varSlice="$var[*]"; + case "${!varSlice-}" in + *" $pkg "*) + return 0 + ;; + esac; + unset -v varSlice; + eval "$var"'+=("$pkg")'; + if ! [ -e "$pkg" ]; then + echo "build input $pkg does not exist" 1>&2; + exit 1; + fi; + function mapOffset () + { + local -r inputOffset="$1"; + local -n outputOffset="$2"; + if (( inputOffset <= 0 )); then + outputOffset=$((inputOffset + hostOffset)); + else + outputOffset=$((inputOffset - 1 + targetOffset)); + fi + }; + local relHostOffset; + for relHostOffset in "${allPlatOffsets[@]}"; + do + local files="${propagatedDepFilesVars[relHostOffset + 1]}"; + local hostOffsetNext; + mapOffset "$relHostOffset" hostOffsetNext; + (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; + local relTargetOffset; + for relTargetOffset in "${allPlatOffsets[@]}"; + do + (( "$relHostOffset" <= "$relTargetOffset" )) || continue; + local fileRef="${files}[$relTargetOffset - $relHostOffset]"; + local file="${!fileRef}"; + unset -v fileRef; + local targetOffsetNext; + mapOffset "$relTargetOffset" targetOffsetNext; + (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; + [[ -f "$pkg/nix-support/$file" ]] || continue; + local pkgNext; + read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; + for pkgNext in $pkgNext; + do + findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; + done; + done; + done +} +fixLibtool () +{ + + local search_path; + for flag in $NIX_LDFLAGS; + do + case $flag in + -L*) + search_path+=" ${flag#-L}" + ;; + esac; + done; + sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" -e 's^eval sys_lib_.+search_path=.*^^' +} +fixupPhase () +{ + + local output; + for output in $(getAllOutputNames); + do + if [ -e "${!output}" ]; then + chmod -R u+w,u-s,g-s "${!output}"; + fi; + done; + runHook preFixup; + local output; + for output in $(getAllOutputNames); + do + prefix="${!output}" runHook fixupOutput; + done; + recordPropagatedDependencies; + if [ -n "${setupHook:-}" ]; then + mkdir -p "${!outputDev}/nix-support"; + substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; + fi; + if [ -n "${setupHooks:-}" ]; then + mkdir -p "${!outputDev}/nix-support"; + local hook; + for hook in ${setupHooks[@]}; + do + local content; + consumeEntire content < "$hook"; + substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; + unset -v content; + done; + unset -v hook; + fi; + if [ -n "${propagatedUserEnvPkgs:-}" ]; then + mkdir -p "${!outputBin}/nix-support"; + printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages"; + fi; + runHook postFixup +} +genericBuild () +{ + + export GZIP_NO_TIMESTAMPS=1; + if [ -f "${buildCommandPath:-}" ]; then + source "$buildCommandPath"; + return; + fi; + if [ -n "${buildCommand:-}" ]; then + eval "$buildCommand"; + return; + fi; + if [ -z "${phases[*]:-}" ]; then + phases="${prePhases[*]:-} unpackPhase patchPhase ${preConfigurePhases[*]:-} configurePhase ${preBuildPhases[*]:-} buildPhase checkPhase ${preInstallPhases[*]:-} installPhase ${preFixupPhases[*]:-} fixupPhase installCheckPhase ${preDistPhases[*]:-} distPhase ${postPhases[*]:-}"; + fi; + for curPhase in ${phases[*]}; + do + runPhase "$curPhase"; + done +} +getAllOutputNames () +{ + + if [ -n "$__structuredAttrs" ]; then + echo "${!outputs[*]}"; + else + echo "$outputs"; + fi +} +getHostRole () +{ + + getRole "$hostOffset" +} +getHostRoleEnvHook () +{ + + getRole "$depHostOffset" +} +getRole () +{ + + case $1 in + -1) + role_post='_FOR_BUILD' + ;; + 0) + role_post='' + ;; + 1) + role_post='_FOR_TARGET' + ;; + *) + echo "binutils-wrapper-2.41: used as improper sort of dependency" 1>&2; + return 1 + ;; + esac +} +getTargetRole () +{ + + getRole "$targetOffset" +} +getTargetRoleEnvHook () +{ + + getRole "$depTargetOffset" +} +getTargetRoleWrapper () +{ + + case $targetOffset in + -1) + export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 + ;; + 0) + export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 + ;; + 1) + export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 + ;; + *) + echo "binutils-wrapper-2.41: used as improper sort of dependency" 1>&2; + return 1 + ;; + esac +} +installCheckPhase () +{ + + runHook preInstallCheck; + if [[ -z "${foundMakefile:-}" ]]; then + echo "no Makefile or custom installCheckPhase, doing nothing"; + else + if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} "${installCheckTarget:-installcheck}" > /dev/null 2>&1; then + echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; + else + local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); + _accumFlagsArray makeFlags makeFlagsArray installCheckFlags installCheckFlagsArray; + flagsArray+=(${installCheckTarget:-installcheck}); + echoCmd 'installcheck flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + fi; + fi; + runHook postInstallCheck +} +installPhase () +{ + + runHook preInstall; + if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then + echo "no Makefile or custom installPhase, doing nothing"; + runHook postInstall; + return; + else + foundMakefile=1; + fi; + if [ -n "$prefix" ]; then + mkdir -p "$prefix"; + fi; + local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL); + _accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray; + if [ -n "$__structuredAttrs" ]; then + flagsArray+=("${installTargets[@]:-install}"); + else + flagsArray+=(${installTargets:-install}); + fi; + echoCmd 'install flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + runHook postInstall +} +isELF () +{ + + local fn="$1"; + local fd; + local magic; + exec {fd}< "$fn"; + read -r -n 4 -u "$fd" magic; + exec {fd}>&-; + if [ "$magic" = 'ELF' ]; then + return 0; + else + return 1; + fi +} +isMachO () +{ + + local fn="$1"; + local fd; + local magic; + exec {fd}< "$fn"; + read -r -n 4 -u "$fd" magic; + exec {fd}>&-; + if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then + return 0; + else + if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then + return 0; + else + if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then + return 0; + else + return 1; + fi; + fi; + fi +} +isScript () +{ + + local fn="$1"; + local fd; + local magic; + exec {fd}< "$fn"; + read -r -n 2 -u "$fd" magic; + exec {fd}>&-; + if [[ "$magic" =~ \#! ]]; then + return 0; + else + return 1; + fi +} +mapOffset () +{ + + local -r inputOffset="$1"; + local -n outputOffset="$2"; + if (( inputOffset <= 0 )); then + outputOffset=$((inputOffset + hostOffset)); + else + outputOffset=$((inputOffset - 1 + targetOffset)); + fi +} +moveToOutput () +{ + + local patt="$1"; + local dstOut="$2"; + local output; + for output in $(getAllOutputNames); + do + if [ "${!output}" = "$dstOut" ]; then + continue; + fi; + local srcPath; + for srcPath in "${!output}"/$patt; + do + if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then + continue; + fi; + if [ "$dstOut" = REMOVE ]; then + echo "Removing $srcPath"; + rm -r "$srcPath"; + else + local dstPath="$dstOut${srcPath#${!output}}"; + echo "Moving $srcPath to $dstPath"; + if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then + rmdir "$srcPath" --ignore-fail-on-non-empty; + if [ -d "$srcPath" ]; then + mv -t "$dstPath" "$srcPath"/*; + rmdir "$srcPath"; + fi; + else + mkdir -p "$(readlink -m "$dstPath/..")"; + mv "$srcPath" "$dstPath"; + fi; + fi; + local srcParent="$(readlink -m "$srcPath/..")"; + if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2> /dev/null)" ]; then + echo "Removing empty $srcParent/ and (possibly) its parents"; + rmdir -p --ignore-fail-on-non-empty "$srcParent" 2> /dev/null || true; + fi; + done; + done +} +patchELF () +{ + + local dir="$1"; + [ -e "$dir" ] || return 0; + echo "shrinking RPATHs of ELF executables and libraries in $dir"; + local i; + while IFS= read -r -d '' i; do + if [[ "$i" =~ .build-id ]]; then + continue; + fi; + if ! isELF "$i"; then + continue; + fi; + echo "shrinking $i"; + patchelf --shrink-rpath "$i" || true; + done < <(find "$dir" -type f -print0) +} +patchPhase () +{ + + runHook prePatch; + local -a patchesArray; + if [ -n "$__structuredAttrs" ]; then + patchesArray=(${patches:+"${patches[@]}"}); + else + patchesArray=(${patches:-}); + fi; + for i in "${patchesArray[@]}"; + do + echo "applying patch $i"; + local uncompress=cat; + case "$i" in + *.gz) + uncompress="gzip -d" + ;; + *.bz2) + uncompress="bzip2 -d" + ;; + *.xz) + uncompress="xz -d" + ;; + *.lzma) + uncompress="lzma -d" + ;; + esac; + local -a flagsArray; + if [ -n "$__structuredAttrs" ]; then + flagsArray=("${patchFlags[@]:--p1}"); + else + flagsArray=(${patchFlags:--p1}); + fi; + $uncompress < "$i" 2>&1 | patch "${flagsArray[@]}"; + done; + runHook postPatch +} +patchShebangs () +{ + + local pathName; + local update; + while [[ $# -gt 0 ]]; do + case "$1" in + --host) + pathName=HOST_PATH; + shift + ;; + --build) + pathName=PATH; + shift + ;; + --update) + update=true; + shift + ;; + --) + shift; + break + ;; + -* | --*) + echo "Unknown option $1 supplied to patchShebangs" 1>&2; + return 1 + ;; + *) + break + ;; + esac; + done; + echo "patching script interpreter paths in $@"; + local f; + local oldPath; + local newPath; + local arg0; + local args; + local oldInterpreterLine; + local newInterpreterLine; + if [[ $# -eq 0 ]]; then + echo "No arguments supplied to patchShebangs" 1>&2; + return 0; + fi; + local f; + while IFS= read -r -d '' f; do + isScript "$f" || continue; + read -r oldInterpreterLine < "$f" || [ "$oldInterpreterLine" ]; + read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; + if [[ -z "${pathName:-}" ]]; then + if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then + pathName=HOST_PATH; + else + pathName=PATH; + fi; + fi; + if [[ "$oldPath" == *"/bin/env" ]]; then + if [[ $arg0 == "-S" ]]; then + arg0=${args%% *}; + args=${args#* }; + newPath="$(PATH="${!pathName}" command -v "env" || true)"; + args="-S $(PATH="${!pathName}" command -v "$arg0" || true) $args"; + else + if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then + echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; + exit 1; + else + newPath="$(PATH="${!pathName}" command -v "$arg0" || true)"; + fi; + fi; + else + if [[ -z $oldPath ]]; then + oldPath="/bin/sh"; + fi; + newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)"; + args="$arg0 $args"; + fi; + newInterpreterLine="$newPath $args"; + newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; + if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then + if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then + echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; + escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; + timestamp=$(stat --printf "%y" "$f"); + sed -i -e "1 s|.*|#\!$escapedInterpreterLine|" "$f"; + touch --date "$timestamp" "$f"; + fi; + fi; + done < <(find "$@" -type f -perm -0100 -print0) +} +patchShebangsAuto () +{ + + if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then + if [[ "$output" != out && "$output" = "$outputDev" ]]; then + patchShebangs --build "$prefix"; + else + patchShebangs --host "$prefix"; + fi; + fi +} +pkgConfigWrapper_addPkgConfigPath () +{ + + local role_post; + getHostRoleEnvHook; + addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/lib/pkgconfig"; + addToSearchPath "PKG_CONFIG_PATH${role_post}" "$1/share/pkgconfig" +} +prependToVar () +{ + + local -n nameref="$1"; + local useArray type; + if [ -n "$__structuredAttrs" ]; then + useArray=true; + else + useArray=false; + fi; + if declare -p "$1" 2> /dev/null | grep -q '^'; then + type="$(declare -p "$1")"; + if [[ "$type" =~ "declare -A" ]]; then + echo "prependToVar(): ERROR: trying to use prependToVar on an associative array." 1>&2; + return 1; + else + if [[ "$type" =~ "declare -a" ]]; then + useArray=true; + else + useArray=false; + fi; + fi; + fi; + shift; + if $useArray; then + nameref=("$@" ${nameref+"${nameref[@]}"}); + else + nameref="$* ${nameref-}"; + fi +} +printLines () +{ + + (( "$#" > 0 )) || return 0; + printf '%s\n' "$@" +} +printWords () +{ + + (( "$#" > 0 )) || return 0; + printf '%s ' "$@" +} +recordPropagatedDependencies () +{ + + declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); + declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); + local propagatedInputsIndex; + for propagatedInputsIndex in "${!flatVars[@]}"; + do + local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; + local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; + [[ -n "${!propagatedInputsSlice}" ]] || continue; + mkdir -p "${!outputDev}/nix-support"; + printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; + done +} runHook () { - eval "$shellHook"; - unset runHook + local hookName="$1"; + shift; + local hooksSlice="${hookName%Hook}Hooks[@]"; + local hook; + for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; + do + _eval "$hook" "$@"; + done; + return 0 +} +runOneHook () +{ + + local hookName="$1"; + shift; + local hooksSlice="${hookName%Hook}Hooks[@]"; + local hook ret=1; + for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; + do + if _eval "$hook" "$@"; then + ret=0; + break; + fi; + done; + return "$ret" +} +runPhase () +{ + + local curPhase="$*"; + if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then + return; + fi; + if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then + return; + fi; + if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then + return; + fi; + if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then + return; + fi; + if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then + return; + fi; + if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then + return; + fi; + if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then + return; + fi; + if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then + return; + fi; + if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then + return; + fi; + if [[ -n $NIX_LOG_FD ]]; then + echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&"$NIX_LOG_FD"; + fi; + showPhaseHeader "$curPhase"; + dumpVars; + local startTime=$(date +"%s"); + eval "${!curPhase:-$curPhase}"; + local endTime=$(date +"%s"); + showPhaseFooter "$curPhase" "$startTime" "$endTime"; + if [ "$curPhase" = unpackPhase ]; then + [ -n "${sourceRoot:-}" ] && chmod +x "${sourceRoot}"; + cd "${sourceRoot:-.}"; + fi +} +showPhaseFooter () +{ + + local phase="$1"; + local startTime="$2"; + local endTime="$3"; + local delta=$(( endTime - startTime )); + (( delta < 30 )) && return; + local H=$((delta/3600)); + local M=$((delta%3600/60)); + local S=$((delta%60)); + echo -n "$phase completed in "; + (( H > 0 )) && echo -n "$H hours "; + (( M > 0 )) && echo -n "$M minutes "; + echo "$S seconds" +} +showPhaseHeader () +{ + + local phase="$1"; + echo "Running phase: $phase" +} +stripDirs () +{ + + local cmd="$1"; + local ranlibCmd="$2"; + local paths="$3"; + local stripFlags="$4"; + local excludeFlags=(); + local pathsNew=; + [ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1; + [ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1; + local pattern; + if [ -n "${stripExclude:-}" ]; then + for pattern in "${stripExclude[@]}"; + do + excludeFlags+=(-a '!' '(' -name "$pattern" -o -wholename "$prefix/$pattern" ')'); + done; + fi; + local p; + for p in ${paths}; + do + if [ -e "$prefix/$p" ]; then + pathsNew="${pathsNew} $prefix/$p"; + fi; + done; + paths=${pathsNew}; + if [ -n "${paths}" ]; then + echo "stripping (with command $cmd and flags $stripFlags) in $paths"; + local striperr; + striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"; + find $paths -type f "${excludeFlags[@]}" -a '!' -path "$prefix/lib/debug/*" -print0 | xargs -r -0 -n1 -- realpath -z | sort -u -z | xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2> "$striperr" || exit_code=$?; + [[ "$exit_code" = 123 || -z "$exit_code" ]] || ( cat "$striperr" 1>&2 && exit 1 ); + rm "$striperr"; + find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2> /dev/null; + fi +} +stripHash () +{ + + local strippedName casematchOpt=0; + strippedName="$(basename -- "$1")"; + shopt -q nocasematch && casematchOpt=1; + shopt -u nocasematch; + if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then + echo "${strippedName:33}"; + else + echo "$strippedName"; + fi; + if (( casematchOpt )); then + shopt -s nocasematch; + fi +} +substitute () +{ + + local input="$1"; + local output="$2"; + shift 2; + if [ ! -f "$input" ]; then + echo "substitute(): ERROR: file '$input' does not exist" 1>&2; + return 1; + fi; + local content; + consumeEntire content < "$input"; + if [ -e "$output" ]; then + chmod +w "$output"; + fi; + substituteStream content "file '$input'" "$@" > "$output" +} +substituteAll () +{ + + local input="$1"; + local output="$2"; + local -a args=(); + _allFlags; + substitute "$input" "$output" "${args[@]}" +} +substituteAllInPlace () +{ + + local fileName="$1"; + shift; + substituteAll "$fileName" "$fileName" "$@" +} +substituteAllStream () +{ + + local -a args=(); + _allFlags; + substituteStream "$1" "$2" "${args[@]}" +} +substituteInPlace () +{ + + local -a fileNames=(); + for arg in "$@"; + do + if [[ "$arg" = "--"* ]]; then + break; + fi; + fileNames+=("$arg"); + shift; + done; + for file in "${fileNames[@]}"; + do + substitute "$file" "$file" "$@"; + done +} +substituteStream () +{ + + local var=$1; + local description=$2; + shift 2; + while (( "$#" )); do + local replace_mode="$1"; + case "$1" in + --replace) + if ! "$_substituteStream_has_warned_replace_deprecation"; then + echo "substituteStream(): WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. ($description)" 1>&2; + _substituteStream_has_warned_replace_deprecation=true; + fi; + replace_mode='--replace-warn' + ;& + --replace-quiet | --replace-warn | --replace-fail) + pattern="$2"; + replacement="$3"; + shift 3; + local savedvar; + savedvar="${!var}"; + eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; + if [ "$pattern" != "$replacement" ]; then + if [ "${!var}" == "$savedvar" ]; then + if [ "$replace_mode" == --replace-warn ]; then + printf "substituteStream(): WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; + else + if [ "$replace_mode" == --replace-fail ]; then + printf "substituteStream(): ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" 1>&2; + return 1; + fi; + fi; + fi; + fi + ;; + --subst-var) + local varName="$2"; + shift 2; + if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then + echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; + return 1; + fi; + if [ -z ${!varName+x} ]; then + echo "substituteStream(): ERROR: variable \$$varName is unset" 1>&2; + return 1; + fi; + pattern="@$varName@"; + replacement="${!varName}"; + eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' + ;; + --subst-var-by) + pattern="@$2@"; + replacement="$3"; + eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; + shift 3 + ;; + *) + echo "substituteStream(): ERROR: Invalid command line argument: $1" 1>&2; + return 1 + ;; + esac; + done; + printf "%s" "${!var}" +} +unpackFile () +{ + + curSrc="$1"; + echo "unpacking source archive $curSrc"; + if ! runOneHook unpackCmd "$curSrc"; then + echo "do not know how to unpack source archive $curSrc"; + exit 1; + fi +} +unpackPhase () +{ + + runHook preUnpack; + if [ -z "${srcs:-}" ]; then + if [ -z "${src:-}" ]; then + echo 'variable $src or $srcs should point to the source'; + exit 1; + fi; + srcs="$src"; + fi; + local -a srcsArray; + if [ -n "$__structuredAttrs" ]; then + srcsArray=("${srcs[@]}"); + else + srcsArray=($srcs); + fi; + local dirsBefore=""; + for i in *; + do + if [ -d "$i" ]; then + dirsBefore="$dirsBefore $i "; + fi; + done; + for i in "${srcsArray[@]}"; + do + unpackFile "$i"; + done; + : "${sourceRoot=}"; + if [ -n "${setSourceRoot:-}" ]; then + runOneHook setSourceRoot; + else + if [ -z "$sourceRoot" ]; then + for i in *; + do + if [ -d "$i" ]; then + case $dirsBefore in + *\ $i\ *) + + ;; + *) + if [ -n "$sourceRoot" ]; then + echo "unpacker produced multiple directories"; + exit 1; + fi; + sourceRoot="$i" + ;; + esac; + fi; + done; + fi; + fi; + if [ -z "$sourceRoot" ]; then + echo "unpacker appears to have produced no directories"; + exit 1; + fi; + echo "source root is $sourceRoot"; + if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then + chmod -R u+w -- "$sourceRoot"; + fi; + runHook postUnpack +} +updateAutotoolsGnuConfigScriptsPhase () +{ + + if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then + return; + fi; + for script in config.sub config.guess; + do + for f in $(find . -type f -name "$script"); + do + echo "Updating Autotools / GNU config script to a newer upstream version: $f"; + cp -f "/nix/store/y2f45080fyi02g4imbf8h5xw0vviyh8v-gnu-config-2023-09-19/$script" "$f"; + done; + done +} +updateSourceDateEpoch () +{ + + local path="$1"; + local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ %p\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); + local time="${res[0]//\.[0-9]*/}"; + local newestFile="${res[1]}"; + if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then + echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; + export SOURCE_DATE_EPOCH="$time"; + local now="$(date +%s)"; + if [ "$time" -gt $((now - 60)) ]; then + echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; + fi; + fi } PATH="$PATH${nix_saved_PATH:+:$nix_saved_PATH}" XDG_DATA_DIRS="$XDG_DATA_DIRS${nix_saved_XDG_DATA_DIRS:+:$nix_saved_XDG_DATA_DIRS}" diff --git a/Cargo.lock b/Cargo.lock index 742c1c0..22e79c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,6 +118,17 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + [[package]] name = "async-channel" version = "2.3.0" @@ -139,8 +150,8 @@ checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" dependencies = [ "async-task", "concurrent-queue", - "fastrand", - "futures-lite", + "fastrand 2.1.0", + "futures-lite 2.3.0", "slab", ] @@ -152,7 +163,7 @@ checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ "async-lock", "blocking", - "futures-lite", + "futures-lite 2.3.0", ] [[package]] @@ -165,9 +176,9 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite", + "futures-lite 2.3.0", "parking", - "polling", + "polling 3.7.0", "rustix", "slab", "tracing", @@ -193,7 +204,7 @@ checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ "async-io", "blocking", - "futures-lite", + "futures-lite 2.3.0", ] [[package]] @@ -202,7 +213,7 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" dependencies = [ - "async-channel", + "async-channel 2.3.0", "async-io", "async-lock", "async-signal", @@ -210,7 +221,7 @@ dependencies = [ "blocking", "cfg-if", "event-listener 5.3.0", - "futures-lite", + "futures-lite 2.3.0", "rustix", "tracing", "windows-sys 0.52.0", @@ -398,11 +409,11 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" dependencies = [ - "async-channel", + "async-channel 2.3.0", "async-lock", "async-task", "futures-io", - "futures-lite", + "futures-lite 2.3.0", "piper", ] @@ -462,7 +473,7 @@ checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ "bitflags 2.5.0", "log", - "polling", + "polling 3.7.0", "rustix", "slab", "thiserror", @@ -480,6 +491,12 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "castaway" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" + [[package]] name = "cbc" version = "0.1.2" @@ -769,6 +786,36 @@ dependencies = [ "syn 2.0.63", ] +[[package]] +name = "curl" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e2161dd6eba090ff1594084e95fd67aeccf04382ffea77999ea94ed42ec67b6" +dependencies = [ + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "windows-sys 0.52.0", +] + +[[package]] +name = "curl-sys" +version = "0.4.72+curl-8.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29cbdc8314c447d11e8fd156dcdd031d9e02a7a976163e396b548c03153bc9ea" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "windows-sys 0.52.0", +] + [[package]] name = "cursor-icon" version = "1.1.0" @@ -914,6 +961,15 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + [[package]] name = "endi" version = "1.1.0" @@ -976,6 +1032,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + [[package]] name = "event-listener" version = "4.0.3" @@ -1018,6 +1080,15 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fastrand" version = "2.1.0" @@ -1078,6 +1149,12 @@ dependencies = [ "spin 0.9.8", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "font-kit" version = "0.11.0" @@ -1258,13 +1335,28 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand", + "fastrand 2.1.0", "futures-core", "futures-io", "parking", @@ -1488,6 +1580,17 @@ dependencies = [ "digest", ] +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "idna" version = "0.5.0" @@ -1543,6 +1646,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "is-docker" version = "0.2.0" @@ -1562,6 +1674,33 @@ dependencies = [ "once_cell", ] +[[package]] +name = "isahc" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" +dependencies = [ + "async-channel 1.9.0", + "castaway", + "crossbeam-utils", + "curl", + "curl-sys", + "encoding_rs", + "event-listener 2.5.3", + "futures-lite 1.13.0", + "http", + "log", + "mime", + "once_cell", + "polling 2.8.0", + "slab", + "sluice", + "tracing", + "tracing-futures", + "url", + "waker-fn", +] + [[package]] name = "itertools" version = "0.12.1" @@ -1804,10 +1943,17 @@ dependencies = [ "paste", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "ming" version = "0.1.0" dependencies = [ + "anyhow", "as-raw-xcb-connection", "ashpd", "async-task", @@ -1958,6 +2104,7 @@ name = "nite" version = "0.1.0" dependencies = [ "funnylog", + "ming", ] [[package]] @@ -2160,7 +2307,7 @@ dependencies = [ "cipher", "digest", "endi", - "futures-lite", + "futures-lite 2.3.0", "futures-util", "hkdf", "hmac", @@ -2188,6 +2335,24 @@ dependencies = [ "pathdiff", ] +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "ordered-stream" version = "0.2.0" @@ -2325,7 +2490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" dependencies = [ "atomic-waker", - "fastrand", + "fastrand 2.1.0", "futures-io", ] @@ -2360,6 +2525,22 @@ dependencies = [ "miniz_oxide 0.7.2", ] +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + [[package]] name = "polling" version = "3.7.0" @@ -2735,6 +2916,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "schemars" version = "0.8.19" @@ -2919,6 +3109,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "sluice" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" +dependencies = [ + "async-channel 1.9.0", + "futures-core", + "futures-io", +] + [[package]] name = "smallvec" version = "1.13.2" @@ -3101,7 +3302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.1.0", "rustix", "windows-sys 0.52.0", ] @@ -3296,6 +3497,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3321,6 +3523,16 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "ttf-parser" version = "0.20.0" @@ -3461,14 +3673,17 @@ name = "util" version = "0.1.0" dependencies = [ "anyhow", + "arrayvec", "collections", "dirs", "futures", "git2", "globset", + "isahc", "lazy_static", "log", "rand", + "rayon", "regex", "rust-embed", "serde", @@ -3478,6 +3693,7 @@ dependencies = [ "tokio", "tokio-stream", "unicase", + "url", ] [[package]] diff --git a/README.md b/README.md index c0cb37a..e8f686d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ It's intended to be an (almost) drop-in replacement for Neovim, aside from nite The following list of features and tasks required to have them is highly opinionated and consists of things I want a code editor to have. -- [ ] Make it compile :) +- [ ] Barebones editor + * [x] Make it compile - [ ] Vim-like keybindings and motions - [ ] A Telescope-ey file finder - [ ] Something like [harpoon](https://github.com/theprimeagen/harpoon) and maybe a topbar with marks diff --git a/crates/ming/Cargo.toml b/crates/ming/Cargo.toml index 8a17937..7b5a3a1 100644 --- a/crates/ming/Cargo.toml +++ b/crates/ming/Cargo.toml @@ -15,10 +15,10 @@ runtime_shaders = [] macos-blade = ["blade-graphics", "blade-macros", "bytemuck"] [lib] -path = "src/gpui.rs" doctest = false [dependencies] +anyhow.workspace = true async-task = "4.7" backtrace = { version = "0.3", optional = true } blade-graphics = { workspace = true, optional = true } diff --git a/crates/ming/src/app.rs b/crates/ming/src/app.rs index d77813a..bb83a3f 100644 --- a/crates/ming/src/app.rs +++ b/crates/ming/src/app.rs @@ -18,7 +18,7 @@ use time::UtcOffset; pub use async_context::*; use collections::{FxHashMap, FxHashSet, VecDeque}; pub use entity_map::*; -use http::{self, HttpClient}; +use util::http::{self, HttpClient}; pub use model_context::*; #[cfg(any(test, feature = "test-support"))] pub use test_context::*; diff --git a/crates/ming/src/elements/animation.rs b/crates/ming/src/elements/animation.rs index 29506a6..ad62f43 100644 --- a/crates/ming/src/elements/animation.rs +++ b/crates/ming/src/elements/animation.rs @@ -84,7 +84,7 @@ impl AnimationElement { impl IntoElement for AnimationElement { type Element = AnimationElement; - fn into_element(self) -> Self::Element { + fn into_element(self) -> AnimationElement { self } } diff --git a/crates/ming/src/elements/canvas.rs b/crates/ming/src/elements/canvas.rs index ccf29f4..a505a23 100644 --- a/crates/ming/src/elements/canvas.rs +++ b/crates/ming/src/elements/canvas.rs @@ -29,7 +29,7 @@ pub struct Canvas { impl IntoElement for Canvas { type Element = Self; - fn into_element(self) -> Self::Element { + fn into_element(self) -> Self { self } } diff --git a/crates/ming/src/elements/div.rs b/crates/ming/src/elements/div.rs index 00609ae..b63127c 100644 --- a/crates/ming/src/elements/div.rs +++ b/crates/ming/src/elements/div.rs @@ -2328,7 +2328,7 @@ where { type Element = E::Element; - fn into_element(self) -> Self::Element { + fn into_element(self) -> ::Element { self.element.into_element() } } @@ -2421,7 +2421,7 @@ where { type Element = Self; - fn into_element(self) -> Self::Element { + fn into_element(self) -> Self { self } } diff --git a/crates/ming/src/elements/img.rs b/crates/ming/src/elements/img.rs index 2c8fcdc..9eb6a9d 100644 --- a/crates/ming/src/elements/img.rs +++ b/crates/ming/src/elements/img.rs @@ -13,7 +13,7 @@ use image::{ImageBuffer, ImageError}; #[cfg(target_os = "macos")] use media::core_video::CVImageBuffer; -use http; +use util::http; use thiserror::Error; use util::ResultExt; diff --git a/crates/ming/src/elements/list.rs b/crates/ming/src/elements/list.rs index 0d4cade..82c7199 100644 --- a/crates/ming/src/elements/list.rs +++ b/crates/ming/src/elements/list.rs @@ -14,7 +14,7 @@ use crate::{ use collections::VecDeque; use refineable::Refineable as _; use std::{cell::RefCell, ops::Range, rc::Rc}; -use sum_tree::{Bias, SumTree}; +use util::sum_tree::{self, Bias, SumTree}; use taffy::style::Overflow; /// Construct a new list element diff --git a/crates/ming/src/executor.rs b/crates/ming/src/executor.rs index ae2696a..94f5c56 100644 --- a/crates/ming/src/executor.rs +++ b/crates/ming/src/executor.rs @@ -1,7 +1,6 @@ use crate::{AppContext, PlatformDispatcher}; -use tokio::sync::mpsc; -use tokio::spawn; use std::{ + future::Future, fmt::Debug, marker::PhantomData, mem, @@ -15,6 +14,8 @@ use std::{ task::{Context, Poll}, time::Duration, }; +use futures::FutureExt; +use tokio::sync::mpsc; use util::TryFutureExt; use waker_fn::waker_fn; @@ -89,7 +90,7 @@ impl Future for Task { fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll { match unsafe { self.get_unchecked_mut() } { Task::Ready(val) => Poll::Ready(val.take().unwrap()), - Task::Spawned(task) => task.poll(cx), + Task::Spawned(task) => task.poll_unpin(cx), } } } @@ -496,6 +497,6 @@ impl<'a> Drop for Scope<'a> { // Wait until the channel is closed, which means that all of the spawned // futures have resolved. - self.executor.block(self.rx.next()); + self.executor.block(self.rx.recv()); } } diff --git a/crates/ming/src/interactive.rs b/crates/ming/src/interactive.rs index c92b58b..7ac1d3f 100644 --- a/crates/ming/src/interactive.rs +++ b/crates/ming/src/interactive.rs @@ -440,7 +440,7 @@ impl PlatformInput { mod test { use crate::{ - self as gpui, div, Element, FocusHandle, InteractiveElement, IntoElement, KeyBinding, + self as ming, div, Element, FocusHandle, InteractiveElement, IntoElement, KeyBinding, Keystroke, ParentElement, Render, TestAppContext, VisualContext, }; @@ -453,7 +453,7 @@ mod test { actions!(test, [TestAction]); impl Render for TestView { - fn render(&mut self, cx: &mut gpui::ViewContext) -> impl Element { + fn render(&mut self, cx: &mut ming::ViewContext) -> impl Element { div().id("testview").child( div() .key_context("parent") @@ -476,7 +476,7 @@ mod test { } } - #[gpui::test] + #[ming::test] fn test_on_events(cx: &mut TestAppContext) { let window = cx.update(|cx| { cx.open_window(Default::default(), |cx| { diff --git a/crates/ming/src/gpui.rs b/crates/ming/src/lib.rs similarity index 99% rename from crates/ming/src/gpui.rs rename to crates/ming/src/lib.rs index 315ad92..6f33623 100644 --- a/crates/ming/src/gpui.rs +++ b/crates/ming/src/lib.rs @@ -125,7 +125,7 @@ pub use element::*; pub use elements::*; pub use executor::*; pub use geometry::*; -pub use gpui_macros::{register_action, test, IntoElement, Render}; +pub use ming_macros::{register_action, test, IntoElement, Render}; pub use input::*; pub use interactive::*; use key_dispatch::*; @@ -136,7 +136,7 @@ pub use scene::*; use seal::Sealed; pub use shared_string::*; pub use shared_uri::*; -pub use smol::Timer; +pub use tokio::time::Sleep as Timer; pub use style::*; pub use styled::*; pub use subscription::*; diff --git a/crates/ming/src/platform.rs b/crates/ming/src/platform.rs index 25f6a3e..8451358 100644 --- a/crates/ming/src/platform.rs +++ b/crates/ming/src/platform.rs @@ -58,7 +58,7 @@ pub(crate) use cosmic_text::*; pub(crate) use linux::*; #[cfg(target_os = "macos")] pub(crate) use mac::*; -pub use semantic_version::SemanticVersion; +pub use util::semver::SemanticVersion; #[cfg(any(test, feature = "test-support"))] pub(crate) use test::*; use time::UtcOffset; diff --git a/crates/ming/src/platform/blade/blade_atlas.rs b/crates/ming/src/platform/blade/blade_atlas.rs index 22b2e4f..ce0bbcd 100644 --- a/crates/ming/src/platform/blade/blade_atlas.rs +++ b/crates/ming/src/platform/blade/blade_atlas.rs @@ -29,8 +29,8 @@ struct BladeAtlasState { uploads: Vec, } -#[cfg(gles)] -unsafe impl Send for BladeAtlasState {} +// #[cfg(gles)] +// unsafe impl Send for BladeAtlasState {} impl BladeAtlasState { fn destroy(&mut self) { diff --git a/crates/ming/src/platform/linux/x11/client.rs b/crates/ming/src/platform/linux/x11/client.rs index 1c3a21c..0e40835 100644 --- a/crates/ming/src/platform/linux/x11/client.rs +++ b/crates/ming/src/platform/linux/x11/client.rs @@ -659,7 +659,7 @@ impl LinuxClient for X11Client { .unwrap(); let _ = state.xcb_connection.flush().unwrap(); // Take into account that some frames have been skipped - let now = time::Instant::now(); + let now = std::time::Instant::now(); while instant < now { instant += refresh_duration; } diff --git a/crates/ming/src/platform/windows/platform.rs b/crates/ming/src/platform/windows/platform.rs index 470d6be..188b91c 100644 --- a/crates/ming/src/platform/windows/platform.rs +++ b/crates/ming/src/platform/windows/platform.rs @@ -17,7 +17,7 @@ use copypasta::{ClipboardContext, ClipboardProvider}; use futures::channel::oneshot::{self, Receiver}; use itertools::Itertools; use parking_lot::RwLock; -use semantic_version::SemanticVersion; +use util::semver::SemanticVersion; use smallvec::SmallVec; use time::UtcOffset; use windows::{ diff --git a/crates/ming/src/styled.rs b/crates/ming/src/styled.rs index c5ddd1f..ebd8efd 100644 --- a/crates/ming/src/styled.rs +++ b/crates/ming/src/styled.rs @@ -1,5 +1,5 @@ use crate::{ - self as gpui, hsla, point, px, relative, rems, AbsoluteLength, AlignItems, CursorStyle, + self as ming, hsla, point, px, relative, rems, AbsoluteLength, AlignItems, CursorStyle, DefiniteLength, Fill, FlexDirection, FlexWrap, Font, FontStyle, FontWeight, Hsla, JustifyContent, Length, Position, SharedString, StyleRefinement, Visibility, WhiteSpace, }; @@ -13,7 +13,7 @@ pub trait Styled: Sized { /// Returns a reference to the style memory of this element. fn style(&mut self) -> &mut StyleRefinement; - gpui_macros::style_helpers!(); + ming_macros::style_helpers!(); /// Sets the position of the element to `relative`. /// [Docs](https://tailwindcss.com/docs/position) diff --git a/crates/ming/src/view.rs b/crates/ming/src/view.rs index fb96f75..edf8d76 100644 --- a/crates/ming/src/view.rs +++ b/crates/ming/src/view.rs @@ -393,7 +393,7 @@ impl Element for AnyView { impl IntoElement for View { type Element = View; - fn into_element(self) -> Self::Element { + fn into_element(self) -> View { self } } diff --git a/crates/ming_macros/src/lib.rs b/crates/ming_macros/src/lib.rs index aef1785..a1d7d35 100644 --- a/crates/ming_macros/src/lib.rs +++ b/crates/ming_macros/src/lib.rs @@ -8,7 +8,7 @@ use proc_macro::TokenStream; #[proc_macro] /// register_action! can be used to register an action with the GPUI runtime. -/// You should typically use `gpui::actions!` or `gpui::impl_actions!` instead, +/// You should typically use `ming::actions!` or `gpui::impl_actions!` instead, /// but this can be used for fine grained customization. pub fn register_action(ident: TokenStream) -> TokenStream { register_action::register_action_macro(ident) @@ -27,7 +27,7 @@ pub fn derive_render(input: TokenStream) -> TokenStream { derive_render::derive_render(input) } -// Used by gpui to generate the style helpers. +// Used by ming to generate the style helpers. #[proc_macro] #[doc(hidden)] pub fn style_helpers(input: TokenStream) -> TokenStream { @@ -35,14 +35,14 @@ pub fn style_helpers(input: TokenStream) -> TokenStream { } #[proc_macro_attribute] -/// #[gpui::test] can be used to annotate test functions that run with GPUI support. +/// #[ming::test] can be used to annotate test functions that run with GPUI support. /// it supports both synchronous and asynchronous tests, and can provide you with /// as many `TestAppContext` instances as you need. /// The output contains a `#[test]` annotation so this can be used with any existing /// test harness (`cargo test` or `cargo-nextest`). /// /// ``` -/// #[gpui::test] +/// #[ming::test] /// async fn test_foo(mut cx: &TestAppContext) { } /// ``` /// @@ -52,10 +52,10 @@ pub fn style_helpers(input: TokenStream) -> TokenStream { /// Using the same `StdRng` for behaviour in your test will allow you to exercise a wide /// variety of scenarios and interleavings just by changing the seed. /// -/// #[gpui::test] also takes three different arguments: -/// - `#[gpui::test(iterations=10)]` will run the test ten times with a different initial SEED. -/// - `#[gpui::test(retries=3)]` will run the test up to four times if it fails to try and make it pass. -/// - `#[gpui::test(on_failure="crate::test::report_failure")]` will call the specified function after the +/// #[ming::test] also takes three different arguments: +/// - `#[ming::test(iterations=10)]` will run the test ten times with a different initial SEED. +/// - `#[ming::test(retries=3)]` will run the test up to four times if it fails to try and make it pass. +/// - `#[ming::test(on_failure="crate::test::report_failure")]` will call the specified function after the /// tests fail so that you can write out more detail about the failure. pub fn test(args: TokenStream, function: TokenStream) -> TokenStream { test::test(args, function) diff --git a/crates/ming_macros/src/style_helpers.rs b/crates/ming_macros/src/style_helpers.rs index a4b1fe9..cb7685b 100644 --- a/crates/ming_macros/src/style_helpers.rs +++ b/crates/ming_macros/src/style_helpers.rs @@ -130,7 +130,7 @@ fn generate_predefined_setter( .iter() .map(|field_tokens| { quote! { - style.#field_tokens = Some((#negation_token gpui::#length_tokens).into()); + style.#field_tokens = Some((#negation_token ming::#length_tokens).into()); } }) .collect::>(); @@ -170,7 +170,7 @@ fn generate_custom_value_setter( let method = quote! { #[doc = #doc_string] - fn #method_name(mut self, length: impl std::clone::Clone + Into) -> Self { + fn #method_name(mut self, length: impl std::clone::Clone + Into) -> Self { let style = self.style(); #(#field_assignments)* self diff --git a/crates/nite/Cargo.toml b/crates/nite/Cargo.toml index 7b86a3b..2833414 100644 --- a/crates/nite/Cargo.toml +++ b/crates/nite/Cargo.toml @@ -5,3 +5,4 @@ edition.workspace = true [dependencies] funnylog.workspace = true +ming.workspace = true diff --git a/crates/nite/src/main.rs b/crates/nite/src/main.rs index e7a11a9..de138f3 100644 --- a/crates/nite/src/main.rs +++ b/crates/nite/src/main.rs @@ -1,3 +1,35 @@ -fn main() { - println!("Hello, world!"); +use ming::*; + +struct Nite { + text: String, +} + +impl Render for Nite { + fn render(&mut self, cx: &mut ViewContext) -> impl IntoElement { + div() + .flex() + .size(Length::Definite(DefiniteLength::Fraction(1f32))) + .bg(transparent_black()) + .justify_center() + .items_center() + .text_xl() + .text_color(white()) + .font_family("ComicShannsMono Nerd Font Mono") + .child(format!("HELLO WORLD!!!!! {}", self.text)) + } +} + +fn main() { + App::new().run(|cx| { + cx.open_window( + WindowOptions { + ..Default::default() + }, + |cx| { + cx.new_view(|_cx| Nite { + text: String::new(), + }) + }, + ); + }) } diff --git a/crates/util/Cargo.toml b/crates/util/Cargo.toml index ab21209..945bb22 100644 --- a/crates/util/Cargo.toml +++ b/crates/util/Cargo.toml @@ -33,6 +33,14 @@ take-until = "0.2.0" tokio-stream.workspace = true tempfile = { workspace = true, optional = true } unicase.workspace = true +rayon = "1.10.0" +arrayvec = "0.7.4" +url = "2.5.0" +# explicitly disable http2 +isahc = { version = "1.7.2", default-features = false, features = [ + "static-curl", + "text-decoding", +] } # [target.'cfg(windows)'.dependencies] # tendril = "0.4.3" diff --git a/crates/util/src/fs.rs b/crates/util/src/fs.rs index 67490c4..5245b7d 100644 --- a/crates/util/src/fs.rs +++ b/crates/util/src/fs.rs @@ -1,8 +1,6 @@ use std::path::Path; -use crate::ResultExt; use tokio::fs; -use tokio_stream::{wrappers::ReadDirStream, StreamExt}; /// Removes all files and directories matching the given predicate pub async fn remove_matching(dir: &Path, predicate: F) -> std::io::Result<()> diff --git a/crates/util/src/http.rs b/crates/util/src/http.rs index acb7259..6d6b0eb 100644 --- a/crates/util/src/http.rs +++ b/crates/util/src/http.rs @@ -1,8 +1,5 @@ -pub mod github; - pub use anyhow::{anyhow, Result}; -use futures::future::BoxFuture; -use futures_lite::FutureExt; +use futures::future::{BoxFuture, FutureExt}; use isahc::config::{Configurable, RedirectPolicy}; pub use isahc::{ http::{Method, StatusCode, Uri}, diff --git a/crates/util/src/lib.rs b/crates/util/src/lib.rs index 5161068..76ffb5b 100644 --- a/crates/util/src/lib.rs +++ b/crates/util/src/lib.rs @@ -1,4 +1,5 @@ pub mod arc_cow; +pub mod http; pub mod fs; pub mod paths; pub mod serde; diff --git a/flake.lock b/flake.lock index 94e5fef..55e8fde 100644 --- a/flake.lock +++ b/flake.lock @@ -1,63 +1,137 @@ { "nodes": { - "crane": { - "flake": false, + "cachix": { + "inputs": { + "devenv": "devenv_2", + "flake-compat": [ + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "devenv", + "nixpkgs" + ], + "pre-commit-hooks": [ + "devenv", + "pre-commit-hooks" + ] + }, "locked": { - "lastModified": 1699217310, - "narHash": "sha256-xpW3VFUG7yE6UE6Wl0dhqencuENSkV7qpnpe9I8VbPw=", - "owner": "ipetkov", - "repo": "crane", - "rev": "d535642bbe6f377077f7c23f0febb78b1463f449", + "lastModified": 1712055811, + "narHash": "sha256-7FcfMm5A/f02yyzuavJe06zLa9hcMHsagE28ADcmQvk=", + "owner": "cachix", + "repo": "cachix", + "rev": "02e38da89851ec7fec3356a5c04bc8349cae0e30", "type": "github" }, "original": { - "owner": "ipetkov", - "ref": "v0.15.0", - "repo": "crane", + "owner": "cachix", + "repo": "cachix", "type": "github" } }, - "devshell": { + "crane": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1713532798, - "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", - "owner": "numtide", - "repo": "devshell", - "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", + "lastModified": 1715274763, + "narHash": "sha256-3Iv1PGHJn9sV3HO4FlOVaaztOxa9uGLfOmUWrH7v7+A=", + "owner": "ipetkov", + "repo": "crane", + "rev": "27025ab71bdca30e7ed0a16c88fd74c5970fc7f5", "type": "github" }, "original": { - "owner": "numtide", - "repo": "devshell", + "owner": "ipetkov", + "repo": "crane", "type": "github" } }, - "dream2nix": { + "devenv": { "inputs": { - "nixpkgs": [ - "nci", - "nixpkgs" - ], - "purescript-overlay": "purescript-overlay", - "pyproject-nix": "pyproject-nix" + "cachix": "cachix", + "flake-compat": "flake-compat_2", + "nix": "nix_2", + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1715517859, - "narHash": "sha256-H/9fwzjwRRELLL8egvJfNB6ebEQo+j3p1qddbbzKego=", - "owner": "nix-community", - "repo": "dream2nix", - "rev": "1a4df0e94f273b10834a6701c58d5f1742d26936", + "lastModified": 1715593316, + "narHash": "sha256-S7XatU9uV3q9bVBcg/ER0VMQcnPZprrVlN209ne7LDw=", + "owner": "cachix", + "repo": "devenv", + "rev": "725c90407ef53cc2a1b53701c6d2d0745cf2484f", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "dream2nix", + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "devenv_2": { + "inputs": { + "flake-compat": [ + "devenv", + "cachix", + "flake-compat" + ], + "nix": "nix", + "nixpkgs": "nixpkgs", + "poetry2nix": "poetry2nix", + "pre-commit-hooks": [ + "devenv", + "cachix", + "pre-commit-hooks" + ] + }, + "locked": { + "lastModified": 1708704632, + "narHash": "sha256-w+dOIW60FKMaHI1q5714CSibk99JfYxm0CzTinYWr+Q=", + "owner": "cachix", + "repo": "devenv", + "rev": "2ee4450b0f4b95a1b90f2eb5ffea98b90e48c196", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "python-rewrite", + "repo": "devenv", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", "type": "github" } }, @@ -84,11 +158,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -101,6 +175,24 @@ "inputs": { "systems": "systems_2" }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, "locked": { "lastModified": 1705309234, "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", @@ -115,58 +207,117 @@ "type": "github" } }, - "mk-naked-shell": { - "flake": false, + "gitignore": { + "inputs": { + "nixpkgs": [ + "devenv", + "pre-commit-hooks", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1681286841, - "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", - "owner": "yusdacra", - "repo": "mk-naked-shell", - "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { - "owner": "yusdacra", - "repo": "mk-naked-shell", + "owner": "hercules-ci", + "repo": "gitignore.nix", "type": "github" } }, - "nci": { + "nix": { "inputs": { - "crane": "crane", - "dream2nix": "dream2nix", - "mk-naked-shell": "mk-naked-shell", - "nixpkgs": "nixpkgs", - "parts": "parts", - "rust-overlay": "rust-overlay", - "treefmt": "treefmt" + "flake-compat": "flake-compat", + "nixpkgs": [ + "devenv", + "cachix", + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1715580775, - "narHash": "sha256-QpSLFjV4k3+ZJ62UXavuyq3U4Ag/6bC2eqr6claEu+w=", - "owner": "yusdacra", - "repo": "nix-cargo-integration", - "rev": "a51105224b29a488ae5ae17f5c8752901de9b56a", + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", + "owner": "domenkozar", + "repo": "nix", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", "type": "github" }, "original": { - "owner": "yusdacra", - "repo": "nix-cargo-integration", + "owner": "domenkozar", + "ref": "devenv-2.21", + "repo": "nix", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "devenv", + "cachix", + "devenv", + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688870561, + "narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nix_2": { + "inputs": { + "flake-compat": [ + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression_2" + }, + "locked": { + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", + "owner": "domenkozar", + "repo": "nix", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", + "type": "github" + }, + "original": { + "owner": "domenkozar", + "ref": "devenv-2.21", + "repo": "nix", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1715447595, - "narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=", + "lastModified": 1692808169, + "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "062ca2a9370a27a35c524dc82d540e6e9824b652", + "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -183,7 +334,71 @@ "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" } }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-regression_2": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { + "locked": { + "lastModified": 1713361204, + "narHash": "sha256-TA6EDunWTkc5FvDCqU3W2T3SFn0gRZqh6D/hJnM02MM=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "285676e87ad9f0ca23d8714a6ab61e7e027020c6", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1715530780, "narHash": "sha256-bBz4/T/zBzv9Xi5XUlFDeosmSNppLaCQTizMKSksAvk=", @@ -199,7 +414,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -215,7 +430,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1708475490, "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", @@ -231,97 +446,73 @@ "type": "github" } }, - "parts": { + "poetry2nix": { "inputs": { - "nixpkgs-lib": [ - "nci", + "flake-utils": "flake-utils", + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "devenv", + "cachix", + "devenv", "nixpkgs" ] }, "locked": { - "lastModified": 1714641030, - "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", + "lastModified": 1692876271, + "narHash": "sha256-IXfZEkI0Mal5y1jr6IRWMqK8GW2/f28xJenZIPQqkY0=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "d5006be9c2c2417dafb2e2e5034d83fabd207ee3", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", + "owner": "nix-community", + "repo": "poetry2nix", "type": "github" } }, - "purescript-overlay": { + "pre-commit-hooks": { "inputs": { + "flake-compat": [ + "devenv", + "flake-compat" + ], + "flake-utils": "flake-utils_2", + "gitignore": "gitignore", "nixpkgs": [ - "nci", - "dream2nix", + "devenv", "nixpkgs" ], - "slimlock": "slimlock" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1696022621, - "narHash": "sha256-eMjFmsj2G1E0Q5XiibUNgFjTiSz0GxIeSSzzVdoN730=", - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "rev": "047c7933abd6da8aa239904422e22d190ce55ead", + "lastModified": 1713775815, + "narHash": "sha256-Wu9cdYTnGQQwtT20QQMg7jzkANKQjwBD9iccfGKkfls=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "2ac4dcbf55ed43f3be0bae15e181f08a57af24a4", "type": "github" }, "original": { - "owner": "thomashoneyman", - "repo": "purescript-overlay", - "type": "github" - } - }, - "pyproject-nix": { - "flake": false, - "locked": { - "lastModified": 1702448246, - "narHash": "sha256-hFg5s/hoJFv7tDpiGvEvXP0UfFvFEDgTdyHIjDVHu1I=", - "owner": "davhau", - "repo": "pyproject.nix", - "rev": "5a06a2697b228c04dd2f35659b4b659ca74f7aeb", - "type": "github" - }, - "original": { - "owner": "davhau", - "ref": "dream2nix", - "repo": "pyproject.nix", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", "type": "github" } }, "root": { "inputs": { - "devshell": "devshell", + "crane": "crane", + "devenv": "devenv", "flake-parts": "flake-parts", - "nci": "nci", - "nixpkgs": "nixpkgs_2", - "rust-overlay": "rust-overlay_2", + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay", "treefmt-nix": "treefmt-nix" } }, "rust-overlay": { - "flake": false, - "locked": { - "lastModified": 1715566659, - "narHash": "sha256-OpI0TnN+uE0vvxjPStlTzf5RTohIXVSMwrP9NEgMtaY=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "6c465248316cd31502c82f81f1a3acf2d621b01c", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1715566659, @@ -337,29 +528,6 @@ "type": "github" } }, - "slimlock": { - "inputs": { - "nixpkgs": [ - "nci", - "dream2nix", - "purescript-overlay", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688610262, - "narHash": "sha256-Wg0ViDotFWGWqKIQzyYCgayeH8s4U1OZcTiWTQYdAp4=", - "owner": "thomashoneyman", - "repo": "slimlock", - "rev": "b5c6cdcaf636ebbebd0a1f32520929394493f1a6", - "type": "github" - }, - "original": { - "owner": "thomashoneyman", - "repo": "slimlock", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -390,30 +558,24 @@ "type": "github" } }, - "treefmt": { - "inputs": { - "nixpkgs": [ - "nci", - "nixpkgs" - ] - }, + "systems_3": { "locked": { - "lastModified": 1714058656, - "narHash": "sha256-Qv4RBm4LKuO4fNOfx9wl40W2rBbv5u5m+whxRYUMiaA=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "c6aaf729f34a36c445618580a9f95a48f5e4e03f", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "numtide", - "repo": "treefmt-nix", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1714058656, diff --git a/flake.nix b/flake.nix index a568b78..b982301 100644 --- a/flake.nix +++ b/flake.nix @@ -1,76 +1,75 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + devenv.url = "github:cachix/devenv"; rust-overlay.url = "github:oxalica/rust-overlay"; flake-parts.url = "github:hercules-ci/flake-parts"; treefmt-nix.url = "github:numtide/treefmt-nix"; - nci.url = "github:yusdacra/nix-cargo-integration"; - devshell = { - url = "github:numtide/devshell"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + crane.url = "github:ipetkov/crane"; + crane.inputs.nixpkgs.follows = "nixpkgs"; }; nixConfig = { - extra-trusted-public-keys = - [ "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" ]; - extra-substituters = [ "https://devenv.cachix.org" ]; + extra-trusted-public-keys = [ + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + "surrealdb.cachix.org-1:rbm7Qs+s36pxbfk9jhIa5HRld6gZ63koZz1h/9sSxaA=" + ]; + extra-substituters = + [ "https://devenv.cachix.org" "https://surrealdb.cachix.org" ]; }; - outputs = { self, flake-parts, ... }@inputs: + outputs = { flake-parts, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devshell.flakeModule - inputs.treefmt-nix.flakeModule - inputs.nci.flakeModule - ]; + imports = [ inputs.devenv.flakeModule inputs.treefmt-nix.flakeModule ]; systems = inputs.nixpkgs.lib.systems.flakeExposed; - perSystem = { config, pkgs, ... }: rec { + perSystem = { config, pkgs, system, ... }: { + _module.args.pkgs = import inputs.nixpkgs { + inherit system; + config.allowUnfree = true; + overlays = [ inputs.rust-overlay.overlays.default ]; + }; + treefmt = { + package = pkgs.treefmt; programs = { + leptosfmt.enable = true; + prettier.enable = true; nixfmt-rfc-style.enable = true; rustfmt.enable = true; }; projectRootFile = ./flake.nix; }; - nci.projects."nite".path = ./.; - nci.crates."nite" = { }; + devenv.shells.default = rec { + packages = with pkgs; [ + pkg-config + fontconfig.dev + freetype.dev + openssl - packages = config.nci.outputs."nite".packages.release; + # If on x11 + xorg.libX11 + xorg.libX11 + xorg.libXcursor + xorg.libXi + xorg.libXrandr + # If on wayland + libxkbcommon + wayland - devshells.default = let - zcommands = [ "ar" "cc" "c++" ]; - zcc = pkgs.writeShellScriptBin "zcc" '' - zig cc $@ - ''; - - libs = with pkgs; [ fontconfig freetype ]; - in { - imports = [ (inputs.devshell + "/extra/language/c.nix") ]; - env = [{ - name = "AR"; - value = pkgs.writeShellScript "zar" '' - zig ar $@ - ''; - }]; - - devshell.name = "nite"; - language.c.compiler = zcc; - language.c.includes = libs; - - commands = [ - { - help = "format the entire tree"; - name = "format"; - command = "${config.treefmt.build.wrapper}/bin/treefmt ."; - } - { - help = "launch the editor"; - name = "nite"; - command = "RUST_LOG=info,nite=trace cargo run"; - } + vulkan-tools + vulkan-headers + vulkan-validation-layers + vulkan-loader + udev ]; + + env.LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath packages; + + scripts = { + fmt.exec = "${config.treefmt.build.wrapper}/bin/treefmt ."; + nite.exec = "RUST_LOG=info,nite=trace,ming=trace cargo run"; + }; }; }; };