Nix packages for third-party projects that don't ship their own flakes
0

Configure Feed

Select the types of activity you want to include in your feed.

agentic / flake.nix
1.4 kB 54 lines
1{ 2 description = "Nix packages for third-party projects that don't ship their own flakes"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 }; 7 8 outputs = 9 { self, nixpkgs }: 10 let 11 systems = [ 12 "x86_64-linux" 13 "aarch64-linux" 14 "x86_64-darwin" 15 "aarch64-darwin" 16 ]; 17 forAllSystems = nixpkgs.lib.genAttrs systems; 18 in 19 { 20 packages = forAllSystems ( 21 system: 22 let 23 pkgs = nixpkgs.legacyPackages.${system}; 24 in 25 { 26 vit = pkgs.callPackage ./packages/vit { }; 27 spinel = pkgs.callPackage ./packages/spinel { }; 28 rook = pkgs.callPackage ./packages/rook { }; 29 default = self.packages.${system}.vit; 30 } 31 ); 32 33 # Convenience: `nix run .#vit -- --help`, `nix run .#spinel -- --help` 34 apps = forAllSystems (system: { 35 vit = { 36 type = "app"; 37 program = "${self.packages.${system}.vit}/bin/vit"; 38 }; 39 spinel = { 40 type = "app"; 41 program = "${self.packages.${system}.spinel}/bin/spinel"; 42 }; 43 spin = { 44 type = "app"; 45 program = "${self.packages.${system}.spinel}/bin/spin"; 46 }; 47 rook = { 48 type = "app"; 49 program = "${self.packages.${system}.rook}/bin/rook"; 50 }; 51 default = self.apps.${system}.vit; 52 }); 53 }; 54}