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