Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/opsqueue_python/opsqueue_python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let
cargoExtraArgs = "--package opsqueue_python";
doCheck = false;
};
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = pname; });
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { cargoCheckCommand = "true"; } );

wheelTail = "py3-abi3-linux_x86_64";
wheelName = "opsqueue-${version}-${wheelTail}.whl";
Expand Down
12 changes: 8 additions & 4 deletions opsqueue/opsqueue.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ let
sources = import ../nix/sources.nix;
crane = import sources.crane { pkgs = pkgs; };
craneLib = crane.overrideToolchain (pkgs: rustToolchain);
extraFileFilter = path: _type: builtins.match "^.*\.(db|sql)$" path != null;
fileFilter = path: type: (extraFileFilter path type) || (craneLib.filterCargoSources path type);

# Only the files necessary to build the Rust-side and cache dependencies
sqlFileFilter = path: _type: builtins.match "^.*\.(db|sql)$" path != null;
rustCrateFileFilter =
path: type: (sqlFileFilter path type) || (craneLib.filterCargoSources path type);

# src = craneLib.cleanCargoSource ../.;
src = lib.cleanSourceWith {
src = ../.;
name = "opsqueue";
filter = fileFilter;
filter = rustCrateFileFilter;
};

crateName = craneLib.crateNameFromCargoToml { cargoToml = ./Cargo.toml; };
Expand All @@ -37,7 +40,8 @@ let
cargoExtraArgs = "--package opsqueue";
doCheck = true;
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { cargoCheckCommand = "true"; }
);
in
craneLib.buildPackage (
commonArgs
Expand Down
Loading