/ flake.nix
flake.nix
1 { 2 3 description = "The Olea programming language"; 4 5 inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 7 outputs = { self, nixpkgs }: let 8 supportedSystems = nixpkgs.lib.systems.flakeExposed; 9 allSystems = output: nixpkgs.lib.genAttrs supportedSystems 10 (system: output nixpkgs.legacyPackages.${system}); 11 in { 12 packages = allSystems (pkgs: { 13 default = pkgs.rustPlatform.buildRustPackage { 14 pname = "olea"; 15 version = "0.1.0"; 16 src = self; 17 cargoLock.lockFile = ./Cargo.lock; 18 }; 19 }); 20 21 devShells = allSystems (pkgs: { 22 default = pkgs.mkShell { 23 inherit (self.outputs.packages.${pkgs.system}.default) 24 nativeBuildInputs buildInputs; 25 packages = with pkgs; [ 26 rustc 27 cargo 28 cargo-watch 29 rustfmt 30 clippy 31 ]; 32 RUST_BACKTRACE = 1; 33 }; 34 }); 35 }; 36 37 }