Skip to content

Commit

Permalink
Merge pull request #34 from Luxzi/main
Browse files Browse the repository at this point in the history
add(nix): `flake.nix` to allow building with nix
  • Loading branch information
TrevorSatori authored Jul 28, 2024
2 parents 128f5c2 + 2703df1 commit 49b41bc
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 0 deletions.
93 changes: 93 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
description = "Terminal Music Player Written In Rust";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.naersk.url = "github:nix-community/naersk/master";
inputs.utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, utils, naersk, ... }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
in
{
defaultPackage = naersk-lib.buildPackage {
src = ./.;
buildInputs = with pkgs; [
pkg-config
alsa-lib
];
};

devShell = with pkgs; mkShell {
RUST_SRC_PATH = rustPlatform.rustLibSrc;
buildInputs = [
cargo
rustc
rustfmt
pre-commit
rustPackages.clippy
rustPackages.rust-analyzer
pkg-config
alsa-lib
];
};
}
);
}

0 comments on commit 49b41bc

Please sign in to comment.