2 description = "OneHouse";
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 systems.url = "github:nix-systems/default";
16 allSystems = import systems;
17 # The program runs on Linux. The development shell also supports macOS.
18 linuxSystems = builtins.filter (nixpkgs.lib.hasSuffix "-linux") allSystems;
19 forEachSystem = nixpkgs.lib.genAttrs allSystems;
20 forEachLinuxSystem = nixpkgs.lib.genAttrs linuxSystems;
21 date = self.lastModifiedDate;
22 revision = self.shortRev or self.dirtyShortRev or "unknown";
23 version = "${builtins.substring 0 4 date}-${builtins.substring 4 2 date}-${builtins.substring 6 2 date}-${revision}";
26 packages = forEachLinuxSystem (
29 pkgs = nixpkgs.legacyPackages.${system};
30 onehouse = pkgs.callPackage ./nix/package.nix {
41 devShells = forEachSystem (system: {
42 default = import ./nix/devshell.nix {
43 pkgs = nixpkgs.legacyPackages.${system};
47 checks = forEachLinuxSystem (system: {
48 package = self.packages.${system}.default;
51 formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt);