more reshape that i missed
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
inherit (pkgs) lib;
|
||||
|
||||
craneLib = crane.mkLib pkgs;
|
||||
|
||||
@@ -39,26 +40,54 @@
|
||||
];
|
||||
};
|
||||
|
||||
my-crate = craneLib.buildPackage (
|
||||
fileSetForCrate =
|
||||
crate:
|
||||
lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./Cargo.toml
|
||||
./Cargo.lock
|
||||
(craneLib.fileset.commonCargoSources ./crates/entity)
|
||||
(craneLib.fileset.commonCargoSources ./crates/migration)
|
||||
(craneLib.fileset.commonCargoSources ./crates/server)
|
||||
(craneLib.fileset.commonCargoSources crate)
|
||||
];
|
||||
};
|
||||
|
||||
rtmp-to-whip-simple-server = craneLib.buildPackage (
|
||||
commonArgs
|
||||
// {
|
||||
pname = "rtmp-to-whip";
|
||||
version = "0.1.0";
|
||||
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||
|
||||
# Additional environment variables or build phases/hooks can be set
|
||||
# here *without* rebuilding all dependency crates
|
||||
# MY_CUSTOM_VAR = "some value";
|
||||
cargoExtraArgs = "-p server";
|
||||
src = fileSetForCrate ./crates/server;
|
||||
}
|
||||
);
|
||||
# migration = craneLib.buildPackage (
|
||||
# commonArgs
|
||||
# // {
|
||||
# pname = "migration";
|
||||
# version = "0.1.0";
|
||||
# cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||
# cargoExtraArgs = "-p migration";
|
||||
# src = fileSetForCrate ./crates/migration;
|
||||
#
|
||||
# # Additional environment variables or build phases/hooks can be set
|
||||
# # here *without* rebuilding all dependency crates
|
||||
# # MY_CUSTOM_VAR = "some value";
|
||||
# }
|
||||
# );
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
inherit my-crate;
|
||||
inherit rtmp-to-whip-simple-server;
|
||||
};
|
||||
|
||||
packages.default = my-crate;
|
||||
packages.default = rtmp-to-whip-simple-server;
|
||||
|
||||
apps.default = flake-utils.lib.mkApp {
|
||||
drv = my-crate;
|
||||
drv = rtmp-to-whip-simple-server;
|
||||
};
|
||||
|
||||
devShells.default = craneLib.devShell {
|
||||
|
||||
Reference in New Issue
Block a user