Finally fix dependency crates being rebuilt by crane

This commit is contained in:
Julian Mutter 2024-06-04 23:18:59 +02:00
parent de00301c39
commit 182675d14e

View File

@ -39,28 +39,22 @@
# Common arguments can be set here to avoid repeating them later
# Note: changes here will rebuild all dependency crates
commonArgs = rec {
strictDeps = true; # When this is not set, all dependency crates will be compiled again
src = pkgs.lib.cleanSourceWith {
src = craneLib.path ./.; # The original, unfiltered source
filter = dbMigrationsOrCargoFilter;
};
# Add icons.toml to $src when compiling dependencies (needed by relm4-icons)
# Add db-migrations to $src when compiling dependencies (needed by sqlx)
extraDummyScript = ''
cp --no-preserve=mode,ownership ${./icons.toml} $out/icons.toml
mkdir -p $out/db-migrations
cp -r --no-preserve=mode,ownership ${dbMigrations} --no-target-dir $out/db-migrations/
'';
nativeBuildInputs = with pkgs; [
pkg-config
gtk4
];
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs =
[
# Add additional build inputs here
]
with pkgs;
[ gtk4 ]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
# Additional darwin specific inputs can be set here
pkgs.libiconv