Add nix flake
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
{
|
||||
description = "Mudmouth, a classic-MUD-inspired EverQuest log reader";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
default = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "mudmouth";
|
||||
version = "0.0.2";
|
||||
src = self;
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
buildInputs = [ pkgs.alsa-lib ];
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "A classic-MUD-inspired EverQuest log reader with Kokoro voices";
|
||||
homepage = "https://github.com/pleb/mudmouth";
|
||||
license = licenses.mit;
|
||||
mainProgram = "mudmouth";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
apps = forAllSystems (system: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/mudmouth";
|
||||
};
|
||||
});
|
||||
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
rustfmt
|
||||
clippy
|
||||
pkg-config
|
||||
alsa-lib
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user