{ description = "LaTeX project manager"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # inputs for following systems = { url = "github:nix-systems/x86_64-linux"; # only evaluate for this system }; flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; crane = { url = "github:ipetkov/crane"; inputs = { nixpkgs.follows = "nixpkgs"; flake-compat.follows = "flake-compat"; flake-utils.follows = "flake-utils"; rust-overlay.follows = "rust-overlay"; }; }; flake-utils = { url = "github:numtide/flake-utils"; inputs = { systems.follows = "systems"; }; }; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; }; outputs = { self, nixpkgs, crane, flake-utils, rust-overlay, ... }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [(import rust-overlay)]; }; #rust-nightly = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default); rust-stable = pkgs.rust-bin.stable.latest.default; craneLib = (crane.mkLib pkgs).overrideToolchain rust-stable; craneBuild = craneLib.buildPackage { src = craneLib.cleanCargoSource ./.; doCheck = true; }; in { packages.default = craneBuild; app.default = { type = "app"; program = "${self.packages.${system}.default}/bin/lpm"; }; devShells.default = pkgs.mkShell { packages = with pkgs; [ nil alejandra statix ltex-ls cocogitto rust-stable rust-analyzer cargo-edit ]; }; }); } # vim: ts=2