Skip to content

Commit

Permalink
treewide: move code into rust and nix directories
Browse files Browse the repository at this point in the history
  • Loading branch information
nikstur committed Feb 29, 2024
1 parent 07093ff commit e651701
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@

perSystem = { config, system, pkgs, lib, ... }:
let
rustToolChain = pkgs.rust-bin.fromRustupToolchainFile ./transformer/rust-toolchain.toml;
rustToolChain = pkgs.rust-bin.fromRustupToolchainFile ./rust/transformer/rust-toolchain.toml;
craneLib = inputs.crane.lib.${system}.overrideToolchain rustToolChain;

# Include the Git commit hash as the version of bombon in generated Boms
GIT_COMMIT = lib.optionalString (self ? rev) self.rev;

commonArgs = {
src = craneLib.cleanCargoSource ./transformer;
src = craneLib.cleanCargoSource ./rust/transformer;
inherit GIT_COMMIT;
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
transformer = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; });

buildBom = pkgs.callPackage ./build-bom.nix {
buildBom = pkgs.callPackage ./nix/build-bom.nix {
inherit transformer;
buildtimeDependencies = pkgs.callPackage ./buildtime-dependencies.nix { };
runtimeDependencies = pkgs.callPackage ./runtime-dependencies.nix { };
buildtimeDependencies = pkgs.callPackage ./nix/buildtime-dependencies.nix { };
runtimeDependencies = pkgs.callPackage ./nix/runtime-dependencies.nix { };
};
in
{
Expand All @@ -111,7 +111,7 @@
checks = {
clippy = craneLib.cargoClippy (commonArgs // { inherit cargoArtifacts; });
rustfmt = craneLib.cargoFmt (commonArgs // { inherit cargoArtifacts; });
} // import ./tests { inherit pkgs buildBom; };
} // import ./nix/tests { inherit pkgs buildBom; };

pre-commit = {
check.enable = true;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e651701

Please sign in to comment.