more balls

This commit is contained in:
2026-01-06 19:49:47 +00:00
parent e15d88ef99
commit 1f2d87517a
6 changed files with 81 additions and 80 deletions

View File

@@ -1 +0,0 @@
/nix/store/p0h1gvdli8k29651567l38qx7sxmkm5w-source

View File

@@ -0,0 +1 @@
/nix/store/s3wszxf5k8i4gi65sinmb159iqk2pkh6-source

View File

@@ -1 +1 @@
/nix/store/43vi36d27viiyg22q566927b7divdx8f-nix-shell-env /nix/store/9hi80wxm0k1vi5h31pc95yqaza5brixs-nix-shell-env

View File

@@ -35,13 +35,13 @@ NIX_CC='/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0'
export NIX_CC export NIX_CC
NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu 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 export NIX_CFLAGS_COMPILE
NIX_ENFORCE_NO_NATIVE='1' NIX_ENFORCE_NO_NATIVE='1'
export NIX_ENFORCE_NO_NATIVE export NIX_ENFORCE_NO_NATIVE
NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningextensive libcxxhardeningfast pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs' NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningextensive libcxxhardeningfast pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs'
export NIX_HARDENING_ENABLE 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 export NIX_LDFLAGS
NIX_NO_SELF_RPATH='1' NIX_NO_SELF_RPATH='1'
NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
@@ -58,7 +58,7 @@ OLDPWD=''
export OLDPWD export OLDPWD
OPTERR='1' OPTERR='1'
OSTYPE='linux-gnu' 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 export PATH
PKG_CONFIG='pkg-config' PKG_CONFIG='pkg-config'
export PKG_CONFIG export PKG_CONFIG
@@ -69,7 +69,7 @@ RANLIB='ranlib'
export RANLIB export RANLIB
READELF='readelf' READELF='readelf'
export 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 export RUST_SRC_PATH
SHELL='/nix/store/lw117lsr8d585xs63kx5k233impyrq7q-bash-5.3p3/bin/bash' SHELL='/nix/store/lw117lsr8d585xs63kx5k233impyrq7q-bash-5.3p3/bin/bash'
export SHELL export SHELL
@@ -81,7 +81,7 @@ STRINGS='strings'
export STRINGS export STRINGS
STRIP='strip' STRIP='strip'
export 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 export XDG_DATA_DIRS
__structuredAttrs='' __structuredAttrs=''
export __structuredAttrs export __structuredAttrs
@@ -140,7 +140,7 @@ mesonFlags=''
export mesonFlags export mesonFlags
name='nix-shell-env' name='nix-shell-env'
export name 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 export nativeBuildInputs
out='/home/mrfluffy/Documents/projects/rust/whereAmI/outputs/out' out='/home/mrfluffy/Documents/projects/rust/whereAmI/outputs/out'
export out export out
@@ -161,7 +161,7 @@ phases='buildPhase'
export phases export phases
pkg='/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0' pkg='/nix/store/r9wbjib6xxjkyb9yvjvrkl4sq61i2lyn-gcc-wrapper-15.2.0'
declare -a pkgsBuildBuild=() 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 pkgsBuildTarget=()
declare -a pkgsHostHost=() declare -a pkgsHostHost=()
declare -a pkgsHostTarget=() declare -a pkgsHostTarget=()

4
flake.lock generated
View File

@@ -17,7 +17,7 @@
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://flakehub.com/f/nix-community/fenix/0.1.%2A" "url": "https://flakehub.com/f/nix-community/fenix/0.1"
} }
}, },
"nixpkgs": { "nixpkgs": {
@@ -31,7 +31,7 @@
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A" "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1"
} }
}, },
"root": { "root": {

139
flake.nix
View File

@@ -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 = { 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 = { 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"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { self, nixpkgs, fenix }: outputs =
{ self, ... }@inputs:
let let
supportedSystems = [ supportedSystems = [
"x86_64-linux" "x86_64-linux"
@@ -18,13 +18,16 @@
"x86_64-darwin" "x86_64-darwin"
"aarch64-darwin" "aarch64-darwin"
]; ];
forEachSupportedSystem =
forEachSupportedSystem = f: f:
nixpkgs.lib.genAttrs supportedSystems (system: inputs.nixpkgs.lib.genAttrs supportedSystems (
system:
f { f {
pkgs = import nixpkgs { pkgs = import inputs.nixpkgs {
inherit system; inherit system;
overlays = [ self.overlays.default ]; overlays = [
inputs.self.overlays.default
];
}; };
} }
); );
@@ -32,72 +35,70 @@
{ {
overlays.default = final: prev: { overlays.default = final: prev: {
rustToolchain = rustToolchain =
with fenix.packages.${prev.stdenv.hostPlatform.system}; with inputs.fenix.packages.${prev.stdenv.hostPlatform.system};
combine (with stable; [ combine (
cargo with stable;
rustc [
clippy clippy
rustfmt rustc
rust-src cargo
]); rustfmt
rust-src
]
);
}; };
packages = forEachSupportedSystem ({ pkgs }: { packages = forEachSupportedSystem ({ pkgs }: {
default = pkgs.rustPlatform.buildRustPackage { default =
pname = "whereAmI"; pkgs.rustPlatform.buildRustPackage {
version = "0.1.0"; 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.cleanSource ./.;
src = pkgs.lib.cleanSourceWith {
src = ./.; cargoLock = {
filter = path: type: lockFile = ./Cargo.lock;
let # If you have additional lock files (e.g., for alternative registries), add them here
name = pkgs.lib.baseNameOf path; };
in
name == "Cargo.lock" nativeBuildInputs = with pkgs; [
|| pkgs.lib.cleanSourceFilter path type; 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 }: { devShells = forEachSupportedSystem (
default = pkgs.mkShell { { pkgs }:
packages = with pkgs; [ {
rustToolchain default = pkgs.mkShell {
openssl packages = with pkgs; [
pkg-config rustToolchain
cargo-deny openssl
cargo-edit pkg-config
cargo-watch cargo-deny
rust-analyzer cargo-edit
]; cargo-watch
rust-analyzer
env = { ];
# Needed for rust-analyzer stdlib discovery env = {
RUST_SRC_PATH = # Required by rust-analyzer
"${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
};
}; };
}; }
}); );
}; };
} }