build(nix): clean runtime build inputs

This commit is contained in:
LGUG2Z committed 2025-11-30 13:47:08 -08:00
1 parent dcef667811
commit 82de4dd230
3 files changed
+13 -12

No files matched your search

+13 -7
View File
@@ -39,10 +39,19 @@
inherit src version;
strictDeps = true;
COMMIT_HASH = self.rev or (pkgs.lib.removeSuffix "-dirty" self.dirtyRev);
buildInputs = [
pkgs.gcc
pkgs.libiconv
nativeBuildInputs = [
pkgs.darwin.cctools
];
postFixup = ''
for bin in $out/bin/*; do
if [ -f "$bin" ] && [ -x "$bin" ]; then
# Get all linked libraries and fix libiconv references
otool -L "$bin" | grep -o '/nix/store/[^/]*/lib/libiconv[^ ]*' | while read -r lib; do
install_name_tool -change "$lib" /usr/lib/libiconv.dylib "$bin"
done
fi
done
'';
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
@@ -101,10 +110,7 @@
];
perSystem =
{
system,
...
}:
{ system, ... }:
let
pkgs = mkPkgs system;
build = mkKomorebiPackages { inherit pkgs; };
-1
View File
@@ -4,7 +4,6 @@ fmt:
test -z "$(rg 'eyre!' --type rust)" || (echo "eyre! macro not allowed"; false)
test -z "$(rg 'dbg!' --type rust)" || (echo "dbg! macro not allowed"; false)
test -z "$(rg 'println!' --type rust ./komorebi)" || (echo "println! macro not allowed"; false)
taplo fmt Cargo.toml */Cargo.toml
cargo +stable clippy
prettier --write README.md
nix fmt
-4
View File
@@ -8,16 +8,12 @@ mkShell {
RUST_BACKTRACE = "full";
buildInputs = [
alejandra
cargo-deny
cargo-nextest
cargo-udeps
gcc
jq
just
libiconv
prettier
taplo
python311Packages.mkdocs-material
python311Packages.mkdocs-macros