{ description = "OneHouse"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; systems.url = "github:nix-systems/default"; }; outputs = { self, nixpkgs, systems, }: let allSystems = import systems; # The program runs on Linux. The development shell also supports macOS. linuxSystems = builtins.filter (nixpkgs.lib.hasSuffix "-linux") allSystems; forEachSystem = nixpkgs.lib.genAttrs allSystems; forEachLinuxSystem = nixpkgs.lib.genAttrs linuxSystems; date = self.lastModifiedDate; revision = self.shortRev or self.dirtyShortRev or "unknown"; version = "${builtins.substring 0 4 date}-${builtins.substring 4 2 date}-${builtins.substring 6 2 date}-${revision}"; in { packages = forEachLinuxSystem ( system: let pkgs = nixpkgs.legacyPackages.${system}; onehouse = pkgs.callPackage ./nix/package.nix { src = self; inherit version; }; in { inherit onehouse; default = onehouse; } ); devShells = forEachSystem (system: { default = import ./nix/devshell.nix { pkgs = nixpkgs.legacyPackages.${system}; }; }); checks = forEachLinuxSystem (system: { package = self.packages.${system}.default; }); formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt); }; }