38
flake.nix
38
flake.nix
@@ -48,18 +48,48 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ overlay ];
|
overlays = [ overlay ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
commonBuildInputs = with pkgs; [
|
||||||
|
openssl
|
||||||
|
];
|
||||||
|
|
||||||
|
commonNativeBuildInputs = with pkgs; [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
singerPackage = pkgs.rustPlatform.buildRustPackage {
|
||||||
|
pname = "singer";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = pkgs.lib.cleanSource ./.;
|
||||||
|
|
||||||
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
|
||||||
|
nativeBuildInputs = commonNativeBuildInputs;
|
||||||
|
buildInputs = commonBuildInputs;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
packages = {
|
||||||
|
singer = singerPackage;
|
||||||
|
default = singerPackage;
|
||||||
|
};
|
||||||
|
|
||||||
|
apps.default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${singerPackage}/bin/singer";
|
||||||
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = (with pkgs; [
|
||||||
rustToolchain
|
rustToolchain
|
||||||
openssl
|
|
||||||
pkg-config
|
|
||||||
cargo-deny
|
cargo-deny
|
||||||
cargo-edit
|
cargo-edit
|
||||||
cargo-watch
|
cargo-watch
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
];
|
])
|
||||||
|
++ commonBuildInputs
|
||||||
|
++ commonNativeBuildInputs;
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export RUST_SRC_PATH="${pkgs.rustToolchain}/lib/rustlib/src/rust/library"
|
export RUST_SRC_PATH="${pkgs.rustToolchain}/lib/rustlib/src/rust/library"
|
||||||
|
|||||||
Reference in New Issue
Block a user