crisp/flake.nix
2024-11-06 13:24:02 -06:00

59 lines
1.4 KiB
Nix

{
description = "Crisp - A lisp";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
naersk.url = "github:nix-community/naersk";
flake-utils.url = "github:numtide/flake-utils";
fenix.url = "github:nix-community/fenix";
};
outputs = inputs: with inputs;
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [fenix.overlays.default];
# overlays = [cargo2nix.overlays.default];
};
naersk' = pkgs.callPackage naersk {};
nbi = with pkgs; [
# Rust tools
alejandra
(pkgs.fenix.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
rust-analyzer
pkg-config
];
bi = with pkgs; [
gcc
stdenv
gnumake
gdb
makeWrapper
just
];
in rec
{
devShell = pkgs.mkShell {
nativeBuildInputs = nbi;
buildInputs = bi;
LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${
with pkgs;
pkgs.lib.makeLibraryPath [
]
}";
};
defaultPackage = naersk'.buildPackage {
src = ./.;
};
}
);
}