Skip to content

Commit

Permalink
nix: switch to flake
Browse files Browse the repository at this point in the history
  • Loading branch information
phip1611 committed Dec 16, 2024
1 parent f685817 commit f903d98
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use nix
use flake
27 changes: 27 additions & 0 deletions flake.lock

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

34 changes: 34 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
description = "spectrum-analyzer Rust crate";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};

outputs =
{ self, nixpkgs }@inputs:
{
devShells.x86_64-linux.default =
let
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;

# Mainly runtime deps of the examples, not the base lib.
runtimeDeps = with pkgs; [
alsa-lib
fontconfig
libxkbcommon
xorg.libXcursor
xorg.libX11
];
in
pkgs.mkShell {
packages =
with pkgs;
[
pkg-config
]
++ runtimeDeps;
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath runtimeDeps}";
};
};
}
17 changes: 0 additions & 17 deletions shell.nix

This file was deleted.

0 comments on commit f903d98

Please sign in to comment.