diff --git a/.direnv/flake-inputs/p0h1gvdli8k29651567l38qx7sxmkm5w-source b/.direnv/flake-inputs/p0h1gvdli8k29651567l38qx7sxmkm5w-source deleted file mode 120000 index 1c90f0e..0000000 --- a/.direnv/flake-inputs/p0h1gvdli8k29651567l38qx7sxmkm5w-source +++ /dev/null @@ -1 +0,0 @@ -/nix/store/p0h1gvdli8k29651567l38qx7sxmkm5w-source \ No newline at end of file diff --git a/.direnv/flake-inputs/s3wszxf5k8i4gi65sinmb159iqk2pkh6-source b/.direnv/flake-inputs/s3wszxf5k8i4gi65sinmb159iqk2pkh6-source new file mode 120000 index 0000000..4ae26e5 --- /dev/null +++ b/.direnv/flake-inputs/s3wszxf5k8i4gi65sinmb159iqk2pkh6-source @@ -0,0 +1 @@ +/nix/store/s3wszxf5k8i4gi65sinmb159iqk2pkh6-source \ No newline at end of file diff --git a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa index 1238c16..05398ff 120000 --- a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa +++ b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa @@ -1 +1 @@ -/nix/store/43vi36d27viiyg22q566927b7divdx8f-nix-shell-env \ No newline at end of file +/nix/store/9hi80wxm0k1vi5h31pc95yqaza5brixs-nix-shell-env \ No newline at end of file diff --git a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc index 8c0fd11..66b2e43 100644 --- a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc +++ b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc @@ -35,13 +35,13 @@ NIX_CC='/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.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=43vi36d27v -isystem /nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev/include -isystem /nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev/include' +NIX_CFLAGS_COMPILE=' -frandom-seed=9hi80wxm0k -isystem /nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev/include -isystem /nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev/include' export NIX_CFLAGS_COMPILE NIX_ENFORCE_NO_NATIVE='1' export NIX_ENFORCE_NO_NATIVE NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningextensive libcxxhardeningfast pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs' export NIX_HARDENING_ENABLE -NIX_LDFLAGS='-rpath /home/mrfluffy/Documents/projects/rust/whereAmI/outputs/out/lib -L/nix/store/2xy0xh173k83ag0avd96wq1rwz8yshd5-rust-mixed/lib -L/nix/store/rfm5m2l26lqkskcvxn5bm5xqh6c8wqr5-openssl-3.6.0/lib -L/nix/store/2xy0xh173k83ag0avd96wq1rwz8yshd5-rust-mixed/lib -L/nix/store/rfm5m2l26lqkskcvxn5bm5xqh6c8wqr5-openssl-3.6.0/lib' +NIX_LDFLAGS='-rpath /home/mrfluffy/Documents/projects/rust/whereAmI/outputs/out/lib -L/nix/store/iaahn9l0032w6rl1s436k9lravzi2g9r-rust-mixed/lib -L/nix/store/rfm5m2l26lqkskcvxn5bm5xqh6c8wqr5-openssl-3.6.0/lib -L/nix/store/iaahn9l0032w6rl1s436k9lravzi2g9r-rust-mixed/lib -L/nix/store/rfm5m2l26lqkskcvxn5bm5xqh6c8wqr5-openssl-3.6.0/lib' export NIX_LDFLAGS NIX_NO_SELF_RPATH='1' NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' @@ -58,7 +58,7 @@ OLDPWD='' export OLDPWD OPTERR='1' OSTYPE='linux-gnu' -PATH='/nix/store/2xy0xh173k83ag0avd96wq1rwz8yshd5-rust-mixed/bin:/nix/store/827b5xq1ghbbdrp1faa4fw32xj1m2p51-openssl-3.6.0-bin/bin:/nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2/bin:/nix/store/wps9wky8ff2xparxmz2rwi0x3lphg3n4-cargo-deny-0.18.9/bin:/nix/store/mv5hphn4f4in91inijgh760vmqp6vbmb-cargo-edit-0.13.8/bin:/nix/store/1jjg5g44ibz8vfiiw73pchic38nxlsfc-cargo-watch-8.5.3/bin:/nix/store/x0rzz773d6pjr3zyp6753d93zw37yjkl-rust-analyzer-2025-12-29/bin:/nix/store/3vs2fr2mazafcdwyza15bfhpmccx1k7z-patchelf-0.15.2/bin:/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0/bin:/nix/store/qarrb8yfby1yyypm32vabzgxgq3w41ma-gcc-15.2.0/bin:/nix/store/7ri1mm5y99nkr7657r77wycrvhg7z9x0-glibc-2.40-66-bin/bin:/nix/store/d75200gb22v7p0703h5jrkgg8bqydk5q-coreutils-9.8/bin:/nix/store/dwiyp91lmxq864plaas14jm14m87sg3f-binutils-wrapper-2.44/bin:/nix/store/cl88v2m1y5q3k6jlkq5jjf73nmfgl1px-binutils-2.44/bin:/nix/store/d75200gb22v7p0703h5jrkgg8bqydk5q-coreutils-9.8/bin:/nix/store/wd99g2j010fdkry0ws1bhxzm52w82ssx-findutils-4.10.0/bin:/nix/store/20zvyjvxq9x2mkp7rbnvrwjjzq2n76hh-diffutils-3.12/bin:/nix/store/k06ssckzrzn9jjvvs4n62m6567zmbx6x-gnused-4.9/bin:/nix/store/qfmq7p42ak5yn389qvx7zpxkan5i4xiy-gnugrep-3.12/bin:/nix/store/nmxm04dhkaqg1q6hai70n9zmzb0q49a5-gawk-5.3.2/bin:/nix/store/k1lcfin159706lihwx5hhvl80dbij4jw-gnutar-1.35/bin:/nix/store/0hv4z5s3r1h4lmvn0427mlxjxgvg34nr-gzip-1.14/bin:/nix/store/p61ba9fdgx3358bpp18hv4rslf6n5bq6-bzip2-1.0.8-bin/bin:/nix/store/mkm3my2067305hdh7rzmi10npwr7y17f-gnumake-4.4.1/bin:/nix/store/lw117lsr8d585xs63kx5k233impyrq7q-bash-5.3p3/bin:/nix/store/clrf4mjwr8xcfpvway6w34wzvqc1hry4-patch-2.8/bin:/nix/store/j1zc5jh0vi9sbxj09ldj4xklgm6kpf8n-xz-5.8.1-bin/bin:/nix/store/s2k48fw3y698j4kcvmw0520m06ihv2z4-file-5.45/bin' +PATH='/nix/store/iaahn9l0032w6rl1s436k9lravzi2g9r-rust-mixed/bin:/nix/store/827b5xq1ghbbdrp1faa4fw32xj1m2p51-openssl-3.6.0-bin/bin:/nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2/bin:/nix/store/wps9wky8ff2xparxmz2rwi0x3lphg3n4-cargo-deny-0.18.9/bin:/nix/store/mv5hphn4f4in91inijgh760vmqp6vbmb-cargo-edit-0.13.8/bin:/nix/store/1jjg5g44ibz8vfiiw73pchic38nxlsfc-cargo-watch-8.5.3/bin:/nix/store/x0rzz773d6pjr3zyp6753d93zw37yjkl-rust-analyzer-2025-12-29/bin:/nix/store/3vs2fr2mazafcdwyza15bfhpmccx1k7z-patchelf-0.15.2/bin:/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0/bin:/nix/store/qarrb8yfby1yyypm32vabzgxgq3w41ma-gcc-15.2.0/bin:/nix/store/7ri1mm5y99nkr7657r77wycrvhg7z9x0-glibc-2.40-66-bin/bin:/nix/store/d75200gb22v7p0703h5jrkgg8bqydk5q-coreutils-9.8/bin:/nix/store/dwiyp91lmxq864plaas14jm14m87sg3f-binutils-wrapper-2.44/bin:/nix/store/cl88v2m1y5q3k6jlkq5jjf73nmfgl1px-binutils-2.44/bin:/nix/store/d75200gb22v7p0703h5jrkgg8bqydk5q-coreutils-9.8/bin:/nix/store/wd99g2j010fdkry0ws1bhxzm52w82ssx-findutils-4.10.0/bin:/nix/store/20zvyjvxq9x2mkp7rbnvrwjjzq2n76hh-diffutils-3.12/bin:/nix/store/k06ssckzrzn9jjvvs4n62m6567zmbx6x-gnused-4.9/bin:/nix/store/qfmq7p42ak5yn389qvx7zpxkan5i4xiy-gnugrep-3.12/bin:/nix/store/nmxm04dhkaqg1q6hai70n9zmzb0q49a5-gawk-5.3.2/bin:/nix/store/k1lcfin159706lihwx5hhvl80dbij4jw-gnutar-1.35/bin:/nix/store/0hv4z5s3r1h4lmvn0427mlxjxgvg34nr-gzip-1.14/bin:/nix/store/p61ba9fdgx3358bpp18hv4rslf6n5bq6-bzip2-1.0.8-bin/bin:/nix/store/mkm3my2067305hdh7rzmi10npwr7y17f-gnumake-4.4.1/bin:/nix/store/lw117lsr8d585xs63kx5k233impyrq7q-bash-5.3p3/bin:/nix/store/clrf4mjwr8xcfpvway6w34wzvqc1hry4-patch-2.8/bin:/nix/store/j1zc5jh0vi9sbxj09ldj4xklgm6kpf8n-xz-5.8.1-bin/bin:/nix/store/s2k48fw3y698j4kcvmw0520m06ihv2z4-file-5.45/bin' export PATH PKG_CONFIG='pkg-config' export PKG_CONFIG @@ -69,7 +69,7 @@ RANLIB='ranlib' export RANLIB READELF='readelf' export READELF -RUST_SRC_PATH='/nix/store/2xy0xh173k83ag0avd96wq1rwz8yshd5-rust-mixed/lib/rustlib/src/rust/library' +RUST_SRC_PATH='/nix/store/iaahn9l0032w6rl1s436k9lravzi2g9r-rust-mixed/lib/rustlib/src/rust/library' export RUST_SRC_PATH SHELL='/nix/store/lw117lsr8d585xs63kx5k233impyrq7q-bash-5.3p3/bin/bash' export SHELL @@ -81,7 +81,7 @@ STRINGS='strings' export STRINGS STRIP='strip' export STRIP -XDG_DATA_DIRS='/nix/store/2xy0xh173k83ag0avd96wq1rwz8yshd5-rust-mixed/share:/nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2/share:/nix/store/3vs2fr2mazafcdwyza15bfhpmccx1k7z-patchelf-0.15.2/share' +XDG_DATA_DIRS='/nix/store/iaahn9l0032w6rl1s436k9lravzi2g9r-rust-mixed/share:/nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2/share:/nix/store/3vs2fr2mazafcdwyza15bfhpmccx1k7z-patchelf-0.15.2/share' export XDG_DATA_DIRS __structuredAttrs='' export __structuredAttrs @@ -140,7 +140,7 @@ mesonFlags='' export mesonFlags name='nix-shell-env' export name -nativeBuildInputs='/nix/store/2xy0xh173k83ag0avd96wq1rwz8yshd5-rust-mixed /nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev /nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2 /nix/store/wps9wky8ff2xparxmz2rwi0x3lphg3n4-cargo-deny-0.18.9 /nix/store/mv5hphn4f4in91inijgh760vmqp6vbmb-cargo-edit-0.13.8 /nix/store/1jjg5g44ibz8vfiiw73pchic38nxlsfc-cargo-watch-8.5.3 /nix/store/x0rzz773d6pjr3zyp6753d93zw37yjkl-rust-analyzer-2025-12-29' +nativeBuildInputs='/nix/store/iaahn9l0032w6rl1s436k9lravzi2g9r-rust-mixed /nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev /nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2 /nix/store/wps9wky8ff2xparxmz2rwi0x3lphg3n4-cargo-deny-0.18.9 /nix/store/mv5hphn4f4in91inijgh760vmqp6vbmb-cargo-edit-0.13.8 /nix/store/1jjg5g44ibz8vfiiw73pchic38nxlsfc-cargo-watch-8.5.3 /nix/store/x0rzz773d6pjr3zyp6753d93zw37yjkl-rust-analyzer-2025-12-29' export nativeBuildInputs out='/home/mrfluffy/Documents/projects/rust/whereAmI/outputs/out' export out @@ -161,7 +161,7 @@ phases='buildPhase' export phases pkg='/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0' declare -a pkgsBuildBuild=() -declare -a pkgsBuildHost=('/nix/store/2xy0xh173k83ag0avd96wq1rwz8yshd5-rust-mixed' '/nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev' '/nix/store/827b5xq1ghbbdrp1faa4fw32xj1m2p51-openssl-3.6.0-bin' '/nix/store/rfm5m2l26lqkskcvxn5bm5xqh6c8wqr5-openssl-3.6.0' '/nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2' '/nix/store/wps9wky8ff2xparxmz2rwi0x3lphg3n4-cargo-deny-0.18.9' '/nix/store/mv5hphn4f4in91inijgh760vmqp6vbmb-cargo-edit-0.13.8' '/nix/store/1jjg5g44ibz8vfiiw73pchic38nxlsfc-cargo-watch-8.5.3' '/nix/store/x0rzz773d6pjr3zyp6753d93zw37yjkl-rust-analyzer-2025-12-29' '/nix/store/3vs2fr2mazafcdwyza15bfhpmccx1k7z-patchelf-0.15.2' '/nix/store/9k7h0vvpnb8w4xcaypff4i76n1bsmwzz-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-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/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0' '/nix/store/dwiyp91lmxq864plaas14jm14m87sg3f-binutils-wrapper-2.44' ) +declare -a pkgsBuildHost=('/nix/store/iaahn9l0032w6rl1s436k9lravzi2g9r-rust-mixed' '/nix/store/2ivy0r8ab3bnps5957vfrxcjfcgad661-openssl-3.6.0-dev' '/nix/store/827b5xq1ghbbdrp1faa4fw32xj1m2p51-openssl-3.6.0-bin' '/nix/store/rfm5m2l26lqkskcvxn5bm5xqh6c8wqr5-openssl-3.6.0' '/nix/store/hxn2qrz1zmk5q01wsb7n3d58brzrsizb-pkg-config-wrapper-0.29.2' '/nix/store/wps9wky8ff2xparxmz2rwi0x3lphg3n4-cargo-deny-0.18.9' '/nix/store/mv5hphn4f4in91inijgh760vmqp6vbmb-cargo-edit-0.13.8' '/nix/store/1jjg5g44ibz8vfiiw73pchic38nxlsfc-cargo-watch-8.5.3' '/nix/store/x0rzz773d6pjr3zyp6753d93zw37yjkl-rust-analyzer-2025-12-29' '/nix/store/3vs2fr2mazafcdwyza15bfhpmccx1k7z-patchelf-0.15.2' '/nix/store/9k7h0vvpnb8w4xcaypff4i76n1bsmwzz-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-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/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0' '/nix/store/dwiyp91lmxq864plaas14jm14m87sg3f-binutils-wrapper-2.44' ) declare -a pkgsBuildTarget=() declare -a pkgsHostHost=() declare -a pkgsHostTarget=() diff --git a/flake.lock b/flake.lock index 046608a..af876e5 100644 --- a/flake.lock +++ b/flake.lock @@ -17,7 +17,7 @@ }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/nix-community/fenix/0.1.%2A" + "url": "https://flakehub.com/f/nix-community/fenix/0.1" } }, "nixpkgs": { @@ -31,7 +31,7 @@ }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A" + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1" } }, "root": { diff --git a/flake.nix b/flake.nix index af21f0c..4634499 100644 --- a/flake.nix +++ b/flake.nix @@ -1,16 +1,16 @@ { - description = "A Nix-flake-based Rust development environment with build and run support"; + description = "A Nix-flake-based Rust development environment"; inputs = { - nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*"; # unstable - + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; # unstable Nixpkgs fenix = { - url = "https://flakehub.com/f/nix-community/fenix/0.1.*"; + url = "https://flakehub.com/f/nix-community/fenix/0.1"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, fenix }: + outputs = + { self, ... }@inputs: let supportedSystems = [ "x86_64-linux" @@ -18,13 +18,16 @@ "x86_64-darwin" "aarch64-darwin" ]; - - forEachSupportedSystem = f: - nixpkgs.lib.genAttrs supportedSystems (system: + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: f { - pkgs = import nixpkgs { + pkgs = import inputs.nixpkgs { inherit system; - overlays = [ self.overlays.default ]; + overlays = [ + inputs.self.overlays.default + ]; }; } ); @@ -32,72 +35,70 @@ { overlays.default = final: prev: { rustToolchain = - with fenix.packages.${prev.stdenv.hostPlatform.system}; - combine (with stable; [ - cargo - rustc - clippy - rustfmt - rust-src - ]); + with inputs.fenix.packages.${prev.stdenv.hostPlatform.system}; + combine ( + with stable; + [ + clippy + rustc + cargo + rustfmt + rust-src + ] + ); }; packages = forEachSupportedSystem ({ pkgs }: { - default = pkgs.rustPlatform.buildRustPackage { - pname = "whereAmI"; - version = "0.1.0"; + default = + pkgs.rustPlatform.buildRustPackage { + pname = "my-rust-project"; # Change to your Cargo.toml [package] name if different + version = "0.1.0"; # Change to your Cargo.toml [package] version - # Keep Cargo.lock even if gitignored - src = pkgs.lib.cleanSourceWith { - src = ./.; - filter = path: type: - let - name = pkgs.lib.baseNameOf path; - in - name == "Cargo.lock" - || pkgs.lib.cleanSourceFilter path type; + src = pkgs.lib.cleanSource ./.; + + cargoLock = { + lockFile = ./Cargo.lock; + # If you have additional lock files (e.g., for alternative registries), add them here + }; + + nativeBuildInputs = with pkgs; [ + pkg-config + ]; + + buildInputs = with pkgs; [ + openssl + ]; + + # Optional: for faster iterative development, you can copy artifacts from cargo + # doCheck = false; # if you want to skip tests during nix build + + meta = with pkgs.lib; { + description = "My Rust project"; + license = licenses.mit; # Adjust as needed + mainProgram = "whereAmI"; # Optional: name of the main binary for nix run + }; }; - - cargoLock = { - lockFile = ./Cargo.lock; - }; - - nativeBuildInputs = [ - pkgs.pkg-config - ]; - - buildInputs = [ - pkgs.openssl - ]; - - meta = with pkgs.lib; { - description = "A simple Rust program to show current location info"; - mainProgram = "whereAmI"; - license = licenses.mit; - maintainers = [ ]; - }; - }; }); - devShells = forEachSupportedSystem ({ pkgs }: { - default = pkgs.mkShell { - packages = with pkgs; [ - rustToolchain - openssl - pkg-config - cargo-deny - cargo-edit - cargo-watch - rust-analyzer - ]; - - env = { - # Needed for rust-analyzer stdlib discovery - RUST_SRC_PATH = - "${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; + devShells = forEachSupportedSystem ( + { pkgs }: + { + default = pkgs.mkShell { + packages = with pkgs; [ + rustToolchain + openssl + pkg-config + cargo-deny + cargo-edit + cargo-watch + rust-analyzer + ]; + env = { + # Required by rust-analyzer + RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; + }; }; - }; - }); + } + ); }; } -