nixos-config/templates/rust-app/flake.nix

21 lines
633 B
Nix
Raw Normal View History

2024-03-16 07:12:59 +00:00
{
2024-10-21 07:25:06 +00:00
description = "Basic Rust app development flake";
2024-03-16 07:12:59 +00:00
2024-10-21 07:25:06 +00:00
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { nixpkgs, ... }:
2024-03-16 07:12:59 +00:00
let
inherit (nixpkgs) lib;
systems = [ "x86_64-linux" ];
forAllSystems = f: lib.genAttrs systems (system: f system);
2024-10-21 07:25:06 +00:00
in {
devShells = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in { default = import ./nix/shell.nix { inherit pkgs; }; });
2024-03-16 07:12:59 +00:00
2024-10-21 07:25:06 +00:00
packages = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in { default = pkgs.callPackage ./nix/package.nix { }; });
2024-03-16 07:12:59 +00:00
};
}