Package for nix

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2026-03-28 02:38:19 +02:00
parent 0fff587c89
commit 8c12677824

View File

@@ -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 cargo-deny
pkg-config cargo-edit
cargo-deny cargo-watch
cargo-edit rust-analyzer
cargo-watch ])
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"