application-launcher/flake.nix
2025-06-23 16:15:46 +02:00

60 lines
1.5 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs =
{
systems,
nixpkgs,
...
}:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
rec {
packages = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
default = pkgs.callPackage ./nix/package.nix { };
application-launcher = default;
}
);
devShells = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
# Copy build inputs from package
buildInputs = packages.${system}.default.buildInputs;
nativeBuildInputs =
# Copy native build inputs from package
packages.${system}.default.nativeBuildInputs
++ (with pkgs; [
# Additional packages for development
rustc
rustfmt
cargo
rust-analyzer
clippy
]);
# Needed for rust-analyzer to find the rust standard library
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
}
);
};
}