43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
naersk = {
|
|
url = "github:nmattia/naersk/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils, naersk }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
naersk-lib = pkgs.callPackage naersk { };
|
|
in
|
|
rec {
|
|
|
|
defaultPackage = naersk-lib.buildPackage {
|
|
root = ./.;
|
|
pname = "pamedia";
|
|
buildInputs = with pkgs; [ libpulseaudio ];
|
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
|
};
|
|
|
|
defaultApp = utils.lib.mkApp {
|
|
drv = self.defaultPackage."${system}";
|
|
};
|
|
|
|
overlays = final: prev: {
|
|
pamedia = defaultPackage;
|
|
};
|
|
|
|
devShell = with pkgs; mkShell {
|
|
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy cargo-edit cargo-feature cargo-outdated ] ++ defaultPackage.buildInputs;
|
|
nativeBuildInputs = [ ] ++ defaultPackage.nativeBuildInputs;
|
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
|
};
|
|
|
|
});
|
|
|
|
}
|